---
title: "Letters are numbers"
subtitle: "Starting out · Numbers and switches · Lesson 1"
---

# Letters are numbers

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

> **Key question:** A computer can only store numbers. So how does your phone keep a text message?


:::teacher-note

**In one sentence:** Students type words and read the numbers a computer stores for them, find that capitals go up in order from A = 65, that small letters, spaces and digits have codes too, then spell a word by setting its codes (AC9TDI6K03 node 1).

**Students should be able to say:** I can say how a word is stored as numbers. I can find the number for a letter by counting on from A. I can turn a list of numbers back into a word.

**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

**A computer stores capital A as 65, B as 66 and C as 67. What number does it store for D?**

☐ 68

☐ 4

☐ 69

☐ D can't be a number

My prediction, and why:

{{lines-3}}

:::


:::teacher-note

**What happens:** 68. The codes go up by one, in alphabet order, starting from A = 65.

:::


## Run

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

{{lines-2}}

## Worked example: a word as numbers


:::keep-together

### CAT

1. $\text{C A T}$ — The word, one letter at a time.
2. $\text{C} \to 67$ — A is 65, B is 66, so C is 67.
3. $\text{A} \to 65$ — A is where the capitals start.
4. $\text{T} \to 84$ — T is 19 letters after A: 65 + 19 = 84.
5. $67,\ 65,\ 84$ — That list of numbers is what the computer stores for CAT.

Now: is small a the same as A?

**Small a and capital A: are they stored as the same number?**

☐ Small letters aren't stored

☐ Yes: both are 65

☐ Small a is 65 + 1 = 66

☐ No: small a has its own code, 97

:::


:::teacher-note

**Answer:** No: small a has its own code, 97

Capitals start at 65 and small letters start at 97. The computer treats them as different characters.

:::


:::keep-together

### Find the mistake

**Sam works out how C is stored. Click the line where it first goes wrong.**

```
 1  Sam wants to know how the computer stores the letter C.
 2  C is the 3rd letter of the alphabet.
 3  So the computer stores C as 3.
 4  And A is stored as 1.
```

Line: {{field-15}}

Why is it wrong?

{{lines-2}}

:::


:::teacher-note

**Answer:** line 3

Line 3: C's code isn't its place in the alphabet. The codes start at A = 65, so C is 67.

:::


:::typical

## Vary: other characters


**A space.** 

**Small letters.** 

**The digit 7.** 

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

{{box-4}}

:::


## Codes


:::keep-together

### E

**A is 65. What number is E?**

Answer: {{field-15}}

:::


:::teacher-note

**Answer:** 69

A, B, C, D, E: count on four from 65.

:::


:::keep-together

### Read it back

**Your friend's phone receives 72, 73. What does it show?**

☐ GH

☐ HI

☐ hi

☐ 72 73

:::


:::teacher-note

**Answer:** HI

72 is H and 73 is I.

:::


:::keep-together

### Count them

**How many numbers does the computer store for the message GO HOME?**

Answer: {{field-15}}

:::


:::teacher-note

**Answer:** 7

Six letters and one space: seven characters, seven numbers.

:::


## Make: spell a word

Then: write your name as codes, and swap with a friend. Can they read it?

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

{{box-4}}

## Exit ticket

:::keep-together

**What numbers does the computer store for BAD?**

{{lines-3}}

:::


:::teacher-note

**Answer:** 66, 65, 68.

:::

