📚 Knowledge Library — Topic 1 — Data Representation

Binary and Hexadecimal

Understand how computers represent numbers using simple patterns of 1s and 0s, and why hexadecimal makes long binary values easier to read.

1. Invitation

You are not learning a new language.

You are learning how computers count. Binary and hexadecimal can look strange at first, but they follow a clear pattern.

Computers store every type of data using binary. Text, images, sound and video all become patterns of 1s and 0s.

💡 Remember: once you understand the pattern, the topic becomes much less scary.
Figure 1.1
Everything becomes Binary
TEXT
IMAGE
SOUND
↓
BINARY
2. The Big Idea

Computers only need two states.

A computer is built from tiny electronic circuits. These circuits can be in one of two states: off or on.

We represent these two states using the digits 0 and 1. This is why binary is called a base-2 number system.

💡 Binary uses only two digits: 0 and 1.
Figure 2.1
Electronic Switch
OFF ───► 0

ON ───► 1
3. Worked Example

Converting binary to denary.

Each binary column has a place value. Starting on the right, the values double each time.

To convert binary to denary, add the place values where there is a 1.

Convert 00101101₂ to denary

128
64
32
16
8
4
2
1
0
0
1
0
1
1
0
1
32 + 8 + 4 + 1 = 45
Figure 3.1
Binary Place Values
128 64 32 16
8 4 2 1
Each column is twice the value of the column to its right.
4. Hexadecimal Reference

Hexadecimal is a shortcut for binary.

Hexadecimal uses sixteen values. The digits 0 to 9 work as normal. The letters A to F represent the values 10 to 15.

One hexadecimal digit can represent exactly four binary bits.

🎯 Exam Tip: Learn A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
Figure 4.1
Four Bits to One Hex Digit
1111₂
↓
F₁₆
1111₂ = 15₁₀ = F₁₆
DecimalBinaryHexadecimal
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F
5. Common Mistake

1111₂ is not the same as 1111₁₀.

Students sometimes read binary as if it were a denary number. This causes major mistakes in conversions.

⚠️ Common Mistake: 1111₂ means 8 + 4 + 2 + 1, not one thousand one hundred and eleven.
Figure 5.1
Correct Interpretation
1111₂
= 8 + 4 + 2 + 1
= 15₁₀