logo
Study Lesson
Analytical Reasoning
Coding-Decoding

Coding-Decoding: Cracking the Substitution Rule

15 min read1,187 questions available
In this lesson20 sections

Secret codes have fascinated people for centuries — from ancient generals hiding battle plans to kids passing notes in class. Coding-decoding questions on the Civil Service Exam are that same game: you're shown a word transformed into a secret code, and you must crack the rule and apply it to a new word. The satisfying part is that these codes follow a small set of predictable systems, and once you learn to test for each one methodically, breaking them becomes fast and reliable. This chapter makes you a confident code-breaker.

1. Lesson Overview

Coding-decoding questions show a word, phrase, or equation encoded by some hidden rule, then ask you to apply the same rule to something new (either encode a new word or decode a given code). The task is to reverse-engineer the rule from the example, then apply it consistently.

On the Civil Service Exam, coding-decoding items are a regular part of Analytical Reasoning, closely related to Number & Letter Series (the same alphabet-position thinking). Because the code types are limited and testable, a systematic approach turns these into dependable marks.

The difficulty is beginner to intermediate. The reliable method is to write the word and its code aligned, test the common code types in order (letter shift, reversal, number substitution, symbol swap), confirm the rule on every piece, then apply it carefully. This lesson builds that discipline.

2. Learning Objectives

After completing this lesson you will be able to:

  • Crack letter-shift codes (each letter moved a fixed number of positions).
  • Recognize reversal and rearrangement codes.
  • Solve number-substitution codes (letters ↔ positions).
  • Handle symbol/operator-substitution problems with order of operations.
  • Decode "certain system" equation patterns by testing candidate rules.
  • Verify a rule against every piece of the example before applying it.
  • Avoid the assume-from-one-piece and wraparound mistakes.

3. Prerequisites

You should be comfortable with:

  • Alphabet positions (A=1 … Z=26) and shifting letters (see Number & Letter Series).
  • Wraparound past Z back to A.
  • Order of operations (PEMDAS/GEMDAS) for symbol-substitution problems (see Algebra).
  • Careful, methodical comparison of two aligned strings.

A quick refresher on the key habit: align the plaintext and the code. Write the original word on one line and its code directly beneath, letter under letter. Then compare each pair: did the letter move forward or back? by how many? are the letters rearranged? This alignment makes the rule visible. Never try to crack a code by staring at it as a whole — line it up piece by piece.

4. Why This Topic Matters

Code-breaking exercises real analytical muscles:

  • Logical deduction. Reverse-engineering a hidden rule from examples is a pure reasoning skill used in troubleshooting and investigation.
  • Pattern recognition. Spotting consistent transformations underlies data work, cryptography, and programming.
  • Attention to detail. Codes punish sloppiness; the discipline transfers to any precise task.
  • Test synergy. The same alphabet-position thinking powers letter series and analogies.
  • Everyday puzzles. From passwords to simple ciphers, understanding codes is a fun, useful literacy.

The exam tests coding-decoding because systematically uncovering a rule from evidence is a core analytical ability.

5. Core Concepts

Let's build the toolkit of code types and the method to test them.

Letter-shift codes

The most common code shifts every letter forward or backward by a fixed number of positions.

CAT → DBU: each letter +1 (C→D, A→B, T→U). Apply to DOG: D→E, O→P, G→H = EPH.

To crack it: align the letters, find the consistent shift, and remember wraparound (Z + 1 → A).

Analogy: A shift code is like a dial that rotates the whole alphabet by a fixed amount. Once you know the dial is set to "+1," every letter turns the same way. Find the dial setting from one letter, then confirm it on the rest.

Reversal and rearrangement codes

Sometimes the letters aren't shifted but reordered.

CAT → TAC: the letters are simply reversed. Apply to DOG → GOD.

Other rearrangements swap pairs (ABCD → BADC) or follow a fixed permutation. If letters match the original set but sit in a different order, suspect rearrangement, not a shift.

Number-substitution codes

Letters may be coded by their alphabet positions (or some arithmetic on them).

Each letter → its position: CAT = 3, 1, 20. DOG = 4, 15, 7.

Variations add a constant (position + 2) or use reverse positions (A=26 … Z=1). Test the simple "position" rule first, then adjustments.

Symbol/operator substitution

A different variant swaps math symbols and asks you to evaluate an expression with the new meanings — applying normal order of operations afterward.

If "+" means "×" and "×" means "−", find 6 + 2 × 3. Substitute: 6 × 2 − 3. Order of operations: 12 − 3 = 9.

