- Home
- Tools
- Math
- Number Base Converter
- Hex to Binary Converter
Hex to Binary Converter
Expand a hexadecimal number into binary: every hex digit becomes four bits, shown digit by digit.
Type a hexadecimal number in the first field and read it in binary in the second. It works the other way round as well. Whole numbers only; spaces, underscores and the prefixes 0b, 0o and 0x are fine.
Working
| Hex digit | As 4 bits |
|---|---|
| 3 | 0011 |
| F | 1111 |
| 9 | 1001 |
Side by side: 0011 1111 1001. Without the zeros in front: 1111111001
Other bases
- Bit length
- 10 bits
- Fits in
- 2 bytes
How to convert hexadecimal to binary by hand
Every hex digit turns into four bits, and the digits can be handled one at a time. Write down the four bits for each digit and put the groups side by side.
For 3F9: 3 is 0011, F is 1111 and 9 is 1001, which makes 0011 1111 1001. Zeros at the very front can be dropped, so the number is 1111111001.
The working under the two fields at the top of the page does this for whatever number you type.
Good to know
- Every digit needs all four of its bits, zeros included. Only at the very front may zeros be left out. Dropping them in the middle is the usual mistake: 91 is 1001 0001, not 10011.
- To build the bits of a digit, split it into 8, 4, 2 and 1. D is 13 = 8 + 4 + 1, so its bits are 1101.
- This is why bytes, memory addresses and colour codes are written in hexadecimal: it is binary in a quarter of the space.
Hexadecimal to binary table
| Hexadecimal | Binary |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
| A | 1010 |
| B | 1011 |
| C | 1100 |
| D | 1101 |
| E | 1110 |
| F | 1111 |
| 10 | 0001 0000 |
| Hexadecimal | Binary |
|---|---|
| 14 | 0001 0100 |
| 20 | 0010 0000 |
| 32 | 0011 0010 |
| 40 | 0100 0000 |
| 64 | 0110 0100 |
| 7F | 0111 1111 |
| 80 | 1000 0000 |
| C8 | 1100 1000 |
| FF | 1111 1111 |
| 100 | 0001 0000 0000 |
| 1F4 | 0001 1111 0100 |
| 200 | 0010 0000 0000 |
| 3E8 | 0011 1110 1000 |
| 400 | 0100 0000 0000 |
| 1000 | 0001 0000 0000 0000 |
| FFFF | 1111 1111 1111 1111 |
The number base converter shows binary, octal, decimal and hexadecimal next to each other, and explains positional notation and two's complement.