By the end of this chapter you'll be able to…

  • 1Identify the six cipher families (uniform shift, variable shift, rearrangement, mirror, positional value, substitution) from a single example pair
  • 2Execute the four-step method: positions → gaps with signs → family → mechanical application with mod-26 wrap
  • 3Reverse-engineer number codes (letter sums, hybrids, redefined operators) against every given example
  • 4Crack sentence-substitution codes with an intersection grid
  • 5Recognise when a substitution question is genuinely 'cannot be determined'
  • 6Bank coding questions in 30–40 seconds each
💡
Why this chapter matters in SSC CGL
Coding–decoding appears in effectively every SSC CGL paper — 2–4 questions in Tier 1 and 3–4 in Tier 2. The cipher menu is only six families, all mechanical once identified, which makes this the most reliable 6–12 marks in the reasoning section. Accuracy here is pure process discipline: positions on paper, gaps with signs, rule verified on every given example.

Coding–Decoding — SSC CGL Reasoning

A coding question gives you one plaintext–ciphertext pair and asks you to encode (or decode) a second word by the same rule. Like analogy and series, the rule comes from a closed menu. Your entire job: identify the cipher family fast, on paper, and apply it without slips.


1. What SSC actually asks

Tier 1: 2–4 questions · Tier 2: 3–4 questions. The six cipher families:

#FamilyExampleTell
1Uniform shiftGARDEN → JDUGHQ (+3)same gap every letter
2Variable shiftCLOCK → DNRGP (+1,+2,+3,+4,+5)growing/alternating gaps
3Reversal / rearrangementBREAD → DAERBsame letters, new order
4Mirror (27-sum)ACE → ZXVpairs sum to 27
5Positional valuesDOG → 4157 or sum 26digits appear
6Substitution / word codes"sky is blue" = "pa jo ka"match words across sentences

2. The method — always the same four steps

  1. Write positions under both words. (A=1…Z=26; EJOTY anchors.)
  2. Compute the per-letter gap (cipher − plain), including sign.
  3. Name the family from the gap pattern.
  4. Apply mechanically to the query word, wrapping mod 26.

Example. If MOBILE is coded as NQEMQK, how is TABLET coded? Gaps: M→N +1, O→Q +2, B→E +3, I→M +4, L→Q +5, E→K +6. Variable shift +1…+6. T+1=U, A+2=C, B+3=E, L+4=P, E+5=J, T+6=Z → UCEPJZ.


3. Number and mixed codings

  • Letter-sum codes: DOG = 4+15+7 = 26; then CAT = 3+1+20 = 24. Watch for the variant that multiplies the sum ("×2") or adds the word length.
  • Digit-position hybrids: A=1…Z=26 written per letter: BAD → 214.
  • Reverse positions: A=26…Z=1 (i.e., 27 − position).
  • Arithmetic disguise: "If 5 × 4 = 15, 8 × 6 = 42…" — the operator is redefined (here or … test both on all given pairs).

For redefined-operator questions, the rule must fit every given example. One fit is a hypothesis; two fits is an answer.


4. Sentence (substitution) codes

"'red and blue' = ka pa ni; 'blue is deep' = ni to su; 'sky is red' = to ka ro" — find the code for "deep".

Method: intersect. blue appears in sentences 1 & 2 → common code ni. red in 1 & 3 → ka. is in 2 & 3 → to. Sentence 2's leftover: deep = su.

Draw the grid; never intersect mentally. Some questions leave one word ambiguous — SSC then asks for exactly the resolvable one (or offers "cannot be determined", which is occasionally the right answer — check before forcing a mapping).


5. Solved PYQ-style examples

Q1. In a code, PENCIL is written as OFMDHM. How is BRUSH written? Gaps: P→O −1, E→F +1, N→M −1, C→D +1, I→H −1, L→M +1 → alternating −1/+1. B−1=A, R+1=S, U−1=T, S+1=T, H−1=G → ASTTG.

Q2. If STAR = 9612 and RATS = 2169 in some code, then ARTS = ? Per-letter mapping: S=9, T=6, A=1, R=2 → ARTS = 1269. (Substitution — no arithmetic needed; verify with the second word.)

