AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Ones and zeros

Week 6 · Unit 3: Computer storage · 3 lessons
1

Switches, ones and zeros

Computing 5: Unit 3, pp. 34–43
GoalExplain that a computer stores everything with switches that are on or off, and that 1 and 0 stand for on and off.
New words
binary · a number system that uses only two digits, 0 and 1digit · one of the symbols used to write numbers, such as 0 or 1switch · a tiny part that can be on or offpattern · an arrangement of 0s and 1s, for example 1011
Explanation

A computer stores text, pictures, sound, video and games. Inside it are billions of tiny switches, and each switch is either on or off. Like a light, it has no other state. We write on as 1 and off as 0. The binary number system uses only these two digits. Every file in a computer is a long pattern of 1s and 0s. With one switch there are 2 patterns. Each extra switch doubles the number of patterns: 2 switches make 4 patterns, 3 switches make 8, and so on. That is how a small set of switches can store a very large amount of data.

10110
Worked examples
1101
Four lamps are on, on, off, on. We write 1 for on and 0 for off, so the code is 1101.
SwitchesPatternsAll the patterns
120, 1
2400, 01, 10, 11
38000, 001, 010, 011, 100, 101, 110, 111
Each extra switch doubles the patterns. Two switches make 4 patterns and three switches make 2 × 2 × 2 = 8 patterns.
1111100100001000010000100
A picture can be stored as binary too. Think of a grid of squares: a black square is 1 and a white square is 0. Each row has its own code, and the rows together are the picture of a letter T.
Class activity

Coin switches (3 coins, then 4). Heads is 1 and tails is 0. Put three coins in a row and write down the pattern, for example 101. Turn coins over to find every different pattern. Did you find 8? Then try four coins. Before you start, predict how many patterns there will be. Check by listing them in order. What do you notice when each extra coin is added?

Practice
1
Write the binary code for these lamps: on, off, off, on, on.
2
How many patterns can 4 switches make? Show how you know.
3
Why do computers use only two digits, 0 and 1, and not ten digits?
4
Complete the list of all the patterns for 3 switches: 000, 001, 010, 011, ?, ?, ?, ?.
12345678
000001010011????