Encoding and decoding a word with a letter-number code

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

Encoding and decoding a word with a letter-number code

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Using A=1, B=2, C=3, D=4, how do you encode the word BAD?
A 2 1 4
B 1 2 4
2. Using A=1, B=2, C=3, D=4, what word does 3 1 4 decode to?
A CAD
B DAC
3. Which describes what it means to encode a word with a letter-number code?
A Swap each letter for its number
B Swap each number for its letter
4. With A=1, B=2, C=3, D=4, E=5, how do you encode the name ED?
A 4 5
B 5 4
5. A message is encoded as 2 1 4 0 3 1 4, where 0 means a space between words. Which is the decoded message (A=1, B=2, C=3, D=4)?
A BADCAD
B BAD CAD

Match the Pairs

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

Left columnRight column
1CAB = 3 1 2 AEncoding the word CAB by swapping each letter for its number when A=1, B=2 and C=3
22 1 3 = BAC BBAD = 2 1 4
3Encoding a name: swap each letter for its number, using A=1, B=2, C=3, D=4 and so on CThe numbers were put in order instead of being decoded one by one. 2 is B, 1 is A and 3 is C, so the word is BAC.
4Checking by decoding: turn the numbers back into letters to see if you get the original word DThe numbers are in the wrong order. A should be 1 and B should be 2, so CAB is 3 1 2, not 3 2 1.
5CAB = 3 2 1 EDecoding the numbers 2 1 3 by swapping each number back for its letter when A=1, B=2 and C=3
6A=1, B=2, C=3: 2 1 3 decodes to ABC F3 1 2 = CAB, so the code is right

Definitions

encode

Fill in the Blanks

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

1.
Key: A=1 B=2 C=3 D=4 E=5 encode("BAD") = 2 1 _
2.
Key: A=1 B=2 C=3 D=4 E=5 decode(3 1 4 5) = C A _ E
3.
Key: A=1 B=2 C=3 D=4 E=5 space=0 encode("A BE") = 1 _ 2 5
4.
Key: A=1 B=2 C=3 D=4 E=5 ______("CAB") = 3 1 2
5.
Key: A=1 B=2 C=3 D=4 E=5 encode("ACE") = 1 3 5 ______(1 3 5) = "ACE"

Spot the Error

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

Question 1
A Code: A=1, B=2, C=3, D=4
B B -> 3
C A -> 1
D D -> 4
E BAD = 2 1 4
Question 2
A Encode DAD with A=1, D=3
B D -> 4
C A -> 1
D D -> 4
E DAD = 4 1 4
Question 3
A Decode 3 1 2 (A=1, B=2, C=3)
B 3 -> B
C 1 -> A
D 2 -> B
E Message: CAB
Question 4
A Encode HI MOM, A=1 to Z=26
B HI -> 8 9
C MOM -> 13 15 14
D Put / between the words
E 8 9 / 13 15 13
Question 5
A Encode ZOE with A=1 to Z=26
B Z -> 25
C O -> 15
D E -> 5
E ZOE = 26 15 5

Answer Key

Encoding and decoding a word with a letter-number code
Section A: Quick Questions
Q1
A — 2 1 4
Q2
A — CAD
Q3
A — Swap each letter for its number
Q4
B — 5 4
Q5
B — BAD CAD
Section B: Match the Pairs
Q1
CAB = 3 1 2 → Encoding the word CAB by swapping each letter for its number when A=1, B=2 and C=3
Q2
2 1 3 = BAC → Decoding the numbers 2 1 3 by swapping each number back for its letter when A=1, B=2 and C=3
Q3
Encoding a name: swap each letter for its number, using A=1, B=2, C=3, D=4 and so on → BAD = 2 1 4
Q4
Checking by decoding: turn the numbers back into letters to see if you get the original word → 3 1 2 = CAB, so the code is right
Q5
CAB = 3 2 1 → The numbers are in the wrong order. A should be 1 and B should be 2, so CAB is 3 1 2, not 3 2 1.
Q6
A=1, B=2, C=3: 2 1 3 decodes to ABC → The numbers were put in order instead of being decoded one by one. 2 is B, 1 is A and 3 is C, so the word is BAC.
Section C: Definitions
Q1
encode — To encode a word, swap each letter for its number in the code, so with A=1, B=2 and C=3, CAB becomes 3 1 2. To decode it, swap each number back for its letter.
Section D: Fill in the Blanks
Q1
Key: A=1 B=2 C=3 D=4 E=5 encode("BAD") = 2 1 4
Q2
Key: A=1 B=2 C=3 D=4 E=5 decode(3 1 4 5) = C A D E
Q3
Key: A=1 B=2 C=3 D=4 E=5 space=0 encode("A BE") = 1 0 2 5
Q4
Key: A=1 B=2 C=3 D=4 E=5 encode("CAB") = 3 1 2
Q5
Key: A=1 B=2 C=3 D=4 E=5 encode("ACE") = 1 3 5 decode(1 3 5) = "ACE"
Section E: Spot the Error
Q1
B — In the code, B=2, not 3. Line 2 should be B -> 2, so that BAD encodes to 2 1 4.
Q2
A — The code says D=4, but line 1 says D=3. The later lines use 4, so line 1 should say D=4.
Q3
B — To decode, swap each number back to its letter. 3 is C, not B. Line 2 should be 3 -> C.
Q4
C — M is 13, O is 15 and M is 13 again. The last number should be 13, so line 3 should be MOM -> 13 15 13.
Q5
B — Z is the 26th letter, so Z=26, not 25. Line 2 should be Z -> 26.