Year 7 · Foundations · Part A: Storing information

Bits and bytes

In one line

A bit is one switch: 0 or 1. A byte is 8 bits. Every photo, song and game is measured by counting these.

1

Say what a bit is, and why one bit is one yes/no answer.

2

Work out how many patterns n bits make, and the biggest number they hold.

3

Explain why a byte is 8 bits, and climb up and down the units ladder (KB, MB, GB…).

4

Never mix up Mbps (internet speed, bits) and MB (file size, bytes) again.

BitOne binary digit: 0 or 1.
Byte8 bits. 256 patterns.
Nibble4 bits. Half a byte. One hex digit.
Kilo / kibi1,000 / 1,024.

The bit: one switch, one answer

Inside a computer there are billions of tiny switches. Each switch is either off or on. We write off as 0 and on as 1. One switch is called one bit.

Off 0 gap in the wire: no current On 1 wire joined: current flows
One bit is one switch. It can only be in one of two states, so it can only store one of two values.
  1. Where the name comes from. Binary digit → bit. Binary means "made of two".

  2. One bit = one yes/no answer. Is the light on? Is the box ticked? Is the pixel black? Each of those needs exactly one bit.

  3. One bit alone is not much. It can only say two things. To store anything bigger, a computer uses lots of bits side by side, and reads them as one pattern.

▶

Find my number with yes/no questions

I'm thinking of a number from 0 to 15. Each question halves what's left. Every answer is one bit: yes = 1, no = 0.

Your answers so far:
?Why?

Why did it always take exactly 4 questions? 16 numbers. Each yes/no answer cuts the list in half: 16 → 8 → 4 → 2 → 1. Four halvings, so four answers, so 4 bits. Your four answers, read left to right, are the number written in binary.

More bits = more patterns

Put bits side by side and read them together. Each extra bit doubles the number of different patterns you can make.

1 bit2 bits3 bits 0 1 00 01 10 11 000 001 010 011 100 101 110 111 21 bit 42 bits 83 bits
Every new bit takes the whole old list and writes it twice: once with a 0 in front (blue) and once with a 1 in front (orange). So the list doubles.
BitsEvery patternHow manyAs a sum
10, 122
200, 01, 10, 1142 × 2
3000 … 11182 × 2 × 2
40000 … 1111162 × 2 × 2 × 2
800000000 … 111111112562 multiplied by itself 8 times
?Why?

Why multiply, not add? Every pattern you already had can be followed by a 0 or a 1. Each old pattern becomes two new ones. "Each one becomes two" is what × 2 means.

e.g.Example

An old games console used 16-bit colour: 2¹⁶ = 65,536 colours. Modern screens use 24 bits: 2²⁴ = 16,777,216 colours. 8 more bits made 256 times as many.

The biggest number n bits can hold

If bits store a whole number, the smallest is 0 (all zeros). The biggest is all ones. But it is one less than the number of patterns. Here's why.

8 patterns, numbered from 0. The first one is used up by zero, so the last one is 8 − 1 = 7.
Same idea as a 3-digit car counter: 1,000 different readings, but the biggest is 999.
  1. 3 bits make 2³ = 8 patterns.

  2. Give each pattern a number, starting at 0: 000 = 0, 001 = 1 …

  3. Zero takes one of the 8 patterns. That leaves 7 patterns for 1, 2, 3, 4, 5, 6, 7.

  4. So the biggest is 8 − 1 = 7, written 111.

  5. Same for a byte: 2⁸ = 256 patterns, so it counts from 0 to 255.

!Watch out

"How many values?" → 2ⁿ (256 for a byte). "What is the biggest value?" → 2ⁿ − 1 (255). Read the question twice: they are different numbers.

The byte: why 8 bits?

A byte is 8 bits. Nobody was forced to pick 8. People chose it, and it won for four good reasons.

nibble (4 bits) = 1 hex digit nibble (4 bits) = 1 hex digit 1 byte = 8 bits
  1. It fits one letter. English text needs about 100 symbols (A–Z, a–z, 0–9, punctuation). 7 bits give 128 patterns; 8 bits give 256, with room to spare.

  2. 8 is a power of 2. 8 = 2 × 2 × 2. Computers count in twos, so 8 joins into 16, 32, 64 cleanly.

  3. It splits exactly in half. Two groups of 4 bits. A group of 4 is a nibble, and one nibble is exactly one hexadecimal digit (Year 8).

  4. IBM made it the standard. IBM's System/360 computers (1964) used 8-bit bytes. They sold so well that everyone else followed.

e.g.Fun fact

Werner Buchholz at IBM made up the word in 1956: a "bite-sized" chunk of bits. He spelt it with a y so nobody would misread it as "bit".

Bigger units: the ladder

