Everything Is Numbers
Here is something that might surprise you: your computer does not understand words, pictures, videos, or music. It does not understand English, emojis, or the colour red. Deep down, everything inside a computer is stored as numbers — specifically, as patterns of 0s and 1s.
This is because computers are built from billions of tiny electronic switches called transistors. Each transistor can be in one of two states: on (represented by 1) or off (represented by 0). A single 0 or 1 is called a bit (short for “binary digit”), and it is the smallest unit of data in computing.
Think of it like a light switch. One switch can only tell you “yes” or “no.” But line up eight switches and suddenly you can represent 256 different combinations — enough for every letter, digit, and punctuation mark you would ever need. Line up billions of switches and you can store entire movies, games, and operating systems. That is exactly what a modern computer does.
So how does a computer use just 0s and 1s to represent a photo of your cat, your favourite song, or this webpage? It all starts with understanding number systems.
- 1 bit = a single 0 or 1
- 4 bits = 1 nibble
- 8 bits = 1 byte
- 1,000 bytes = 1 kilobyte (KB)
- 1,000 KB = 1 megabyte (MB)
- 1,000 MB = 1 gigabyte (GB)
- 1,000 GB = 1 terabyte (TB)
(Note: technically, computers use 1,024 rather than 1,000, but most exam boards accept either.)
Number Systems Explained
Denary (Base 10)
This is the number system you use every day. It has 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Each column is worth 10 times more than the one to its right. We call it “base 10” because there are 10 possible digits in each position.
For example, the number 345 means:
- 3 hundreds (3 × 100)
- 4 tens (4 × 10)
- 5 ones (5 × 1)
This is so natural to you that you never think about it — but it is the key to understanding every other number system.
Binary (Base 2)
Binary has only 2 digits: 0 and 1. Each column is worth 2 times more than the one to its right. This is the language computers speak natively, because each binary digit maps perfectly to a transistor being off (0) or on (1).
Binary place values (8-bit):
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |
With 8 bits (one byte), you can represent any whole number from 0 (00000000) to 255 (11111111). That gives you 256 different values in total.
Binary to Denary Conversions
To convert from binary to denary, write the binary digits under the place value headings and add together all the place values where there is a 1.
Example 1: Convert binary 11010110 to denary.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
Add together the place values where there is a 1: 128 + 64 + 16 + 4 + 2 = 214
Example 2: Convert binary 10011101 to denary.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 |
128 + 16 + 8 + 4 + 1 = 157
Example 3: Convert binary 01100100 to denary.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
64 + 32 + 4 = 100
Denary to Binary Conversions
To convert from denary to binary, use the subtraction method: start with the largest place value (128) and work your way down. If the place value fits into your remaining number, write a 1 and subtract it. If it does not fit, write a 0 and move on.
Example 1: Convert denary 75 to binary.
Start with 75 and work through each place value:
- 128? No (128 > 75). Write 0.
- 64? Yes (75 − 64 = 11 remaining). Write 1.
- 32? No (32 > 11). Write 0.
- 16? No (16 > 11). Write 0.
- 8? Yes (11 − 8 = 3 remaining). Write 1.
- 4? No (4 > 3). Write 0.
- 2? Yes (3 − 2 = 1 remaining). Write 1.
- 1? Yes (1 − 1 = 0 remaining). Write 1.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 |
75 in binary = 01001011
Example 2: Convert denary 193 to binary.
- 128? Yes (193 − 128 = 65 remaining). Write 1.
- 64? Yes (65 − 64 = 1 remaining). Write 1.
- 32? No (32 > 1). Write 0.
- 16? No (16 > 1). Write 0.
- 8? No (8 > 1). Write 0.
- 4? No (4 > 1). Write 0.
- 2? No (2 > 1). Write 0.
- 1? Yes (1 − 1 = 0 remaining). Write 1.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
193 in binary = 11000001
Example 3: Convert denary 42 to binary.
- 128? No (128 > 42). Write 0.
- 64? No (64 > 42). Write 0.
- 32? Yes (42 − 32 = 10 remaining). Write 1.
- 16? No (16 > 10). Write 0.
- 8? Yes (10 − 8 = 2 remaining). Write 1.
- 4? No (4 > 2). Write 0.
- 2? Yes (2 − 2 = 0 remaining). Write 1.
- 1? No (0 remaining). Write 0.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
42 in binary = 00101010
Interactive Exercise 1: Binary to Denary Converter
A random 8-bit binary number will appear below. Work out its denary (base 10) value and type your answer.
Interactive Exercise 2: Denary to Binary Converter
A random denary number (0–255) will appear below. Convert it to its 8-bit binary equivalent.
Test Yourself
Click on each question to reveal the answer. Try to work it out yourself first!
Answer: Place values: 128 + 0 + 32 + 16 + 0 + 0 + 2 + 1 = 179.
(128=1, 64=0, 32=1, 16=1, 8=0, 4=0, 2=1, 1=1)
Answer: 128 fits (200−128=72). 64 fits (72−64=8). 32 no. 16 no. 8 fits (8−8=0). 4 no. 2 no. 1 no.
Binary: 11001000.
Answer: 255.
11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. This is because 28 − 1 = 255.
Answer: 2n values.
For example: 1 bit = 2 values, 2 bits = 4 values, 3 bits = 8 values, 8 bits = 256 values, 16 bits = 65,536 values.
Answer: Computers are built from transistors, which are tiny electronic switches that can only be in two states: on (1) or off (0). Binary maps perfectly to these two states. It would be extremely difficult and unreliable to build circuits that distinguish between 10 different voltage levels (for denary), but distinguishing between “on” and “off” is simple and robust.
Answer: 0 + 64 + 0 + 16 + 8 + 0 + 2 + 0 = 90.
Answer: 128 fits (137−128=9). 64 no. 32 no. 16 no. 8 fits (9−8=1). 4 no. 2 no. 1 fits (1−1=0).
Binary: 10001001.
Key Vocabulary
Make sure you know all of these terms for your exam:
| Term | Definition |
|---|---|
| Bit | The smallest unit of data — a single 0 or 1 (binary digit). |
| Byte | A group of 8 bits. Can represent values from 0 to 255 in unsigned binary. |
| Nibble | A group of 4 bits (half a byte). Can represent values from 0 to 15. |
| Binary | Base-2 number system using only the digits 0 and 1. The number system used internally by all computers. |
| Denary | Base-10 number system (also called decimal) using digits 0–9. The system humans use in everyday life. |
| Place Value | The value of a digit based on its position in a number. In binary, place values double from right to left: 1, 2, 4, 8, 16, 32, 64, 128. |
| Unsigned Binary | A binary representation that only stores positive whole numbers (no negative values). With 8 bits, the range is 0–255. |
| Data Unit | A standard measurement of data size — from the tiny bit, through bytes, kilobytes, megabytes, gigabytes, and terabytes. |
Exam Tips
- Forgetting leading zeros: If a question asks for an “8-bit binary number,” always give all 8 digits. The number 42 should be written as 00101010, not 101010.
- Confusing binary and denary: The binary number 1000 is NOT one thousand — it is the denary number 8.
- Place value order: The largest place value (128) is on the left. Students sometimes write their bits in the wrong order.
Past Paper Questions
Try these exam-style questions, then click to reveal the mark scheme answer.
Convert the binary number 11001010 to: (a) denary (b) hexadecimal 3 marks
Mark scheme:
(a) Denary:
128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 = 202 (2 marks)
(b) Hexadecimal:
Split into nibbles: 1100 = C, 1010 = A → CA (1 mark)
Explain why computers use binary to represent data. 2 marks
Mark scheme:
- Computers are made of electronic switches/transistors that can only be in two states: on or off (1)
- Binary (0 and 1) maps directly to these two states, making it the simplest and most reliable way to represent and process data electronically (1)
Convert the denary number 178 to an 8-bit binary number. Show your working. 2 marks
Mark scheme:
178 − 128 = 50, 50 − 32 = 18, 18 − 16 = 2, 2 − 2 = 0 (1 mark for working)
Answer: 10110010 (1 mark)
Why Binary Matters
Understanding binary is not just an exam topic — it is the foundation of everything that happens inside a computer. Every file you open, every game you play, every message you send is ultimately a sequence of 0s and 1s being processed at incredible speed.
The skills you have practised on this page — converting between number systems, understanding place values, and breaking problems into systematic steps — are transferable skills that appear throughout computer science. Binary addition, hexadecimal, character encoding, and image representation all build directly on the foundations covered here.
When you move on to the next topic (binary addition), you will see how computers perform arithmetic using nothing but 0s and 1s. For now, make sure you are confident converting in both directions — the interactive exercises above are a great way to build speed and accuracy.
Interactive Activities
- SQL Query Challenges — 10 interactive challenges writing SELECT, WHERE and filtering queries on a products database
Video Resources
External Resources
- Binary Bonanza — A fun interactive game to practise binary conversions
- Cisco Binary Game — Race against the clock to convert binary numbers
- BBC Bitesize — Edexcel GCSE Computer Science — Comprehensive coverage of data representation topics
- GCSE Topic 2: Data Representation — Full Edexcel specification coverage with interactive binary tools