Encoding and decoding a word with a letter-number code
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.
Understanding Encoding and decoding a word with a letter-number code in ACARA Digital Technologies Years 5–6
What it does: B is 2, A is 1 and D is 4, so the name BAD is encoded as 2 1 4. Decoding 3 1 2 gives C, A, B. This matches the original word CAB, so the encoding was correct. Swap each letter for its number: B is 2, A is 1 and D is 4, so BAD becomes 2 1 4. Encoding turns letters into numbers. Swapping numbers back into letters is decoding. E is 5 and D is 4, and the order of the letters stays the same, so ED becomes 5 4. The 0 stands for a space, so the message has two words: BAD and CAD.
Common mistakes: In the code, B=2, not 3. Line 2 should be B -> 2, so that BAD encodes to 2 1 4. The code says D=4, but line 1 says D=3. The later lines use 4, so line 1 should say D=4.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 73–84) and word search (Modules 73–104).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
encodeFill in the Blanks
Spot the Error
Student with a class code? Join your class →