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.

Key Concept: Units of Data
  • 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.)

Did You Know? A modern smartphone processor contains around 15 billion transistors, each one acting as a tiny switch that is either on or off. The very first microprocessor, the Intel 4004 from 1971, had just 2,300 transistors. That means your phone has roughly 6.5 million times more switches than the chip that kickstarted the personal computing revolution!

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:

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):

1286432168421
2726252423222120

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.

1286432168421
11010110

Add together the place values where there is a 1: 128 + 64 + 16 + 4 + 2 = 214

Example 2: Convert binary 10011101 to denary.

1286432168421
10011101

128 + 16 + 8 + 4 + 1 = 157

Example 3: Convert binary 01100100 to denary.

1286432168421
01100100

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:

  1. 128? No (128 > 75). Write 0.
  2. 64? Yes (75 − 64 = 11 remaining). Write 1.
  3. 32? No (32 > 11). Write 0.
  4. 16? No (16 > 11). Write 0.
  5. 8? Yes (11 − 8 = 3 remaining). Write 1.
  6. 4? No (4 > 3). Write 0.
  7. 2? Yes (3 − 2 = 1 remaining). Write 1.
  8. 1? Yes (1 − 1 = 0 remaining). Write 1.
1286432168421
01001011

75 in binary = 01001011

Example 2: Convert denary 193 to binary.

  1. 128? Yes (193 − 128 = 65 remaining). Write 1.
  2. 64? Yes (65 − 64 = 1 remaining). Write 1.
  3. 32? No (32 > 1). Write 0.
  4. 16? No (16 > 1). Write 0.
  5. 8? No (8 > 1). Write 0.
  6. 4? No (4 > 1). Write 0.
  7. 2? No (2 > 1). Write 0.
  8. 1? Yes (1 − 1 = 0 remaining). Write 1.
1286432168421
11000001

193 in binary = 11000001

Example 3: Convert denary 42 to binary.

  1. 128? No (128 > 42). Write 0.
  2. 64? No (64 > 42). Write 0.
  3. 32? Yes (42 − 32 = 10 remaining). Write 1.
  4. 16? No (16 > 10). Write 0.
  5. 8? Yes (10 − 8 = 2 remaining). Write 1.
  6. 4? No (4 > 2). Write 0.
  7. 2? Yes (2 − 2 = 0 remaining). Write 1.
  8. 1? No (0 remaining). Write 0.
1286432168421
00101010

42 in binary = 00101010

Try This: Before moving on, grab a piece of paper and try converting 99 to binary using the subtraction method, and then convert 11110000 to denary. Check your answers: 99 = 01100011 and 11110000 = 240.

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.

Loading...
Score: 0 / 0

Interactive Exercise 2: Denary to Binary Converter

A random denary number (0–255) will appear below. Convert it to its 8-bit binary equivalent.

Loading...
Score: 0 / 0

Test Yourself

Click on each question to reveal the answer. Try to work it out yourself first!

Q1: Convert the binary number 10110011 to denary.

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)

Q2: Convert the denary number 200 to 8-bit binary.

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.

Q3: What is the maximum value that can be stored in 8-bit unsigned binary?

Answer: 255.

11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. This is because 28 − 1 = 255.

Q4: How many different values can be represented with n bits?

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.

Q5: Why do computers use binary rather than denary?

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.

Q6: Convert the binary number 01011010 to denary.

Answer: 0 + 64 + 0 + 16 + 8 + 0 + 2 + 0 = 90.

Q7: Convert the denary number 137 to 8-bit binary.

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:

TermDefinition
BitThe smallest unit of data — a single 0 or 1 (binary digit).
ByteA group of 8 bits. Can represent values from 0 to 255 in unsigned binary.
NibbleA group of 4 bits (half a byte). Can represent values from 0 to 15.
BinaryBase-2 number system using only the digits 0 and 1. The number system used internally by all computers.
DenaryBase-10 number system (also called decimal) using digits 0–9. The system humans use in everyday life.
Place ValueThe 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 BinaryA binary representation that only stores positive whole numbers (no negative values). With 8 bits, the range is 0–255.
Data UnitA standard measurement of data size — from the tiny bit, through bytes, kilobytes, megabytes, gigabytes, and terabytes.

Exam Tips

Exam Tip 1: Always Show Your Working Even if you get the final answer wrong, you can pick up method marks by showing each step clearly. For binary-to-denary conversions, draw the place value table and write the binary digits underneath. For denary-to-binary, show each subtraction step. Examiners love to see the place value headings 128, 64, 32, 16, 8, 4, 2, 1 written out.
Exam Tip 2: Use the Place Value Table Every Time The fastest and most reliable way to convert in either direction is to write out the 8-bit place value table: 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1. For binary to denary, fill in the bits and add up the 1s. For denary to binary, subtract from left to right. Do this on every question — it only takes a few seconds and prevents silly mistakes.
Exam Tip 3: Watch Out for Common Mistakes
  • 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.
Exam Tip 4: Remember the Powers of 2 Memorise the key powers of 2. They come up constantly: 20=1, 21=2, 22=4, 23=8, 24=16, 25=32, 26=64, 27=128, 28=256, 210=1024. Knowing these off by heart will speed up every conversion and help you answer questions about how many values n bits can represent.

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