Ten digits weren’t enough. So we borrowed from the alphabet.
Sixteen symbols: 0 through 9, then A through F. No mystery —
A is just a name for ten, B for eleven, up to F for fifteen.
Reach sixteen, carry left.
In 2AF (hexadecimal):
F→15 × 1=15A→10 × 16=1602→2 × 256=512
Total: 687 in decimal.
Hexadecimal = base-16 — sixteen symbols, positional value, carry at sixteen.
Why not just use octal? Because one byte is eight binary digits — and eight binary digits group perfectly into two hexadecimal digits:
1101 1111 → D F → DF
4 binary digits = 1 hex digit. 8 binary digits = 2 hex digits.
One byte, two characters. Clean, compact, universal. That’s why you see hex
everywhere: memory addresses, color codes (#FF5733), error codes, network
identifiers. It’s the lingua franca between binary’s precision and human
readability.
The Pattern
16⁰ → 16¹ → 16² → 16³ → ...
1 → 16 → 256 → 4096 → ...
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 8 | 1000 | 10 | 8 |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
Octal bridged binary and humans. Hex replaced it — because a byte deserves exactly two digits.