Q3. If WATER is coded as XCWIW, how is MANGO coded? Gaps: W→X +1, A→C +2, T→W +3, E→I +4, R→W +5 — the growing shift +1…+5. M+1=N, A+2=C, N+3=Q, G+4=K, O+5=T → NCQKT. (One misread gap flips the family — recompute every gap on paper, never pattern-guess from the first two.)

Q4. 'pit nac mit' = "eat well food"; 'mit tim nac' = "enjoy well food". Code for "eat"? nac, mit are common → they map to {well, food}. So "eat" = pit (the leftover of sentence 1).

Q5. If LOTUS = 62 in a letter-sum code, then ROSE = ? L+O+T+U+S = 12+15+20+21+19 = 87 ≠ 62 — so the rule isn't a plain sum. Test sum of positions minus word length ×5: 87 − 25 = 62 ✓ (5 letters × 5). ROSE: 18+15+19+5 = 57 − 20 = 37. (Always reverse-engineer with the given total before assuming plain sum.)


6. Exam protocol

  1. Positions under letters, gaps with signs — 100% on paper.
  2. Two given examples? The rule must fit both.
  3. Mirror check first when gaps look chaotic: do plain+cipher positions sum to 27?
  4. Sentence codes: draw the intersection grid.
  5. Wrap mod 26 without fear: Y + 4 = C.
  6. Budget 30–40 seconds; coding questions are mechanical once the family is named.

Key formulas & results

Everything to memorise for the exam hall, in one card. Screenshot this for revision.

Four-step method
positions → gaps (with sign) → name family → apply + wrap
All on paper; a one-letter misread flips the family.
EJOTY anchors
E=5, J=10, O=15, T=20, Y=25
Any letter's position within ±2 of an anchor.
Mirror test
plain + cipher positions sum to 27 ⇒ mirror cipher
Try this FIRST when gaps look chaotic.
Mod-26 wrap
position > 26 → subtract 26; position < 1 → add 26
Y + 4 = 25 + 4 = 29 → 3 = C.
Letter-sum variants
Σ positions · Σ ± word length · Σ × k · reverse positions (27 − p)
Reverse-engineer against the GIVEN total before assuming plain sum.
Substitution grid
common word across two sentences ↔ common code token
Intersect on paper; leftovers resolve last.
⚠️

Traps SSC CGL sets — and how to dodge them

These are the exact option-traps and misreads that cost marks under negative marking.

WATCH OUT
Guessing the family from the first two letters' gaps
Compute EVERY gap. SSC's favourite trap is +1,+2,… that becomes alternating or reverses halfway; two gaps never pin the family.
WATCH OUT
Dropping the sign on negative shifts (−1 treated as +1)
Write gaps as signed numbers (P→O is −1, not '1'). Alternating ±1 ciphers punish unsigned gap notes immediately.
WATCH OUT
Freezing at the alphabet ends (what is Y + 4?)
Wrap mod 26 mechanically: 25 + 4 = 29 → 29 − 26 = 3 = C. Practise ten wrap cases until they're boring.
WATCH OUT
Assuming letter-sum when the given total doesn't match
Always verify the advertised total against a plain sum first; the difference (±word length, ×2) reveals the variant. LOTUS = 62 but Σ = 87 → the rule subtracts 5 × length.
WATCH OUT
Solving substitution codes mentally and cross-wiring tokens
Draw the grid: sentences as rows, shared words circled, shared tokens matched. Three sentences = three intersections; the leftover falls out.
WATCH OUT
Forcing an answer when the mapping is genuinely ambiguous
If two words could map to two tokens interchangeably and the question asks for one of THEM, the answer is 'cannot be determined' — check whether that option exists before guessing.

Exam-pattern practice

PYQ-style questions with full solutions. Work through them as a readiness check — mark yourself honestly and get your gap report at the end.

Readiness check

Are you exam-ready for Coding–Decoding?

9 problems from this chapter. Try each one, reveal the worked solution, mark yourself honestly — get your gap report at the end.

