Coding-Decoding questions give you a rule (often implied, never stated) through one or two examples, then ask you to apply that rule to a new word or number. The examiner is testing pattern recognition under time pressure — not memory, not formulae.
Think of it like a lock-and-key system. The examiner shows you: "this key opens this lock." Your job is to reverse-engineer what makes the key work, then cut a new key for a different lock.
Here's the analogy that makes this stick: imagine a translator who always adds one letter to every word before sending a message. If you see "CAT → DBU", you don't need to know anything about languages — you just notice that C became D (+1), A became B (+1), T became U (+1). That's your rule. Now "DOG" becomes "EPH". You didn't memorize anything; you observed a pattern.
In UPSC CSAT specifically, Coding-Decoding questions appear with moderate frequency in Prelims. They reward candidates who resist the urge to memorize patterns and instead build the habit of deriving the rule fresh from the given example. Every question is self-contained — the rule is always crackable from the data given.
The major categories you will encounter:
Letter-based codes — each letter in the original word is transformed (shifted, reversed, substituted) to produce the coded letter.
Number-based codes — letters are replaced by numbers, typically their alphabetic position values, sometimes combined through arithmetic operations like multiplication.
Mixed and structural codes — the structure of the word itself changes (reversal, insertion of extra letters, prefix/suffix rules) rather than just substituting individual letters.
The trap most candidates fall into is assuming a pattern before verifying it against all letters of the given example. Always check every letter before committing to a rule.
The simplest and most common. Each letter is replaced by its position in the English alphabet: A=1, B=2, C=3 ... Z=26. You need this table memorized to the point where you can recall any letter's value in under two seconds.
Critical anchor points to commit to memory:
| Letter | Position | Letter | Position | |--------|----------|--------|----------| | A | 1 | N | 14 | | E | 5 | O | 15 | | H | 8 | R | 18 | | I | 9 | S | 19 | | J | 10 | T | 20 | | K | 11 | Y | 25 | | M | 13 | Z | 26 |
Why these? Because they appear most frequently in CSAT questions and are the trickiest to recall quickly. Letters like A=1 and B=2 nobody forgets; it's the middle of the alphabet that kills time.
Every letter shifts by a fixed number of positions in the alphabet. A +1 shift turns A→B, B→C, ..., Z→A (wrapping around). A −3 shift turns D→A, A→X (wrapping backward).
The rule can also be alternating: +1, −1, +1, −1 applied to successive letters. This is harder to spot because the first instinct is to look for a uniform shift.
How to detect: Find the difference between the first letter of the original and its coded version. Then verify with the second letter. If the difference holds constant, it's a uniform Caesar cipher. If the second letter shows a different difference, look for an alternating or position-dependent rule.
Edge case — wrap-around: If Z shifts +3, you get C (not a number beyond Z). The alphabet is circular. Similarly, if A shifts −1, you get Z. Many candidates lose marks by not accounting for this.
Here, words are coded as the product of the positional values of their letters. This is recognizable immediately if the code is a large number much bigger than any positional value of a single letter.
NO → 210 — check: N=14, O=15, 14×15=210. Confirmed. Now you know every subsequent word will follow the same multiplication rule.
Warning: Don't confuse this with sum codes. Always check whether the example code is consistent with sum or product before committing. For most CSAT examples, if the code exceeds 100 for a two-letter word, it is almost certainly a product code.
The rule here operates on the word as a whole rather than letter-by-letter. Common structural rules:
How to detect: Count the letters in the original and the coded version. If the count differs, a letter is being added or removed. If the count is the same but no uniform shift exists, look for rearrangement or reversal.
Some questions give two fully coded examples (e.g., FRANCE → 654321, GERMANY → 9158437). Your job is to build a mapping table from these two examples and apply it to the new word.
Method: Write out both words letter-by-letter alongside their digit-by-digit codes. Build your cipher table. Only use letters whose mapping is unambiguous. If a letter in the target word does not appear in either example, the question has an error — but in a well-formed CSAT question, this will not happen.
The key discipline: build the full mapping table before attempting the target word. Candidates who try to shortcut by matching only the letters they need often make errors when a letter appears multiple times.
The word EJOTY encodes positions 5, 10, 15, 20, 25. From these five anchors you can derive any letter's position by counting forward or backward by at most 4 steps. Example: M is 13 — it's two before O (15), so 15−2=13. R is 18 — it's two before T (20), so 20−2=18. Standard method: recall from A=1 takes up to 26 steps of counting. This anchor method: maximum 4 steps from the nearest EJOTY anchor. Time saved: roughly 8–10 seconds per number lookup, which across a 3–4 letter word adds up to 30+ seconds per question.
For any shift-based code, compute the shift from the first letter, then verify it against the second letter before touching the answer options. If the second letter confirms the shift, apply it to all remaining letters and you're done. If it contradicts, immediately look for alternating pattern (+1/−1) and verify with the third letter. Standard method: many candidates apply the pattern from one letter alone and then check the answer — this means recomputing if wrong (60–90 seconds wasted). This method: 2 verifications before touching options, maximum 20 seconds, no backtracking.
For number codes, mentally estimate: if the code for a 2-letter word exceeds 100, it is a product code. If it is 30 or below, it is likely a sum code. Check: the maximum sum of two letters is Z+Z = 26+26 = 52. The minimum product of two common letters is A×B = 1×2 = 2. Any 3-digit code for a 2-letter word is definitively a product. Example: NO=210 — exceeds 52, so product confirmed in 1 second without trial. Standard method: try sum first, then product if sum fails — 20–25 seconds. This detection rule: under 5 seconds.
When the coded version has more letters than the original, count the difference. If the difference is exactly 1, look for a prefix or suffix rule. Write the original reversed and see if the code contains that reversed string. Example: POT reversed = TOP; code = ATOP = A + TOP. TRAP reversed = PART; code = APART = A + PART. The 'A' prefix rule is immediately confirmed. Applying to ARENA: reversed = ANERA, prefix A = AANERA. This reversal-first check takes 10 seconds vs. the 45 seconds of trying various substitution rules that go nowhere.
When given two fully-coded words as the basis for a mapping (e.g., FRANCE=654321, GERMANY=9158437), draw a two-column table immediately — letters on one side, digits on the other. Fill all mappings before looking at the target word. This takes 20 seconds upfront but eliminates the risk of misassigning a repeated letter. Candidates who skip the table and "look up as needed" make errors 30–40% of the time when a letter appears in both example words. Full-table method: 20 seconds setup + 10 seconds lookup = 30 seconds total. Ad-hoc method: 15 seconds + error correction = 60+ seconds with risk of wrong answer.
When a Coding-Decoding question appears in the exam hall, run this decision tree in order:
Step 1 — Count letters. Does the coded word have the same number of letters as the original? If yes, go to Step 2. If no, it is a structural rule — look for reversal + prefix/suffix (Step 5).
Step 2 — Check if the code is all numbers. If yes, check whether each number matches a letter's alphabetic position. If confirmed with two letters, it is a direct position code. If not, check if the code is a single large number — if yes, test product of positional values (Step 4).
Step 3 — It is letter-to-letter substitution. Compute the shift from the first original letter to its coded letter. Verify with the second letter. Same shift? Apply uniformly (Caesar cipher). Different shift? Check for alternating pattern, verify with third letter, then apply.
Step 4 — Product code. Identify each letter's position value, multiply all together, verify against the given example, then apply to the target word.
Step 5 — Structural rule. Write the original word reversed. Check if that reversed string appears inside the code. Look for a consistent prefix or suffix being added.
Never guess after Step 1. Every additional verification step takes under 10 seconds and prevents a 2-mark wrong-answer penalty.
Why this question: This is the foundational Caesar cipher variant with an alternating shift — the most common advanced letter-coding type in CSAT.
Solving path: Write APPLE above BQQMF, compute difference for each pair: A→B (+1), P→Q (+1), P→Q (+1), L→M (+1), E→F (+1). Uniform +1 shift confirmed in 5 steps. Apply to MANGO: M→N, A→B, N→O, G→H, O→P = NBOHP.
Why this question: Demonstrates the alternating +1/−1 shift pattern — a trap for candidates who only check the first letter's shift.
Solving path: Check ZERO→ADSN: Z→A (+1), E→D (−1), R→S (+1), O→N (−1). Pattern: odd positions +1, even positions −1. Apply to STOP: S→T (+1), T→S (−1), O→P (+1), P→O (−1) = TSPO.
Why this question: Tests the product code pattern, which many candidates mistake for a sum code without verification.
Solving path: N=14, O=15: 14×15=210 ✓. Add T=20: 210×20=4200 ✓. Add E=5: 4200×5=21000 ✓. Pattern is cumulative product. For NOTES: 21000×19 (S=19) = 399000.
Why this question: The build-a-cipher-table type — reward for methodical setup, penalty for ad-hoc shortcuts.
Solving path: A=1, B=2, C=3, D=4 → 1×2×3×4=24 ✓. E=5, F=6, G=7, H=8 → 5×6×7×8=1680 ✓. Rule: product of positional values. I=9, J=10, K=11, L=12 → 9×10=90, 90×11=990, 990×12=11880.
Why this question: Direct alphabetic position code — appears frequently as a "gift" question when you have the anchor points memorized.
Solving path: Verify with SCIENCE: S=19, C=3, I=9, E=5, N=14, C=3, E=5 → 19-3-9-5-14-3-5 ✓. HISTORY: H=8, I=9, S=19, T=20, O=15, R=18, Y=25 → 8-9-19-20-15-18-25.
Assuming a uniform shift after checking only the first letter. The alternating +1/−1 pattern (as in ZERO→ADSN) is invisible if you only verify one letter. Always check at least two before applying the rule.
Forgetting wrap-around in Caesar ciphers. If Y shifts +3, the answer is B, not AB or some nonsensical result. The alphabet is circular: after Z comes A. Similarly, shifting A backward by 1 gives Z. This single error can invalidate an otherwise correct approach.
Confusing sum codes and product codes without verification. A two-letter code of 210 cannot be a sum (maximum sum is 52). Check the arithmetic type against the given example before computing for the target word.
In cipher-table questions, assigning a digit to a letter that appears in both example words without cross-checking. Build the complete table. If a letter appears in both examples, its assigned digit must be consistent across both — use this as a self-check.
In reversal questions, reversing the code instead of the original. The transformation is always: take the original → apply the rule → get the code. Work in this direction. Reversing the code and applying some rule is a backward approach that leads to structurally inconsistent answers.
Not verifying the pattern against all letters of the given example before answering. The rule is always perfectly consistent within the example. If your proposed rule breaks on any letter of the given example, it is wrong — do not proceed to the target word until you have a rule that works for every letter.