Hex Digit Reference
| Hex | Dec | Binary | Hex | Dec | Binary | |
|---|---|---|---|---|---|---|
| 0 | 0 | 0000 | 8 | 8 | 1000 | |
| 1 | 1 | 0001 | 9 | 9 | 1001 | |
| 2 | 2 | 0010 | A | 10 | 1010 | |
| 3 | 3 | 0011 | B | 11 | 1011 | |
| 4 | 4 | 0100 | C | 12 | 1100 | |
| 5 | 5 | 0101 | D | 13 | 1101 | |
| 6 | 6 | 0110 | E | 14 | 1110 | |
| 7 | 7 | 0111 | F | 15 | 1111 |
Why Hex?
One hex digit = exactly 4 bits. One byte (8 bits) = exactly 2 hex digits. This makes hex the perfect shorthand for binary data. The binary sequence 11111111 10101010 becomes FF AA in hex—shorter, easier to read, and directly translatable back.
Where You'll See Hex
CSS/HTML colors: #FF0000 is red, #00FF00 is green, #0000FF is blue. Shorthand: #F00 = #FF0000.
Memory addresses: 0x7FFF0001 is more readable than its 32-bit binary equivalent.
Unicode code points: U+1F600 (😀), U+0041 (A), U+4E2D (中).
MAC addresses: AA:BB:CC:DD:EE:FF—6 bytes in hex-pair notation.