Binary / Hex / Octal Converter
Convert numbers between decimal, binary, octal, and hexadecimal with bit visualization.
Enable JavaScript to use the interactive calculator above its formula and guide.
Formula & methodology
Any base N: value = Σ(digit × N^position)
Each number system uses a different base. Decimal (base 10), Binary (base 2), Octal (base 8), Hexadecimal (base 16). Conversion is done via the common base 10 intermediate.
Frequently asked questions
What is 255 in hexadecimal?
255 in decimal = FF in hexadecimal = 11111111 in binary = 377 in octal.
Why do programmers use hexadecimal?
Hexadecimal (base 16) is more compact than binary and maps neatly to binary (4 bits = 1 hex digit), making it ideal for memory addresses and color codes.