Understand the denary, binary and hexadecimal number systems
📚 Data Representation: Denary, Binary & Hexadecimal
1️⃣ Denary (Decimal) – The Number System We Use Every Day
Denary, also called decimal, is the base‑10 system. It uses ten digits: 0,1,2,3,4,5,6,7,8,9. Each position represents a power of 10. For example:
$123_{10} = 1\times10^2 + 2\times10^1 + 3\times10^0$
Think of it like counting on your fingers – each finger adds a new “place” (10, 100, 1000, …).
2️⃣ Binary – The Language of Computers
Binary is base‑2, using only 0 and 1. Each position represents a power of 2. Example:
$10_{10} = 1010_2$
Analogy: binary is like a light switch – it can be either OFF (0) or ON (1). Computers use millions of such switches to store data.
Conversion steps (decimal to binary):
- Divide the decimal number by 2.
- Record the remainder (0 or 1).
- Repeat with the quotient until it becomes 0.
- The binary number is the remainders read in reverse order.
3️⃣ Hexadecimal – A Shorter Way to Write Binary
Hexadecimal is base‑16. It uses digits 0–9 and letters A–F (representing 10–15). Each hex digit equals four binary digits (bits). Example:
$255_{10} = FF_{16} = 11111111_2$
Analogy: Think of hex as a shorthand “word” for a long binary string – like writing “k” instead of “1000000” in binary.
Conversion steps (decimal to hex):
- Divide the decimal number by 16.
- Record the remainder (0–15). If 10–15, use A–F.
- Repeat with the quotient until it becomes 0.
- Read the remainders in reverse to get the hex value.
🗂️ Quick Reference Table (0–15)
| Decimal | Binary | Hexadecimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
📌 Examination Tips
- Remember that each binary digit is a power of 2: $2^0, 2^1, 2^2, ...$.
- Hex digits are just groups of four binary digits: $1111_2 = F_{16}$.
- When converting decimal to binary or hex, write the remainders in reverse order.
- Practice converting between all three systems – the more you do, the faster you’ll get.
- Use the quick reference table for 0–15 as a handy cheat sheet during exams.
Revision
Log in to practice.