ExamShortcut

Coding - Decoding

🔒 Log in to track
high importance~4 Q in Tier 16 formulas⚡ 10 shortcuts7 subtopics
Subtopic 1 of 7·Letter shift coding →

The coding-decoding family

🔒 Log in to track

A coding question shows you a word and its coded form, reveals the rule, and asks you to code (or decode) another word. Every CGL coding rule is mechanical — no vocabulary is tested. The five recurring rule types:

  1. Letter shifting: each letter moves +k or −k (CAT → DBU is +1).
  2. Opposite letters (Atbash): each letter is replaced by its mirror in the alphabet.
  3. Reversal / reverse+shift: the word is written backwards, often after or before a shift.
  4. Number coding: the word becomes a number — sum of letter positions, position sums plus a constant, or position-weighted sums.
  5. Substitution: objects or words are renamed ('sky is called sea'); you answer from the renames, never from reality.

Method: compute the letter-position difference between the sample pair, slot by slot. The difference tuple IS the rule. Apply it to the asked word mechanically.

Detailed notes

What is coding-decoding?

In daily life we use codes all the time. A bank sends a one-time password, a shop marks a price as 'AB' instead of ₹12, and friends use short secret words. In a coding-decoding question, the examiner hides a word using a fixed rule. You are shown one word with its code, you work out the rule, and then you apply the same rule to a new word. Coding means turning a word into its code. Decoding means turning a code back into the word.

The good news: the rule is always mechanical. No vocabulary or general knowledge is tested (except in renaming questions, where you need only simple facts like 'fish live in water').

The main families

FamilyWhat happensSmall example
Letter shiftevery letter moves forward or backCAT → DBU (+1)
Reversal / oppositeword written backwards, or each letter replaced by its opposite (A↔Z)LOGIC → CIGOL
Rearrangementsame letters, new orderPLANET → LPNATE
Number codingword becomes a number from letter positionsCAT → 24
Symbol codingeach letter gets a symbol or digitR = 6, O = 8
Substitutionobjects are renamedsky is called sea
Language codingwhole sentences become code words'good day' = 'pa ki'

How to find any rule — step by step

  1. Count letters. If the code has the same number of letters, compare them one by one.
  2. Same letters, new order? Then it is rearrangement. Mark where each letter went.
  3. Different letters? Write alphabet positions (A=1 ... Z=26) and subtract slot by slot. A constant like +2 is a shift; letters adding to 27 are opposites.
  4. Read the code backwards. If you see the word (or a shifted word), reversal is part of the rule.
  5. Code is a number? Add the letter positions first and compare with the code.
  6. Apply the rule exactly to the new word. Then check one letter again.

Rearrangement rules

  • Pair swap: letters are swapped in pairs. PLANET → PL AN ET → LP NA TE → LPNATE. With an odd number of letters the last letter stays.
  • Halves reversed: split the word in two halves and write each half backwards. MONKEY → MON | KEY → NOM YEK. In an odd word the middle letter stays in place.
  • First–last interchange: only the first and last letters swap. LEMON → NEMOL. Sometimes the middle letters are also shifted.

Mixed (two-step) rules

Some codes use two simple rules together:

  • Vowels one way, consonants another: vowels (A, E, I, O, U) move +1 and consonants move −1. BASKET → ABRJFS.
  • Opposite then shift: BAD → opposite YZW → +1 → ZAX.
  • Reverse then alternate shift: +1, −1, +1, −1 after writing the word backwards.
  • Letters plus a number: letters shifted, then a number such as the letter count or position sum is written after them.

Always do the steps in the same order as the sample. 'Reverse then shift' and 'shift then reverse' can give different answers when the shift changes from slot to slot.

Must-know alphabet facts

  • EJOTY: E=5, J=10, O=15, T=20, Y=25. Every letter is at most 2 steps from one of these.
  • Opposite pairs (positions add to 27): A-Z, B-Y, C-X, D-W, E-V, F-U, G-T, H-S, I-R, J-Q, K-P, L-O, M-N.
  • Wrap-around: after Z comes A again. Y + 3 = B.

Quick revision

  • Same letters in a new order → rearrangement (pair swap, halves reversed, first–last swap).
  • Different letters → subtract positions; constant = shift, sum 27 = opposite.
  • Read the code backwards before trying anything complicated.
  • Two-step rules: copy the order of steps from the sample.
  • Always apply the rule found on the sample; never invent a new rule for the new word.

