Number Base Converter

Convert a decimal number into binary, hexadecimal and octal.

Binary 11111111
Hexadecimal FF
Octal 377

Formula: repeatedly divide by the base and read the remainders

Step-by-step with your numbers:
1. Values used:
2. Decimal number = 255
3.
4. Binary = 11111111
5. Hexadecimal = FF
6. Octal = 377
Did we solve your problem today?

Convert a whole decimal number into the binary, hexadecimal and octal systems used in computing.

The math behind it

To convert to base b, divide by b repeatedly and collect the remainders from last to first. Binary uses 0โ€“1, octal 0โ€“7, hex 0โ€“9 and Aโ€“F.

Worked example

255 โ†’ binary 11111111, hex FF, octal 377.

FAQ

Why is hex used in computing?

Each hex digit maps to exactly 4 binary bits, making long binary values compact and readable.