Always substitute the meanings first, then compute with standard order of operations (unless told otherwise).

"Certain system" equation patterns

Some questions give worked equations under an unnamed system and ask you to apply the hidden rule to a new one — without naming it. Test candidate rules in order:

  1. Rearrangement of digits (are the output digits a shuffle of the input?).
  2. Consistent arithmetic shift on each digit (each digit +1, or the whole number + a constant).
  3. Relation to the real product/sum of the inputs (output = product ± constant, or sum × something).

If "3 4 = 25" and "5 2 = 29" in a certain system, test: 3² + 4² = 9 + 16 = 25 ✓; 5² + 2² = 25 + 4 = 29 ✓. Rule = sum of squares. Apply to "6 1": 36 + 1 = 37.

A rule confirmed on only one example is often underdetermined — check it against every worked example given.

The working method

  1. Write the original and its code aligned, piece by piece.
  2. Compare each piece: shift amount? rearranged? arithmetic relationship?
  3. Confirm the rule works for every piece, not just the first.
  4. Apply the confirmed rule to the new item, piece by piece.

Coding questions are really letter-series or number-series applied across a whole word or equation at once — the same careful method cracks them all.

With the toolkit built, let's picture, tabulate, and drill.

6. Visual Learning Suggestions

  • [Illustration Suggestion] Aligned strings. The word "CAT" written above its code "DBU," with arrows showing each letter's +1 shift.
  • [Illustration Suggestion] The alphabet dial. A rotating dial aligning A→D, B→E, etc., illustrating a shift code as one turn of the wheel.
  • [Illustration Suggestion] Reversal mirror. "CAT" reflected in a mirror to "TAC," showing a reversal code.
  • [Illustration Suggestion] Symbol-swap table. A small key ("+" means "×", "×" means "−") beside a worked expression, showing substitution then order of operations.

7. Formula Library

Coding uses code-type tests, not formulas:

Code typeHow to crack
Letter shiftfind the fixed +/− shift (mind wraparound)
Reversalletters in reverse order
Rearrangementletters permuted (e.g., swap pairs)
Number substitutionletters ↔ positions (A=1…Z=26)
Symbol swapsubstitute meanings, then apply order of operations
Certain systemtest rearrange → arithmetic shift → product/sum relation

Letter code: A=1, B=2, C=3 … Z=26 (and reverse: A=26 … Z=1).

8. Pattern Recognition

When the code…Try…
has letters near the original alphabeticallyletter shift
uses the same letters in different orderreversal/rearrangement
turns letters into numbersposition substitution
swaps + − × ÷ symbolsoperator substitution + order of operations
gives worked equations, no named ruletest rearrange, digit shift, product/sum
a shift passes Zwraparound

9. Problem-Solving Framework

Step 1 — Align the original and its code, piece by piece. ↓ Step 2 — Test code types in order: letter shift, reversal/rearrangement, number substitution, symbol swap. ↓ Step 3 — Confirm the rule on every piece of the example (and every worked equation). ↓ Step 4 — Apply the confirmed rule to the new item, piece by piece, minding wraparound. ↓ Step 5 — Double-check the result matches the code type's logic (and an answer choice, if given).

Why Step 3 matters most: a rule guessed from the first letter or first equation is often wrong. Confirming across every piece prevents applying a false rule confidently.

10. Worked Examples

Beginner

Example 1 (shift +1). If CAT = DBU, then DOG = ___. Solution: +1 each: D→E, O→P, G→H = EPH. Difficulty: ★☆☆☆☆

Example 2 (reversal). If CAT = TAC, then DOG = ___. Solution: Reverse: GOD. Difficulty: ★☆☆☆☆

Intermediate

Example 3 (shift +2). If BOOK = DQQM, then WORD = ___. Thinking: B→D is +2; confirm O→Q (+2), K→M (+2). Apply +2 to WORD: W→Y, O→Q, R→T, D→F. Solution: YQTF. Difficulty: ★★☆☆☆

Example 4 (number substitution). If A=1, B=2…, then CAB = ___. Solution: C=3, A=1, B=2 → 3, 1, 2. Difficulty: ★★☆☆☆

Example 5 (backward shift). If DOG = CNF, then CAT = ___. Thinking: D→C is −1; confirm O→N, G→F. Apply −1 to CAT: C→B, A→Z (wraparound), T→S. Solution: BZS. Difficulty: ★★★☆☆

Advanced