Types of questions asked

Every way this subtopic shows up in exams — how to recognise it, the formula or logic to use, and a solved example.

Type 1: Pair-swap coding (adjacent letters interchanged)common3 practice Q
How to spot it:

The code has exactly the same letters as the word, and every two neighbouring letters have changed places (PLANET → LPNATE).

  1. Split the word into pairs from the left: PL | AN | ET.
  2. Write each pair backwards: LP | NA | TE.
  3. If the word has an odd number of letters, the last letter stays as it is.

Why it works: no letter changes, only the order — so checking pairs is enough.

Example: If PLANET is written as LPNATE, how is GARDEN written?

Pairs GA | RD | EN → AG | DR | NE → AGDRNE.

Type 2: Halves reversed (each half written backwards)common3 practice Q
How to spot it:

Same letters as the word, but the first half and the second half each appear backwards (MONKEY → NOMYEK).

  1. Split the word into two equal halves (odd length: the middle letter stays).
  2. Reverse the first half, then reverse the second half.
  3. Apply any extra shift only after this, if the sample shows one.

Why it works: reading each half backwards in the sample shows the original halves.

Example: If MONKEY is written as NOMYEK, how is GINGER written?

GIN | GER → NIG | REG → NIGREG.

Type 3: First and last letters interchangedoccasional2 practice Q
How to spot it:

Only the end letters look different: the first letter of the word is at the end of the code and the last letter is at the front. Middle letters are same or shifted by a fixed amount.

  1. Swap the first and last letters.
  2. Check the middle letters against the sample: unchanged, or each moved by the same k?
  3. Apply both steps to the new word.

Why it works: the middle part tells you whether a second rule is present.

Example: If LEMON is written as NEMOL, how is GRAPE written?

Swap first and last letters: G…E → E…G, middle RAP unchanged → ERAPG.

Type 4: Vowel–consonant rule (different change for vowels and consonants)occasional3 practice Q
How to spot it:

Differences are not constant: vowels all move one way (say +1) while consonants move another way (say −1, or not at all).

  1. Write the sample's differences under each letter.
  2. Group them: what happened to the vowels? what happened to the consonants?
  3. Code the new word letter by letter, first asking 'vowel or consonant?'.

Why it works: the examiner uses the letter type, not the slot, to decide the change.

Example: If BASKET is written as ABRJFS, how is PENCIL written?

Vowels +1 (A→B, E→F), consonants −1 (B→A, S→R, K→J, T→S). PENCIL → P−1, E+1, N−1, C−1, I+1, L−1 = OFMBJK.

Type 5: Multi-step mixed codingcommon3 practice Q
How to spot it:

One simple rule does not explain the sample: e.g. letters are opposite AND shifted, or reversed AND shifted +1/−1 alternately, or letters are followed by a number.

  1. Test the simple rules first (shift, opposite, reverse).
  2. If a rule 'almost' works, the remaining difference is the second step (e.g. opposite letters that are all one step further).
  3. Apply the steps to the new word in the same order.
  4. For letter+number codes, solve the letters and the number separately.

Why it works: every mixed rule is two basic rules in a row.

Example: If BAD is written as ZAX, how is CUP written?

Opposite of BAD = YZW; +1 → ZAX ✓. CUP → opposite XFK → +1 → YGL.

Shortcut tricks

⚡ Difference tuple first

Write the sample word and its code with positions, subtract slot by slot. A flat tuple (+1, +1, +1) is a shift; a mixed tuple is a per-index rule; a reversed tuple pattern hints at reversal. Then apply the same tuple to the new word.

Example: Q. If CAT is coded as FDW, how is DOG coded?

Sol. C→F is +3, A→D is +3, T→W is +3, so the rule is a flat +3. D+3 = G, O+3 = R, G+3 = J → GRJ.

The tuple you computed on the sample pair is the rule — apply the same tuple to the new word and never guess a fresh rule.

Where students lose marks

  • Coding the probe with a different shift than the sample revealed (the most common silly loss).

  • Forgetting wrap-around: Y + 3 = B, not 'out of range'.

  • Answering substitution questions from real-world facts instead of the given renames.

Practice sets — 14 questions

Sets of 10, mixed across the question types above. Each answer comes with a step-by-step explanation.

Topic test · 10 questions

Suggested time 7 min · wrong answers go to your mistake notebook automatically.