Notes · Aptitude

Coding-Decoding

Short, exam-focused revision notes. Read a section, then test yourself with a quiz.

4 min read9 sections

Coding-Decoding

What this topic is about

A word or sentence is written in a secret code using a rule. You must find the rule and use it to code (or decode) another word.

Learn these first (they save the most time)

Letter positions (A = 1 … Z = 26):
A
B
C
D
E
F
G
H
I
J
K
L
M
1
2
3
4
5
6
7
8
9
10
11
12
13
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
14
15
16
17
18
19
20
21
22
23
24
25
26
💡
Memory trick "EJOTY": E = 5, J = 10, O = 15, T = 20, Y = 25. From these you can find any letter quickly (e.g. R = T − 2 = 18). Opposite letters add up to 27: A↔Z, B↔Y, C↔X, D↔W, E↔V… M↔N. Exam tip: write A to Z with numbers on your rough sheet as soon as the exam starts.

Question types at a glance

#
Type
Example
Key idea
1
Letter shifting
CAT → DBU
Each letter moves forward/back by a fixed number
2
Opposite letters
CAT → XZG
Each letter replaced by its opposite (sum 27)
3
Letters to numbers
CAT → 24
Add (or use) letter positions
4
Substitution
"sky" is called "sea"
Follow what each word is called
5
Sentence coding
"pit na som" = "I love you"
Common words have common codes

Type 1: Letter shifting

Idea: compare each letter of the word with its code letter and count how far it moved.
✏️
Solved example: If CAT is coded as DBU, how is DOG coded?
  1. C → D (+1), A → B (+1), T → U (+1). Rule: move every letter one step forward.
  1. D → E, O → P, G → H.
  1. Answer: EPH.
Practice: If BOOK is written as DQQM, how is PEN written?
Answer: Each letter moves +2 (B→D, O→Q, K→M). P→R, E→G, N→P → RGP.

Type 2: Opposite letters

Idea: if the shift is different for each letter, check whether each letter became its opposite (the two positions add up to 27).
✏️
Solved example: If CAT is coded as XZG, how is DOG coded?
  1. C (3) → X (24): 3 + 24 = 27. A (1) → Z (26): 27. T (20) → G (7): 27. Rule: opposite letter.
  1. D (4) → 27 − 4 = 23 = W. O (15) → 12 = L. G (7) → 20 = T.
  1. Answer: WLT.
Practice: Using the same rule, how is BOX coded?
Answer: B (2) → Y (25), O (15) → L (12), X (24) → C (3) → YLC.

Type 3: Letters to numbers

Idea: the code is often the sum of letter positions, or the positions written side by side.
✏️
Solved example: If CAT = 24, what is DOG?
  1. C + A + T = 3 + 1 + 20 = 24 ✔. Rule: add the positions.
  1. D + O + G = 4 + 15 + 7 = 26.
Practice: If BAT = 23, what is RAT?
Answer: B + A + T = 2 + 1 + 20 = 23 ✔. R + A + T = 18 + 1 + 20 = 39.

Type 4: Substitution

Idea: first answer the real question in plain words, then look up what that word is "called".
✏️
Solved example: If "sky" is called "sea", "sea" is called "water", and "water" is called "air", where does a fish live?
  1. Real answer: a fish lives in water.
  1. "Water" is called "air".
  1. Answer: air.
Trap: answering "water" or "sea". Always use the code word for the real answer.
Practice: If "pen" is called "book", "book" is called "bag", and "bag" is called "box", what do you write with?
Answer: You write with a pen, and "pen" is called "book".

Type 5: Sentence coding

Idea: a word that appears in two sentences has the same code in both. Match the common words with the common codes.
✏️
Solved example: "pit na som" means "I love you" and "na tok pit" means "you love dogs". What is the code for "I"?
  1. Common words: "love" and "you". Common codes: "pit" and "na".
  1. So "love" and "you" use up "pit" and "na" (in some order).
  1. In the first sentence, the only word left is "I" and the only code left is "som".
  1. Answer: I = som. (Similarly, dogs = tok.)
Practice: "ka ta re" means "good red apple" and "re mo ta" means "apple is red". What is the code for "good"?
Answer: Common words: red, apple. Common codes: ta, re. Left in the first sentence: good = ka.

Common mistakes

  • Assuming the same shift for every letter without checking all of them.
  • Counting letter positions on fingers (slow and error-prone). Learn EJOTY.
  • In substitution questions, answering with the real word instead of its code.
  • In sentence coding, trying to guess the order of common words; it usually can't be found and isn't needed.