Binary Converter

Type a number, say which base it is written in, and see it in binary, decimal, octal and hexadecimal at once.

Type a number and the answer appears straight away.

Your answer

Binary1111 1111

Decimal
255
Hexadecimal
FF
Octal
377
Bits needed
8

Binary digits are shown in groups of four. Each group of four bits is one hexadecimal digit.

The math behind it: Binary Converter

decimal value = sum of each digit x the base raised to its position

Binary uses only 0 and 1, and each place is worth twice the one to its right. Decimal 255 is 1111 1111 in binary and FF in hexadecimal. Each group of four binary digits corresponds to exactly one hexadecimal digit, which is why programmers use hex as shorthand.

Common questions

How do I convert decimal to binary?

Keep dividing by 2 and write down the remainders, then read them from last to first. For 10: the remainders are 0, 1, 0, 1, which reversed gives 1010.

How do I convert binary to decimal?

Multiply each digit by its place value (1, 2, 4, 8 and so on from the right) and add them up. 1010 is 8 + 0 + 2 + 0 = 10.

What is 255 in binary?

1111 1111. It is the largest number that fits in eight bits, which is one byte.

You might also need

Checked and updated: