On and off switches in everyday things

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

On and off switches in everyday things

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A torch is switched on. Which digit shows this?
A 1
B 0
2. A light switch is flipped down so the light is off. Which digit shows this?
A 0
B 1
3. Which is the best reason a light switch can be written with 0 and 1?
A It can have ten different settings
B It has two states: off and on
4. A row of 4 LEDs is: on, off, on, on. How is it written?
A 1 1 0 1
B 1 0 1 1
5. The row 0 1 0 0 means three LEDs are off and one is on. Is this true?
A True
B False

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
10 AThe third LED is on, so it should be 1, not 0. The correct row is 1 0 1 1.
21 BThe switch, torch or LED is on
3A row of four LEDs where the first and third are on and the others are off CThe switch, torch or LED is off
4Three light switches in a row that are all turned off D0 means off, not on. A torch that is on should be written as 1.
5A torch that is switched on is written as 0 E0 0 0
6LEDs: on, off, on, on written as 1 0 0 1 F1 0 1 0

Definitions

0 = off, 1 = on

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
torch ← 1 IF torch = _ THEN display "The torch is on"
2.
lamp ← _ display "The lamp is off"
3.
// LED row: on, off, on, on LEDs ← [1, _, 1, 1]
4.
// kettle on, toaster off, fan on switches ← [1, 0, _]
5.
lightSwitch ← 0 lightSwitch ← _ // someone flips the switch on

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A # 0 = off, 1 = on
B light_switch = 2
C print(light_switch)
Question 2
A torch = 1
B print(torch)
C # The torch is off
Question 3
A leds = [1, 0, 1, 1
B print(leds)
C # LEDs 1, 3 and 4 are on
Question 4
A lamp = 1
B fan = 0
C print('lamp:' lamp)
Question 5
A # The TV is off
B tv = 1
C print('TV', tv)

Answer Key

On and off switches in everyday things
Section A: Quick Questions
Q1
A — 1
Q2
A — 0
Q3
B — It has two states: off and on
Q4
B — 1 0 1 1
Q5
A — True
Section B: Match the Pairs
Q1
0 → The switch, torch or LED is off
Q2
1 → The switch, torch or LED is on
Q3
A row of four LEDs where the first and third are on and the others are off → 1 0 1 0
Q4
Three light switches in a row that are all turned off → 0 0 0
Q5
A torch that is switched on is written as 0 → 0 means off, not on. A torch that is on should be written as 1.
Q6
LEDs: on, off, on, on written as 1 0 0 1 → The third LED is on, so it should be 1, not 0. The correct row is 1 0 1 1.
Section C: Definitions
Q1
0 = off, 1 = on — A switch has two states. We write 0 for off and 1 for on, so a row of switches or LEDs can be written as binary digits, like 1 0 1 1.
Section D: Fill in the Blanks
Q1
torch ← 1 IF torch = 1 THEN display "The torch is on"
Q2
lamp ← 0 display "The lamp is off"
Q3
// LED row: on, off, on, on LEDs ← [1, 0, 1, 1]
Q4
// kettle on, toaster off, fan on switches ← [1, 0, 1]
Q5
lightSwitch ← 0 lightSwitch ← 1 // someone flips the switch on
Section E: Spot the Error
Q1
B — A switch has only two states, so the value must be 0 (off) or 1 (on). 2 is not a valid state. It should be light_switch = 1 or 0.
Q2
A — The comment says the torch is off, and off is written as 0. The line should be torch = 0, not 1.
Q3
A — The list is missing its closing square bracket. The row of LEDs should be written leds = [1, 0, 1, 1].
Q4
C — There is a comma missing between the two things to print. It should be print('lamp:', lamp).
Q5
B — The comment says the TV is off, and off is 0. Writing 1 would mean the TV is on. It should be tv = 0.