5.3 Coding & Decoding

Key Takeaways

  • Letter coding shifts each letter by a fixed rule — forward (+n), backward (−n), or skip (every nth letter) — and decoding reverses that rule.
  • In number coding, letters are replaced by their alphabet positions (A=1…Z=26) and the code is built by addition, multiplication, or reversal of those positions.
  • Substitution coding maps whole words to symbols or other words; the key is to extract the mapping from the examples given, not to memorise any fixed dictionary.
  • Mixed coding combines a letter shift with a position reversal or a number substitution — solve it in two stages: undo the shift, then undo the rearrangement.
  • Always decode by applying the *inverse* of the coding operation: if the code shifts +3, you shift −3 to recover the original.
Last updated: August 2026

Why Coding/Decoding Matters

Expect 4–6 coding items in the 30-question Reasoning section. They are formulaic: once you classify the code type, the steps are mechanical. The marks come from speed, and speed comes from not panicking when the code looks strange at first glance.

Type 1 — Letter Shift Coding (Caesar Style)

A fixed number is added to (or subtracted from) each letter's position.

Worked example. If CAT is coded as FDW, how is DOG coded?

  • C(3) → F(6): +3. A(1) → D(4): +3. T(20) → W(23): +3. Rule: shift each letter forward by 3.
  • Apply to DOG: D(4) → G(7), O(15) → R(18), G(7) → J(10).
  • Answer: GRJ.

Decoding example. If FDW is the code, what was the original word?

  • Reverse the shift: F(6) − 3 = C(3), D(4) − 3 = A(1), W(23) − 3 = T(20) → CAT.

The lesson: when decoding, always apply the inverse of the coding operation. If the code shifted forward by +3, you shift backward by −3.

Type 2 — Number Coding

Letters are converted to positions and combined arithmetically.

Worked example. If CAT is coded as 24, how is DOG coded?

  • C=3, A=1, T=20 → 3 + 1 + 20 = 24. Rule: sum of letter positions.
  • DOG: D=4, O=15, G=7 → 4 + 15 + 7 = 26.

Worked example (product code). If AB is coded as 2, how is CD coded?

  • A=1, B=2 → 1 × 2 = 2. Rule: product of positions.
  • CD: 3 × 4 = 12.

Type 3 — Substitution Coding

A word is replaced by another word or symbol according to a mapping given in the question.

Worked example. In a code, red means go, green means stop, and yellow means wait. What should you do at a green signal?

  • The code says green means stop — so the answer is stop, regardless of real-world traffic rules.

These questions test your ability to override prior knowledge with the supplied mapping.

Type 4 — Mixed Coding

A letter shift is combined with a positional operation (reverse, swap, or rotate).

Worked example. If BOOK is coded as CPPL, what is LINE coded as?

  • B→C (+1), O→P (+1), O→P (+1), K→L (+1). Rule: +1 to each letter.
  • LINE: L→M, I→J, N→O, E→F.
  • Answer: MJOF.

Worked example with reverse then shift. If LION is coded as PQKN, what is TIGER coded as?

  • Reverse LIONNOIL. Then shift +2: N→P, O→Q, I→K, L→N → PQKN. Rule: reverse, then +2 each letter.
  • Apply to TIGER: reverse → REGIT. Shift +2: R→T, E→G, G→I, I→K, T→V → TGIKV.

Type 5 — Backward (Reverse-Shift) Coding

A code may subtract a fixed number from each letter position rather than add.

Worked example. If ZOO is coded as WLL, what is CAT coded as?

  • Z(26) → W(23): −3. O(15) → L(12): −3. O(15) → L(12): −3. Rule: shift each letter backward by 3.
  • Apply to CAT: C(3) − 3 = 0 → 0 + 26 = 26 = Z (wrap-around), A(1) − 3 = −2 → −2 + 26 = 24 = X (wrap), T(20) − 3 = 17 = Q.
  • Answer: ZXQ.

Note the wrap-around: when a position would fall below 1, add 26 to bring it back into range. C(3) − 3 = 0, and 0 + 26 = 26, which is Z.

Type 6 — Skip Coding

Each letter is replaced by the one n positions ahead — a Caesar shift by n where n is larger than 1.

Worked example. If A is coded as C, B as D, C as E, the rule is +2 (skip one letter between). Then FOX → F+2=H, O+2=Q, X+2=Z → HQZ.

Skip coding is just letter-shift coding with a larger n; the method is identical. Read off the distance between the first plain letter and the first coded letter — that distance is n.

Number-to-Letter Decoding

Sometimes a numeric code must be decoded back into letters.

Worked example. The code 8, 5, 12, 12, 15 decodes to which word?

  • 8 = H, 5 = E, 12 = L, 12 = L, 15 = O → HELLO.

This is a straight position-to-letter mapping. Keep the alphabet positions memorised so you can do this without counting on your fingers — RRB time pressure does not allow finger-counting.

Worked Example — Non-Uniform Per-Letter Shifts

Some codes use a different shift at each position, drawn from a fixed sequence.

Worked example. If SHIP is coded as VJSL, what is BOAT coded as?

  • S(19) → V(22): +3. H(8) → J(10): +2. I(9) → S(19): +10. P(16) → L(12): −4 (or +22 with wrap-around).
  • The shifts are not uniform, so the rule is not a simple Caesar shift. Treat it as a per-position shift sequence: +3, +2, +10, −4.
  • Apply the same sequence to BOAT: B(2) + 3 = E(5), O(15) + 2 = Q(17), A(1) + 10 = K(11), T(20) − 4 = P(16) → EQKP.

The lesson: when no uniform rule fits the example, record the per-letter shift sequence from the example and apply that same sequence to the new word.

The Decoding Algorithm

Loading diagram...
Decoding Decision Flow for Coding/Decoding Questions

Exam Scenarios and Traps

Trap 1 — Direction of shift. A code that adds 3 to encode requires you to subtract 3 to decode. Candidates under time pressure often apply the same direction both ways. Always invert.

Trap 2 — Letter wrap-around. When shifting forward past Z, wrap to A. ZYX shifted +3 becomes CBA (Z→C, Y→B, X→A). Forgetting the wrap produces impossible letters.

Trap 3 — Inconsistent per-position shifts. Some codes use a different shift per position. Verify the shift for every letter before applying the rule — do not assume uniformity from the first letter alone.

Trap 4 — Reverse coding. A code may reverse the word first and then shift: LIONNOIL → (shift +2) → PQKN. To decode, undo the shift (−2) to get NOIL, then reverse to get LION. Order matters: undo the last applied operation first.

Speed Tips

  • Memorise A=1, B=2, …, Z=26 and the reverse (Z=1, Y=2, …, A=26) so you do not count on your fingers.
  • For letter shifts, the distance between the first letter of the plain word and the first letter of the code word is the rule — read it off directly.
  • When the code is numeric, try sum of positions first; if it does not match, try product, then sum of squares.
  • For mixed codes, write the two operations as (op1 ∘ op2)(word) and apply the inverses in reverse order: op2⁻¹ ∘ op1⁻¹.
Test Your Knowledge

If CAT is coded as FDW, how is DOG coded?

A
B
C
D
Test Your Knowledge

If AB is coded as 2 and CD is coded as 12, what is the code for EF?

A
B
C
D
Test Your Knowledge

In a certain code, 'red' means 'go', 'green' means 'stop', and 'yellow' means 'wait'. What should you do at a 'green' signal under this code?

A
B
C
D