πŸ’Ύ
πŸ’» Technology ⏱ 3 min read

How Computers Store Numbers and Text

Learn how computers use binary code to store and represent all the numbers and text you see on screen.

Age 10–13
KS4 Computer Science Ages 11-14
Reading level: |

What is Binary?

Everything on your computer β€” every number, every letter, every image β€” is ultimately stored as binary code. Binary is a language that uses only two symbols: 0 and 1. These are called bits (short for "binary digits"). Your computer's processor understands binary because it uses electrical signals: a 0 represents "off" and a 1 represents "on".

Think of it like light switches. A switch is either off (0) or on (1). Your computer has billions of tiny switches, and by flipping them in different patterns, it can represent any information.

How Numbers are Stored

Numbers are converted into binary using the base-2 system. In everyday life, we use base-10 (0–9 digits), but computers count in powers of 2. For example, the number 5 becomes 101 in binary. Each position in a binary number represents a power of 2: the first position is 1, the second is 2, the third is 4, the fourth is 8, and so on.

A group of 8 bits is called a byte. One byte can store any number from 0 to 255. For bigger numbers, computers use multiple bytes.

How Text is Stored

Your computer stores text using a special system called ASCII (American Standard Code for Information Interchange) or the newer Unicode standard. Each letter, number, and symbol has a unique binary code assigned to it.

Think of it like a code book. The letter "A" always has the same code (01000001 in ASCII), just like how a secret spy code might always use the same code for the letter "A".

When you type the word "HI" on your keyboard, the computer converts each letter into its binary equivalent and stores them next to each other. When your screen displays the text, the computer reverses the process and shows you the letters again.

Why Binary Works So Well

Binary is perfect for computers because electrical circuits naturally work with two states: on or off. This makes binary extremely reliable and efficient. Your computer can process millions of these on/off signals every second, allowing it to handle vast amounts of data incredibly quickly.

Test yourself 🧠

This quiz is calibrated for KS4 Computer Science.