Hex to Binary Converter
Turn hexadecimal digits into binary with a lookup, not arithmetic.
Convert F3 to binary and you do not need to do any maths at all. F is 1111, 3 is 0011, so F3 is 11110011 — two lookups stitched together.
Why hexadecimal exists in the first place
Binary is what a computer stores, but a 32-bit value written out as thirty-two 1s and 0s is nearly impossible for a person to read or type correctly. Hexadecimal, base 16, exists purely to make binary bearable for humans.
The trick is that 16 is exactly 2 to the power of 4, so one hex digit always corresponds to exactly four binary digits, no partial digits and no carrying. That is not true of decimal — converting binary to base 10 needs real arithmetic, place values, carrying. Hex to binary needs none of that.
The lookup table you are actually using
| Hex digit | Binary (4 bits) | Decimal value |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
Reading a longer hex value
Every extra hex digit adds another four-bit group, always in the same order: leftmost hex digit, leftmost four bits. Converting 2AF means looking up 2 (0010), A (1010) and F (1111) and writing them side by side: 001010101111.
This is exactly why hex shows up wherever raw binary needs to be typed by a person — memory addresses, MAC addresses, colour codes, hash digests. Two hex digits describe one full byte, which is a tidier unit than eight raw binary digits.
Hex to binary questions
Do I need to calculate anything to convert hex to binary?
No, and that is the point of hexadecimal. Each digit substitutes for a fixed four-bit pattern, so the conversion is a table lookup performed digit by digit, not a mathematical calculation.
Why do hex digits go up to F instead of stopping at 9?
Because hexadecimal is base 16 and needs sixteen distinct symbols. Once 9 runs out, it borrows the letters A through F to represent the values 10 through 15.
How many hex digits does one byte need?
Exactly two. A byte is eight bits, and each hex digit covers four bits, so two hex digits — for example FF — describe a full byte, from 00000000 to 11111111.
Why does hex show up so often in programming?
Because it is a compact, exact stand-in for binary that people can actually read and type without errors. Memory addresses, colour codes and hash values are all binary underneath, and hex is how they are displayed.
Is 0x2AF the same value as 2AF?
Yes. The 0x prefix is just a convention that tells a program or a reader “interpret what follows as hexadecimal,” used because a bare number like 10 is ambiguous between decimal, hex and other bases.