- Home
- Tools
- Math
- Number Base Converter
- Binary to Hex Converter
Binary to Hex Converter
Convert binary to hexadecimal four bits at a time, and see which group becomes which hex digit.
Type a binary number in the first field and read it in hexadecimal 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
| Group of 4 bits | Hex digit |
|---|---|
| 0010 | 2 |
| 1101 | D |
| 0110 | 6 |
Side by side: 2D6
Other bases
- Bit length
- 10 bits
- Fits in
- 2 bytes
How to convert binary to hexadecimal by hand
Sixteen is 2⁴, so one hex digit stands for exactly four bits. There is no arithmetic in this conversion, only cutting and looking up.
Split the bits into groups of four, starting from the right. If the left-hand group comes up short, fill it with zeros. Then replace every group by its hex digit. For 1011010110 the groups are 0010, 1101 and 0110. Those are 2, D and 6, so the answer is 2D6.
The working under the two fields at the top of the page does this for whatever number you type.
Good to know
- Always group from the right. Starting at the left gives a wrong answer whenever the number of bits is not a multiple of four.
- The value of a group is the sum of 8, 4, 2 and 1 for the bits that are set: 1101 is 8 + 4 + 1 = 13, which is D.
- A byte is two groups, so it is always two hex digits: 11111111 is FF.
Binary to hexadecimal table
| Binary | Hexadecimal |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 0010 | 2 |
| 0011 | 3 |
| 0100 | 4 |
| 0101 | 5 |
| 0110 | 6 |
| 0111 | 7 |
| 1000 | 8 |
| 1001 | 9 |
| 1010 | A |
| 1011 | B |
| 1100 | C |
| 1101 | D |
| 1110 | E |
| 1111 | F |
| 0001 0000 | 10 |
| Binary | Hexadecimal |
|---|---|
| 0001 0100 | 14 |
| 0010 0000 | 20 |
| 0011 0010 | 32 |
| 0100 0000 | 40 |
| 0110 0100 | 64 |
| 0111 1111 | 7F |
| 1000 0000 | 80 |
| 1100 1000 | C8 |
| 1111 1111 | FF |
| 0001 0000 0000 | 100 |
| 0001 1111 0100 | 1F4 |
| 0010 0000 0000 | 200 |
| 0011 1110 1000 | 3E8 |
| 0100 0000 0000 | 400 |
| 0001 0000 0000 0000 | 1000 |
| 1111 1111 1111 1111 | FFFF |
The number base converter shows binary, octal, decimal and hexadecimal next to each other, and explains positional notation and two's complement.