Example 6 (symbol swap). If "+" means "−", "−" means "×", "×" means "÷", find 8 + 4 − 2 × 1. Thinking: Substitute: 8 − 4 × 2 ÷ 1. Order of operations: 4 × 2 ÷ 1 = 8; then 8 − 8 = 0. Solution: 0. Difficulty: ★★★★☆

Example 7 (rearrangement). If MANGO = AMGNO, what is the rule, and code TABLE. Thinking: Compare MANGO → AMGNO: positions swap in pairs (M A → A M, N G → G N), last letter stays. So swap letters 1&2, swap letters 3&4, keep letter 5. Apply to TABLE: T A → A T, B L → L B, E stays = ATLBE. Solution: ATLBE. Difficulty: ★★★★☆

Example 8 (certain system). If "2 3 = 13" and "4 1 = 17" in a certain system, what is "5 2"? Thinking: Test sum of squares: 2² + 3² = 4 + 9 = 13 ✓; 4² + 1² = 16 + 1 = 17 ✓. Apply: 5² + 2² = 25 + 4 = 29. Solution: 29. Difficulty: ★★★★☆

Civil Service Exam Level

Example 9 (shift with wraparound). If ZEBRA = AFCSB, then decode the rule and code YARD. Thinking: Z→A (+1, wraparound), E→F, B→C, R→S, A→B — all +1. Apply +1 to YARD: Y→Z, A→B, R→S, D→E. Solution: ZBSE. Difficulty: ★★★★☆

Example 10 (position + constant). If A=3, B=4, C=5… (each letter = position + 2), then CAT = ___. Thinking: C=3+2=5, A=1+2=3, T=20+2=22. Solution: 5, 3, 22. Difficulty: ★★★☆☆

Example 11 (decode direction). If a word is coded by shifting +3 and the code is "KHOOR", what is the original word? Thinking: To decode, shift back −3: K→H, H→E, O→L, O→L, R→O. Solution: HELLO. Difficulty: ★★★★☆

Example 12 (symbol swap, harder). If "×" means "+", "+" means "÷", "÷" means "−", and "−" means "×", find 16 ÷ 4 + 2 × 3 − 1. Thinking: Substitute: ÷→−, +→÷, ×→+, −→×: 16 − 4 ÷ 2 + 3 × 1. Order of operations: 4 ÷ 2 = 2; 3 × 1 = 3; then 16 − 2 + 3 = 17. Solution: 17. Difficulty: ★★★★★

11. Exam Tricks

  • Confirm the shift on every letter. A code can look like +1 from the first letter but be a rearrangement. Check all letters before deciding.
  • Reversal hides as a shift. If the coded letters are the same set reordered (not shifted), it's rearrangement — test for it.
  • Wraparound in both directions. Forward shifts wrap Z→A; backward shifts wrap A→Z. Miss this and edge letters come out wrong.
  • Symbol swaps still obey order of operations. After substituting, do multiplication/division before addition/subtraction unless told otherwise.
  • Certain-system rules need every example. A rule fitting one equation is underdetermined; confirm it on all given equations.

12. Common Mistakes

  • Assuming the rule from one letter/equation instead of checking every piece.
  • Missing a reversal or rearrangement, forcing a shift interpretation.
  • Applying the rule inconsistently across the new word.
  • Forgetting wraparound at the alphabet's ends.
  • Ignoring order of operations after a symbol substitution.
  • Confusing encoding with decoding — decoding reverses the shift direction.

13. Shortcuts

  • Align and compare — the fastest way to see shift, reversal, or arithmetic.
  • First test a fixed shift (the most common code); if letters are a reorder, test rearrangement next.
  • Position substitution: memorize A=1…Z=26 for instant number codes.
  • Certain-system checklist: rearrange → digit shift → product/sum of inputs.
  • Decode = reverse: to decode a "+k" code, shift back by k.

14. Memory Techniques

  • "Line them up." Align original and code to reveal the rule.
  • "Same letters, new order = rearrange." Not every code is a shift.
  • "The dial wraps." Z→A forward, A→Z backward.
  • "Substitute, then PEMDAS." Symbol swaps still follow order of operations.
  • "Check every piece." Confirm the rule across the whole example.

15. Real Civil Service Exam Strategy

  • Time: a coding item takes 20–40 seconds; aligning and testing is the work.
  • Align first, then test code types in order (shift, reversal, number, symbol).
  • Confirm on every piece before applying — this prevents confident wrong answers.
  • Mind wraparound and decode direction on letter codes.
  • For symbol swaps, substitute then apply order of operations carefully.

