Number Bases
The Three Number Systems
Denary (Base-10)
The number system humans use every day.
- Uses digits 0-9
- Column values are powers of 10: …1000, 100, 10, 1
- Example: 4273 = (4×1000) + (2×100) + (7×10) + (3×1)
Binary (Base-2)
The number system used by computers.
- Uses digits 0 and 1 only
- Column values are powers of 2: 128, 64, 32, 16, 8, 4, 2, 1
- Example: 1011 in binary = (1×8) + (0×4) + (1×2) + (1×1) = 11 in denary
An 8-bit binary number ranges from 00000000 (0) to 11111111 (255).
Hexadecimal (Base-16)
A compact shorthand for binary, used extensively in computing.
- Uses digits 0-9 and letters A-F (where A=10, B=11 … F=15)
- Column values are powers of 16: 256, 16, 1
- Each hex digit = exactly 4 binary bits (a nibble)
- Used for: memory addresses, MAC addresses, colour codes, error codes
Counting 0-15 Across All Three Systems
| Denary | Hexadecimal | Binary |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| 10 | A | 1010 |
| 11 | B | 1011 |
| 12 | C | 1100 |
| 13 | D | 1101 |
| 14 | E | 1110 |
| 15 | F | 1111 |
Why Hexadecimal Is Used in Computing
- Compact: A byte (8 bits) is represented by just 2 hex digits, much shorter than 8 binary digits
- Human-readable: Long binary strings (e.g.,
11001010 11110001) are error-prone;CAF1is much easier to read - Direct mapping: Each hex digit maps to exactly 4 bits, so conversion is fast and reliable
Examples of Hex in Computing
- Memory addresses:
0x7FFF0000 - Colour codes:
#FF5733(RGB in hex) - MAC addresses:
A4:C3:F0:85:AC:2D - Error codes:
0x0000007E
Exam Questions
Q: How many different values can an 8-bit binary number represent?
2⁸ = 256 possible values, ranging from 0 to 255.
Q: What is the hexadecimal equivalent of denary 26?
26 ÷ 16 = 1 remainder 10. 10 in hex = A. So 26 = 1A in hex.
Q: Why is hexadecimal used in computing instead of binary?
Hexadecimal is more compact, two hex digits represent one byte, and is easier for humans to read and write than long strings of binary digits.
Exam Tip
Nibble = 4 bits = 1 hex digit. This relationship is the key to fast conversions. Memorise the table above, especially A=10 through F=15.