---
title: "On or off"
subtitle: "Starting out · Numbers and switches · Lesson 3"
---

# On or off

**Name:** {{field-24}} **Date:** {{field-15}} **Class:** {{field-15}}

> **Key question:** Inside a computer there are billions of tiny switches, and each one can only be on or off. How can that store a number, or a letter?


:::teacher-note

**In one sentence:** Students flip dot cards as switches, write on as 1 and off as 0, list the patterns two and three switches make, and see that each switch doubles the patterns (AC9TDI6K04 node 1).

**Students should be able to say:** I can say what 1 and 0 mean for a switch. I can find all the patterns some switches make. I can say what happens to the patterns when I add a switch.

**Width:** the unmarked parts are the floor every student does (predict, run, investigate and make). Typical adds the modify practice; wider adds the real-world contexts. They add contexts, not difficulty. Students work in the online tutorial alongside this sheet.

:::


## Predict


:::keep-together

**One switch can be on or off: that's 2 patterns. How many different patterns can two switches make?**

☐ 1

☐ 2

☐ 3

☐ 4

My prediction, and why:

{{lines-3}}

:::


:::teacher-note

**What happens:** 4: off off, off on, on off and on on. All off is a pattern too.

:::


## Run

Try it on the board in the tutorial. Was your prediction right? What was different?

{{lines-2}}

## Worked example: three switches


:::keep-together

### Three switches

1. $00,\ 01,\ 10,\ 11$ — Two switches: 4 patterns.
2. $000,\ 001,\ 010,\ 011$ — A third switch, off, in front of each one.
3. $100,\ 101,\ 110,\ 111$ — The third switch on, in front of each one.
4. $4 + 4 = 8$ — Three switches: 8 patterns. Each switch you add doubles them.

Now: what does face up mean?

**A card is face up. What does the computer write for it?**

☐ On

☐ 0

☐ Up

☐ 1

:::


:::teacher-note

**Answer:** 1

On (face up) is 1. Off (face down) is 0.

:::


:::keep-together

### Find the mistake

**Sam counts the patterns for two switches. Click the line where it first goes wrong.**

```
 1  Sam has two switches.
 2  They can be on, on or on, off or off, on.
 3  Off, off is nothing, so it doesn't count.
 4  So two switches make 3 patterns.
```

Line: {{field-15}}

Why is it wrong?

{{lines-2}}

:::


:::teacher-note

**Answer:** line 3

Line 3: off, off is a pattern too. The computer uses it (it means 0), so two switches make 4 patterns.

:::


:::keep-together

### Three switches

**How many patterns can three switches make?**

Answer: {{field-15}}

:::


:::teacher-note

**Answer:** 8

Take the 4 patterns for two switches. The new switch can be off or on for each one: 4 + 4 = 8.

:::


:::typical

## Vary: add switches


**Three cards.** 

**On, off, on.** 

**Four switches.** 

Work in the tutorial. Plan first: what will you change, and how will you test it?

{{box-4}}

:::


## Switches


:::keep-together

### Read the pattern

**Four cards are face up, down, down, up. How does the computer write that?**

☐ 0110

☐ up down down up

☐ 2

☐ 1001

:::


:::teacher-note

**Answer:** 1001

Up is 1, down is 0: 1001.

:::


:::keep-together

### Five switches

**How many patterns can five switches make?**

Answer: {{field-15}}

:::


:::teacher-note

**Answer:** 32

2, 4, 8, 16, 32: double once for each switch.

:::


:::keep-together

### Why on and off

**Why are a computer's switches only on or off, not ten different settings?**

☐ Switches are cheaper than numbers

☐ On and off are easy to tell apart

☐ Ten settings would be too slow to type

☐ Computers can't count past 2

:::


:::teacher-note

**Answer:** On and off are easy to tell apart

On or off is hard to get wrong, even when the signal is weak. Lots of switches together make any number.

:::


## Make: a secret signal

Then: with your partner, make up a code where each pattern of three cards means something (8 messages). What would you choose?

Work in the tutorial. Plan first: what will you change, and how will you test it?

{{box-4}}

## Exit ticket

:::keep-together

**Write face down, face up, face up as 1s and 0s. How many patterns can those three switches make?**

{{lines-3}}

:::


:::teacher-note

**Answer:** 011; 8.

:::

