Binary, Hex and Decimal Converter
Convert any whole number between decimal, binary, hexadecimal and octal, however large.
Binary
1111 1111
- Decimal
- 255
- Hexadecimal
- FF
- Octal
- 377
255 in base 10 is 255 in decimal, 1111 1111 in binary and FF in hexadecimal.
How it's worked out
- To decimal255
- To another base
divide by the base repeatedly; the remainders, read upwards, are the digits1111 1111 (binary)
How to convert
To decimal: multiply each digit by the base to the power of its position and add. From decimal: divide by the new base again and again; the remainders, read from last to first, are the digits.
Worked example
255 ÷ 16 = 15 remainder 15, and 15 ÷ 16 = 0 remainder 15. Both remainders are F, so 255 is FF in hexadecimal.
Questions people ask
What is 255 in binary and hex?
255 is 1111 1111 in binary and FF in hexadecimal: the largest value one byte can hold.
How do I convert binary to decimal?
Multiply each digit by 2 raised to its position (counting from 0 on the right) and add. 1010 = 8 + 0 + 2 + 0 = 10.
Can I paste 0x or 0b prefixes?
Yes. 0xFF for hex and 0b1010 for binary are understood.
About this calculator
Formula and rules last checked 25 October 2026Written and tested by the CalcPenguin teamReport a problem
Related calculators
- Roman Numeral ConverterTurn numbers into Roman numerals and Roman numerals back into numbers, from 1 to 3,999.
- Scientific Notation ConverterWrite any number in scientific, E and engineering notation, or back out in full.
- Unit ConverterLength, weight, volume, temperature and speed, including maund and cooking measures.