Convert directly by splitting binary digits into groups of four and replacing each group with its hexadecimal equivalent. For the reverse conversion, replace every hexadecimal digit with exactly four binary digits; decimal conversion is unnecessary.
Each four-bit group is called a nibble. Four bits represent 16 possible values, matching the 16 hexadecimal digits: 0 to 9 and A to F. This one-to-one mapping works because four bits provide distinct combinations.
| 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 |
Binary to hexadecimal
Group bits from right to left. Add leading zeros if the leftmost group contains fewer than four bits.
1011110010 becomes 0010 1111 0010. Converting each nibble gives 2, F, and 2, so .
You can verify the result using place value: , which equals the original binary value.
Hexadecimal to binary
Replace each hexadecimal digit with its four-bit representation:
becomes . Leading zeros may be removed when the required bit width is not specified, giving .
For values with a radix point, group outward from the point: leftward for the integer part and rightward for the fractional part. Add zeros only at the outer ends of incomplete groups. For example, converts directly to .
A common misconception is that each binary digit corresponds to one hexadecimal digit. In fact, one hexadecimal digit corresponds to four binary digits.
IB exam technique
For A1.2 data representation questions, show the four-bit grouping before writing the answer. This earns method credit, makes place-value errors visible, and demonstrates direct conversion without an unnecessary decimal intermediate.