Files are huge, so we group bytes into bigger units, like grams and kilograms. Each rung of the ladder is 1,000 times the one below it.

Climb the ladder

★Remember

Going to a smaller unit: multiply (you need more of them). Going to a bigger unit: divide. Bytes → bits is always × 8, not × 1000.

?Why?

Why multiply when going down? Money: 3 euros = 300 cents. Cents are smaller, so you need more of them to make the same amount. More = bigger number = multiply.

1000 or 1024?

There are two rulers. Kilo means 1,000 (like a kilometre). But computers count in powers of 2, and the nearest power of 2 to 1,000 is 2¹⁰ = 1,024. In 1998 the 1,024 versions got their own names: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB).

Decimal (×1000)Binary (×1024)Difference
1 KB = 1,000 bytes1 KiB = 1,024 bytes2.4%
1 MB = 1,000,000 bytes1 MiB = 1,048,576 bytes4.9%
1 GB = 1,000,000,000 bytes1 GiB = 1,073,741,824 bytes7.4%
1 TB = 10¹² bytes1 TiB = 1,099,511,627,776 bytes10%
?Why?

Why does a "1 TB" drive show about 931 GB on Windows? The maker counts 1,000,000,000,000 bytes. Windows divides by 1,024 three times (≈ 931) but still writes "GB". Nothing is missing. Same amount, different ruler.

★Exams

AQA expects both (kilo = 1000, kibi = 1024). OCR accepts either. 1000 is quicker by hand, so use it unless the question says otherwise.

Bits vs bytes in internet speeds

File sizes are counted in bytes (big B: MB). Internet speeds are counted in bits per second (small b: Mbps). One letter's case changes the number by 8.

100 Mbpsmegabits per second ÷ 8 12.5 MB/smegabytes per second 8 bitsmake 1 byte,so 8 times fewer Small b = bits · Big B = bytes
?Why?

Why do internet companies use bits? A network sends data one bit at a time down the wire, so bits per second is the natural measure for the wire. It also makes the number on the advert 8 times bigger.

e.g.Example

A 4 GB game on 100 Mbps: 4,000 MB × 8 = 32,000 megabits. 32,000 ÷ 100 = 320 seconds, about 5 minutes 20 seconds at best.

A sense of scale

Knowing roughly how big things are lets you spot silly answers. If you work out a photo is 5 GB, something went wrong.

ThingRough size
One letter in plain text1 byte
A page of plain textabout 2 KB
A phone photo2–5 MB
A 3-minute song (MP3)3–4 MB
An hour of HD video1–3 GB
A big modern game50–150 GB
▶

How many fit?

About

Common mix-ups

These are the mistakes almost everyone makes at first. Read the left side, then the right.

People think

A byte is 10 bits, or 1,000 bits.

Actually

A byte is exactly 8 bits. Kilo = 1,000 is for the next step up.

People think

8 bits can store numbers up to 256.

Actually

256 patterns, but 0 uses one, so the biggest is 255.

People think

100 Mbps downloads 100 MB every second.

Actually

Speeds are in bits. 100 ÷ 8 = 12.5 MB per second at most.

People think

Going KB → bytes you divide, because bytes are "smaller".

Actually

Smaller unit means you need more of them: multiply.

People think

Adding 1 bit adds 1 more pattern.

Actually

Adding 1 bit doubles the patterns.

Check yourself

Quick questions first. Then endless practice: a wrong answer shows you the working, step by step.

[ {"q":"How many patterns can 3 bits make?","o":["3","6","8"],"a":2,"w":"2 × 2 × 2 = 8. Each bit doubles the patterns."}, {"q":"What is the biggest number a byte can hold?","o":["256","255","128"],"a":1,"w":"256 patterns, and one of them is 0, so 0 to 255."}, {"q":"A 100 Mbps connection downloads at most…","o":["100 MB per second","12.5 MB per second","800 MB per second"],"a":1,"w":"Speeds are in bits. Divide by 8 to get bytes."}, {"q":"5 KB into bytes (kilo = 1000). You should…","o":["Multiply by 1000","Divide by 1000","Multiply by 8"],"a":0,"w":"Bytes are smaller, so you need more of them: multiply. 5 KB = 5,000 bytes."}, {"q":"Why is a byte 8 bits?","o":["It was chosen: it fits one character and splits into two 4-bit halves","Physics says so","8 is the biggest number a switch can hold"],"a":0,"w":"People chose 8. It fits a character, is a power of 2, splits into nibbles, and IBM made it standard."}, {"q":"A '1 TB' drive shows 931 GB in Windows because…","o":["Some space is broken","Windows divides by 1,024 but still writes GB","The drive is fake"],"a":1,"w":"Same number of bytes, measured with a different ruler."} ]