16. Practice Questions

Easy

  1. If CAT = DBU, then RAT = ___
  2. If DOG = GOD, then CAT = ___ (reversal)

Medium

  1. If BOOK = CPPL, then WORD = ___
  2. If A=1, B=2…, then BAD = ___
  3. If "+" means "−" and "−" means "+", find 10 + 5 − 3.

Hard

  1. If SUN = VXQ, then MOON = ___ (find the shift)
  2. If a word coded by +2 is "EGP", what is the original?

Challenge

  1. If "3 5 = 34" and "2 4 = 20" in a certain system, what is "6 1"?
  2. If "×" means "+", "+" means "×", find 4 × 2 + 3.
  3. If DELHI = EDMIH... (letters rearranged: swap each pair), code MUMBAI.

Answers and Explanations

  1. SBU. +1: R→S, A→B, T→U.
  2. TAC. Reversed.
  3. XPSE. +1 each: W→X, O→P, R→S, D→E.
  4. 2, 1, 4. Positions.
  5. 8. Substitute: 10 − 5 + 3 = 8.
  6. PRRQ. S→V is +3; confirm U→X, N→Q. Apply +3 to MOON: M→P, O→R, O→R, N→Q.
  7. CEN. Decode −2: E→C, G→E, P→N.
  8. 37. Rule = sum of squares: 3²+5²=34 ✓, 2²+4²=20 ✓; 6²+1²=37.
  9. 11. Substitute: 4 + 2 × 3; order of operations: 2×3=6, then 4+... wait — "×" means "+" and "+" means "×", so 4 × 2 + 3 becomes 4 + 2 × 3 = 4 + 6 = 10. (Answer: 10.)
  10. UMBMAI. Swap each pair: MU→UM, MB→BM, AI stays if odd... MUMBAI has 6 letters: (MU)(MB)(AI) → (UM)(BM)(IA) = UMBMIA. (Answer: UMBMIA.)

17. Summary

Coding-decoding asks you to crack a hidden rule from an example and apply it. Align the original with its code, then test the common types in order: letter shift (fixed +/− with wraparound), reversal/rearrangement (same letters reordered), number substitution (letters ↔ positions), and symbol swap (substitute meanings, then apply order of operations). For unnamed "certain system" equations, test rearrangement, digit shifts, and product/sum relations — and confirm on every worked example. Always verify the rule across every piece before applying it, mind wraparound and decode direction, and these become quick, dependable points that build on your letter-series skills.

18. Cheat Sheet

Code typeCrack it by
Letter shiftfixed +/− shift (wrap Z↔A)
Reversalletters in reverse
Rearrangementletters permuted
Number substitutionA=1…Z=26 (or +constant)
Symbol swapsubstitute, then order of operations
Certain systemrearrange → digit shift → product/sum
Decodereverse the encoding shift

19. Frequently Asked Questions

How do I find a letter-shift code's shift amount? Align the original and the code, and count how many positions the first letter moved (C→D is +1). Then confirm the same shift on the other letters, remembering wraparound past Z.

How do I tell a shift from a rearrangement? If the coded letters are near the originals alphabetically, it's likely a shift. If they're the same letters in a different order, it's a rearrangement or reversal. Compare the letter sets.

What's the rule for symbol-substitution problems? Replace each symbol with its new meaning, then evaluate using standard order of operations (multiply/divide before add/subtract) unless the problem says otherwise.

How do I crack a "certain system" equation? Test candidate rules in order: are the output digits a rearrangement of the inputs? a consistent arithmetic shift? related to the product or sum of the inputs? Confirm your rule on every given equation before applying it.

What's the difference between encoding and decoding? Encoding applies the rule forward (original → code); decoding reverses it (code → original). For a "+k" shift, decode by shifting back k positions.

20. Mastery Checklist

  • ☐ I align the original and code before analyzing.
  • ☐ I can crack letter-shift codes, including wraparound.
  • ☐ I recognize reversal and rearrangement codes.
  • ☐ I can solve number-substitution codes.
  • ☐ I handle symbol swaps with correct order of operations.
  • ☐ I can decode "certain system" equations by testing candidate rules.
  • ☐ I confirm the rule on every piece before applying it.
  • ☐ I distinguish encoding from decoding.

Tick them all and coding-decoding becomes a satisfying, reliable strength — and you'll break everyday codes and patterns with a systematic eye.

Ready to practice Coding-Decoding?

Put it to the test with 1,187 practice questions on this topic.