Hexadecimal is a base-16 number system using 0–9 and A–F. It represents large values compactly, making binary data easier to read. section 6.2.2 section 20.2
The essential values and relationships are:
- A hexadecimal digit represents four bits, called a nibble: 0000–1111 corresponds to 0–F. section 20.2
- The letters represent decimal values A=10, B=11, C=12, D=13, E=14, and F=15. section 20.2
- Network examples include 48-bit MAC addresses and 128-bit IPv6 addresses. section 6.2.2 section 20.2
Binary-to-hexadecimal conversion
Split 0b1101101100101111 into four-bit groups: 1101, 1011, 0010, 1111. Convert them to hexadecimal: D, B, 2, F. Therefore, 0b1101101100101111 = 0xDB2F. section 20.2
Table 20.1 Decimal, binary, and hexadecimal numbers (view table figure)
| Decimal |
Binary |
Hex. |
Decimal |
Binary |
Hex. |
|---|---|---|---|---|---|
| 0 |
0000 |
0 |
8 |
1000 |
8 |
| 1 |
0001 |
1 |
9 |
1001 |
9 |
| 2 |
0010 |
2 |
10 |
1010 |
A |
| 3 |
0011 |
3 |
11 |
1011 |
B |
| 4 |
0100 |
4 |
12 |
1100 |
C |
| 5 |
0101 |
5 |
13 |
1101 |
D |
| 6 |
0110 |
6 |
14 |
1110 |
E |
| 7 |
0111 |
7 |
15 |
1111 |
F |
Use the decimal, binary, and hexadecimal table to memorize the 0–F mapping. section 20.2




