How to convert binary to hex by hand
Example 1: 1111000010101100 in binary is F0AC in hex
Binary to hex: group the bits in 4s
Because 16 = 2⁴, every 4 bits make exactly one hex digit. Start from the right and pad the leftmost group with zeros if needed.
| 4-bit group | Value | Hex digit |
|---|---|---|
| 1111 | 15 | F |
| 0000 | 0 | 0 |
| 1010 | 10 | A |
| 1100 | 12 | C |
1111 0000 1010 1100 → F0AC
Example 2: 101101 in binary is 2D in hex
Binary to hex: group the bits in 4s
Because 16 = 2⁴, every 4 bits make exactly one hex digit. Start from the right and pad the leftmost group with zeros if needed.
| 4-bit group | Value | Hex digit |
|---|---|---|
| 0010 | 2 | 2 |
| 1101 | 13 | D |
0010 1101 → 2D
Binary to Hex conversion table
| Binary | Hex | Decimal |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 10 | 2 | 2 |
| 11 | 3 | 3 |
| 100 | 4 | 4 |
| 101 | 5 | 5 |
| 110 | 6 | 6 |
| 111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
| 10000 | 10 | 16 |
| 100000 | 20 | 32 |
| 1000000 | 40 | 64 |
| 1100100 | 64 | 100 |
| 10000000 | 80 | 128 |
| 11111111 | FF | 255 |
| 100000000 | 100 | 256 |
| 1000000000 | 200 | 512 |
| 1111101000 | 3E8 | 1000 |
| 10000000000 | 400 | 1024 |
Where this conversion comes up
- Shortening long bit patterns: each byte is exactly two hex digits, so 11110000 becomes F0.
- Writing masks and flags in code, where 0xF0 is easier to read than 0b11110000.
- Reading packet captures, memory dumps and file headers, which are almost always shown in hex.
Frequently asked questions
Why group binary digits in fours?
16 is 2⁴, so one hex digit holds exactly 4 bits. That makes the conversion a direct lookup for each group, with no arithmetic on the whole number.
What if the number of bits is not a multiple of 4?
Pad the left side with zeros. 101101 becomes 0010 1101, which is 2D in hex. Leading zeros do not change the value.
Can I convert negative numbers?
Yes. Put a minus sign in front and it is kept in the result, for example -1111000010101100 becomes -F0AC. The converter does not produce two's complement.
Is there a limit on how big the number can be?
No practical limit. The conversion uses arbitrary precision integers, so long values stay exact. The step-by-step working is shown for numbers up to 24 digits.
Can I convert fractions?
Not with this tool. It converts whole binary numbers to whole hex numbers.
Other number converters
Going the other way? Use the Hex to Binary Converter. To see a number in every base at once, try the all-in-one number converter.