The four-bit rule
Hexadecimal uses sixteen symbols: 0–9 and A–F, where A is 10 and F is 15. Four binary bits can represent values from 0 through 15, so each hex digit maps to exactly one four-bit group.
| Hex | Binary | Hex | Binary |
|---|---|---|---|
| 0 | 0000 | 8 | 1000 |
| 1 | 0001 | 9 | 1001 |
| 2 | 0010 | A | 1010 |
| 3 | 0011 | B | 1011 |
| 4 | 0100 | C | 1100 |
| 5 | 0101 | D | 1101 |
| 6 | 0110 | E | 1110 |
| 7 | 0111 | F | 1111 |
Work through an example: 24D₁₆
- Split the hexadecimal number into digits: 2, 4, and D.
- Look up each four-bit group: 2 → 0010, 4 → 0100, D → 1101.
- Join the groups in the same order: 24D₁₆ = 0010 0100 1101₂.
As a check, 24D₁₆ equals 589 in decimal, and 0010 0100 1101₂ also equals 589. The four-bit groups make the conversion easier to verify.
Why the leading zeros matter
Keep all four bits while converting each digit: 2 is 0010, not just 10, in this grouped method. A leading zero does not change the numeric value, but it keeps each hexadecimal digit aligned with its four-bit group. That matters when you are reading bytes, bit fields, or a fixed-width value.
For example, 0A₁₆ becomes 0000 1010₂. If you only need the shortest ordinary binary representation of the number, you may remove zeros at the very beginning after joining the groups; do not remove zeros inside a group.
Convert a longer value without losing your place
- Read from left to right and replace one hex digit at a time.
- Keep each result four bits wide, including zeros.
- Separate groups with spaces to check your work; remove the spaces only if your destination requires one continuous string.
- If the input includes a prefix such as 0x, remove the prefix before entering the digits in a converter that expects only the value.
For a fast check, UsefulVerse’s base converter converts integers between bases 2 and 36 directly in your browser. Choose hexadecimal as the input base and binary as the output base; your value stays on your device.