Developer Bases

Hex to binary

Hexadecimal value
Binary 1010101111
Each hex digit expands to four bits
The same number elsewhere
Decimal 687
Binary, grouped 0010 1010 1111
Octal 1257
Hexadecimal 2AF
Bits needed 10
Note
Pure substitution · no arithmetic needed
DecimalBinaryOctalHex
0000
1111
81000108
10101012A
15111117F
16100002010
64100000010040
100110010014464
25511111111377FF
256100000000400100
1024100000000002000400
655351111111111111111177777FFFF

Hex to binary needs no arithmetic at all — just substitution. Each digit becomes its own four bits: 2 is 0010, A is 1010, F is 1111, so 2AF is 0010 1010 1111. Going back is the same in reverse: group the bits into fours from the right and read each group as one hex digit.

Advertisement
320 × 100

Each hexadecimal digit becomes exactly four binary digits, so no arithmetic is needed — just substitution. 2AF becomes 0010 1010 1111. The mapping is exact because 16 is 2 to the fourth power.

How to convert hex to binary

1 Enter the hex value.
2 Each digit expands to its own four bits.
3 Read the grouped output — the groups line up with the hex digits.
4 To go back, group the bits into fours from the right.

This exact four-to-one mapping is the whole reason hexadecimal exists in computing. It gives a compact notation that a person can translate to and from binary without calculation, which matters when reading a register value or a memory dump. Octal has the same property with three bits, which is why it was common on machines with 12, 24 or 36-bit words — and why it faded once eight-bit bytes won.

Questions

1010. Each hex digit is exactly four bits.

Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING