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.
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.
After completing this lesson you will be able to:
You should be comfortable with:
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.
Code-breaking exercises real analytical muscles:
The exam tests coding-decoding because systematically uncovering a rule from evidence is a core analytical ability.
Let's build the toolkit of code types and the method to test them.
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.
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.
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.
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).
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:
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.
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.
Coding uses code-type tests, not formulas:
| Code type | How to crack |
|---|---|
| Letter shift | find the fixed +/− shift (mind wraparound) |
| Reversal | letters in reverse order |
| Rearrangement | letters permuted (e.g., swap pairs) |
| Number substitution | letters ↔ positions (A=1…Z=26) |
| Symbol swap | substitute meanings, then apply order of operations |
| Certain system | test rearrange → arithmetic shift → product/sum relation |
Letter code: A=1, B=2, C=3 … Z=26 (and reverse: A=26 … Z=1).
| When the code… | Try… |
|---|---|
| has letters near the original alphabetically | letter shift |
| uses the same letters in different order | reversal/rearrangement |
| turns letters into numbers | position substitution |
| swaps + − × ÷ symbols | operator substitution + order of operations |
| gives worked equations, no named rule | test rearrange, digit shift, product/sum |
| a shift passes Z | wraparound |
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.
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: ★☆☆☆☆
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: ★★★☆☆
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: ★★★★☆
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: ★★★★★
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.
| Code type | Crack it by |
|---|---|
| Letter shift | fixed +/− shift (wrap Z↔A) |
| Reversal | letters in reverse |
| Rearrangement | letters permuted |
| Number substitution | A=1…Z=26 (or +constant) |
| Symbol swap | substitute, then order of operations |
| Certain system | rearrange → digit shift → product/sum |
| Decode | reverse the encoding shift |
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.
Tick them all and coding-decoding becomes a satisfying, reliable strength — and you'll break everyday codes and patterns with a systematic eye.
Put it to the test with 1,187 practice questions on this topic.