9 questions~6 min worth ~8 marks in SSC CGL exams

5-minute revision

The whole chapter, distilled. Read this the night before the exam.

  • Four steps: positions under letters → signed gaps → name the family → apply with mod-26 wrap.
  • Six families: uniform shift, variable shift, rearrangement, mirror (27-sum), positional values, substitution.
  • Chaotic gaps? Test the mirror (positions sum 27) before anything exotic.
  • Letter-sum codes: verify the plain sum against the given total; the mismatch reveals the variant.
  • Redefined operators: the rule must fit EVERY given example — one fit is a hypothesis.
  • Substitution sentences: intersection grid on paper; leftover word maps last.
  • Wrap practice: Y+4=C, B−5=W. Ten drills make it reflexive.
  • Budget 30–40 s; the family identification IS the question.

SSC CGL question blueprint

How this topic is asked, tier by tier — so you can prep to the pattern.

Typical weightage: Tier 1: 4–8 marks (2–4 Q × 2) · Tier 2: 9–12 marks (3–4 Q × 3)

Question styleMarks eachTypical countWhat it tests
Letter cipher MCQ2–31–3Shift/mirror/rearrangement identification + clean application
Number code MCQ2–30–1Letter sums and variants, redefined operators
Substitution MCQ2–30–1Sentence intersection grids
Prep strategy
  • Day 1: the four-step method + 20 uniform/variable shift drills with signed gaps.
  • Day 2: mirror + reversal + wrap drills; Day 3: number codes and substitution grids.
  • Then PYQ mixed sets at 35 s/question — coding accuracy should hit 95%+ within a week.

Exam-hall strategy

Battle-tested tips from mentors and toppers for this topic under the sectional clock.

  1. Positions and signed gaps on paper — a single mental slip flips the cipher family.
  2. Mirror test (27-sum) before exotic hypotheses when gaps look random.
  3. Verify the rule on every given example, then apply once, cleanly.
  4. Sentence codes: grid first, answer second.
  5. Practise ten mod-26 wraps until Y+4=C is instant.
  6. 30–40 seconds per question; condition-based (banking-style) codes get 60.

Beyond the exam

Where this skill shows up in the job you're competing for — and in life.

Basic cryptography literacy

Caesar shifts and substitution ciphers are the historical foundation of encryption — this chapter is Cryptography 101.

Pattern debugging

Reverse-engineering a rule from input-output pairs is exactly how developers debug data transformations.

The wider exam family

Banking, railways and state PSC exams all test the same six families — often with the same words.

Mental agility

Signed-gap arithmetic at speed is the same skill as quick date/time-zone calculations.

Where else this topic is tested

Prepare once, score in every exam that asks it.

SSC CHSL / CPO / MTSVery high — same six families
IBPS / SBI prelimsHigh — adds condition-based variants
RRB NTPCVery high — coding is a fixture
State police / PSC examsHigh — recycled SSC patterns

Questions aspirants ask

Pulled from the Q&A community and mentor sessions.

2–4 in Tier 1 and 3–4 in Tier 2 — it is effectively guaranteed in every paper. Together with analogy and series (which share the positional-arithmetic toolkit), these three topics cover 8–12 questions per reasoning section.

Compute all the signed gaps first — the pattern names itself: constant (uniform), growing/alternating (variable), zero-but-rearranged (anagram), or chaotic (test the 27-sum mirror). Only if all fail, consider positional-value or substitution rules.

Yes, regularly — usually three sentences sharing words pairwise. Draw the intersection grid; it takes 40 seconds and is error-proof. Watch for the rare 'cannot be determined' — if the target word never co-occurs uniquely, that IS the answer.

SSC occasionally borrows banking-style condition codes (letters + symbols with override rules). Read the conditions first, apply them in the listed priority order, and treat the base coding as a lookup table. They're longer, not harder — budget 60 seconds instead of 30.

Not the whole alphabet — memorise EJOTY (5/10/15/20/25) and the 27-mirror rule. Between them you can compute any forward or reverse position in two seconds, which covers every family SSC uses.
Header Logo