Study guide

5.3 Coding & Decoding

RRB Group D Level 1

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 About the RRB Group D (Level 1) Exam 1.2 CBT Pattern, Negative Marking & Score Normalization 1.3 How to Use This Study Guide

2 Mathematics — Number Foundations & Arithmetic

2.1 Number System, BODMAS, Decimals & Fractions 2.2 LCM, HCF & Square Roots 2.3 Ratio & Proportion 2.4 Percentages 2.5 Profit, Loss & Discount

3 Mathematics — Interest, Time & Mensuration

3.1 Simple & Compound Interest 3.2 Time & Work; Pipes & Cisterns 3.3 Time, Speed & Distance 3.4 Mensuration (2D & 3D)

4 Mathematics — Algebra, Geometry & Data

4.1 Algebra & Linear Equations 4.2 Geometry & Trigonometry Basics 4.3 Elementary Statistics & Data Interpretation 4.4 Age, Calendar & Clock Problems

5 Reasoning — Analogies, Series & Coding

5.1 Analogies 5.2 Alphabetical & Number Series 5.3 Coding & Decoding 5.4 Mathematical Operations

6 Reasoning — Logic & Relationships

6.1 Blood Relations 6.2 Syllogism 6.3 Classification (Similarities & Differences) 6.4 Venn Diagram

7 Reasoning — Arrangements & Analytical Reasoning

7.1 Jumbling 7.2 Directions 7.3 Analytical Reasoning & Puzzles 7.4 Statements: Arguments, Assumptions & Conclusions 7.5 Data Sufficiency & Data Interpretation

8 General Science — Physics

8.1 Units, Measurement & Motion 8.2 Force, Gravitation, Work & Energy 8.3 Sound & Light 8.4 Electricity & Magnetism 8.5 Sources of Energy

9 General Science — Chemistry

9.1 Matter, Atoms & Molecules 9.2 Chemical Reactions & Equations 9.3 Acids, Bases & Salts 9.4 Metals, Non-metals & Carbon Compounds

10 General Science — Biology

10.1 Life Processes: Nutrition & Respiration 10.2 Life Processes: Transportation & Excretion 10.3 Control & Coordination 10.4 Reproduction 10.5 Heredity & Evolution 10.6 Human Health & Diseases

11 General Awareness — History & Geography

11.1 Ancient & Medieval Indian History 11.2 Modern Indian History & Freedom Struggle 11.3 Indian Geography 11.4 World Geography

12 General Awareness — Polity, Economy & Current Affairs

12.1 Indian Polity & Constitution 12.2 Indian Economy 12.3 Science & Technology, Sports & Culture 12.4 Books, Authors, Awards, Days & Organizations 12.5 Current Affairs: Sources, Scope & Strategy

13 After the CBT & Final Strategy

13.1 Physical Efficiency Test (PET) 13.2 Document Verification & Medical Examination 13.3 Final Revision & Exam-Day Strategy

5.3 Coding & Decoding

Key Takeaways Explain This Topic AI

Letter coding shifts each letter by a fixed rule — forward (+n), backward (−n), or skip (every nth letter) — and decoding reverses that rule.

In number coding, letters are replaced by their alphabet positions (A=1…Z=26) and the code is built by addition, multiplication, or reversal of those positions.

Substitution coding maps whole words to symbols or other words; the key is to extract the mapping from the examples given, not to memorise any fixed dictionary.

Mixed coding combines a letter shift with a position reversal or a number substitution — solve it in two stages: undo the shift, then undo the rearrangement.

Always decode by applying the inverse of the coding operation: if the code shifts +3, you shift −3 to recover the original.

Last updated: August 2026

Why Coding/Decoding Matters

Expect 4–6 coding items in the 30-question Reasoning section. They are formulaic: once you classify the code type, the steps are mechanical. The marks come from speed, and speed comes from not panicking when the code looks strange at first glance.

Type 1 — Letter Shift Coding (Caesar Style)

A fixed number is added to (or subtracted from) each letter's position.

Worked example. If CAT is coded as FDW , how is DOG coded?

C(3) → F(6): +3. A(1) → D(4): +3. T(20) → W(23): +3. Rule: shift each letter forward by 3.

Apply to DOG: D(4) → G(7), O(15) → R(18), G(7) → J(10).

Answer: GRJ .

Decoding example. If FDW is the code, what was the original word?

Reverse the shift: F(6) − 3 = C(3), D(4) − 3 = A(1), W(23) − 3 = T(20) → CAT .

The lesson: when decoding, always apply the inverse of the coding operation. If the code shifted forward by +3, you shift backward by −3.

Type 2 — Number Coding

Letters are converted to positions and combined arithmetically.

Worked example. If CAT is coded as 24 , how is DOG coded?

C=3, A=1, T=20 → 3 + 1 + 20 = 24. Rule: sum of letter positions.

DOG: D=4, O=15, G=7 → 4 + 15 + 7 = 26 .

Worked example (product code). If AB is coded as 2 , how is CD coded?

A=1, B=2 → 1 × 2 = 2. Rule: product of positions.

CD: 3 × 4 = 12 .

Type 3 — Substitution Coding

A word is replaced by another word or symbol according to a mapping given in the question.

Worked example. In a code, red means go , green means stop , and yellow means wait . What should you do at a green signal?

The code says green means stop — so the answer is stop , regardless of real-world traffic rules.

These questions test your ability to override prior knowledge with the supplied mapping.

Type 4 — Mixed Coding

A letter shift is combined with a positional operation (reverse, swap, or rotate).

Worked example. If BOOK is coded as CPPL , what is LINE coded as?

B→C (+1), O→P (+1), O→P (+1), K→L (+1). Rule: +1 to each letter.

LINE: L→M, I→J, N→O, E→F.

Answer: MJOF .

Worked example with reverse then shift. If LION is coded as PQKN , what is TIGER coded as?

Reverse LION → NOIL . Then shift +2: N→P, O→Q, I→K, L→N → PQKN . Rule: reverse, then +2 each letter.

Apply to TIGER : reverse → REGIT . Shift +2: R→T, E→G, G→I, I→K, T→V → TGIKV .

Type 5 — Backward (Reverse-Shift) Coding

A code may subtract a fixed number from each letter position rather than add.

Worked example. If ZOO is coded as WLL , what is CAT coded as?

Z(26) → W(23): −3. O(15) → L(12): −3. O(15) → L(12): −3. Rule: shift each letter backward by 3.

Apply to CAT: C(3) − 3 = 0 → 0 + 26 = 26 = Z (wrap-around), A(1) − 3 = −2 → −2 + 26 = 24 = X (wrap), T(20) − 3 = 17 = Q.

Answer: ZXQ .

Note the wrap-around: when a position would fall below 1, add 26 to bring it back into range. C(3) − 3 = 0, and 0 + 26 = 26, which is Z.

Type 6 — Skip Coding

Each letter is replaced by the one n positions ahead — a Caesar shift by n where n is larger than 1.

Worked example. If A is coded as C , B as D , C as E , the rule is +2 (skip one letter between) . Then FOX → F+2=H, O+2=Q, X+2=Z → HQZ .

Skip coding is just letter-shift coding with a larger n; the method is identical. Read off the distance between the first plain letter and the first coded letter — that distance is n.

Number-to-Letter Decoding

Sometimes a numeric code must be decoded back into letters.

Worked example. The code 8, 5, 12, 12, 15 decodes to which word?

8 = H, 5 = E, 12 = L, 12 = L, 15 = O → HELLO .

This is a straight position-to-letter mapping. Keep the alphabet positions memorised so you can do this without counting on your fingers — RRB time pressure does not allow finger-counting.

Worked Example — Non-Uniform Per-Letter Shifts

Some codes use a different shift at each position, drawn from a fixed sequence.

Worked example. If SHIP is coded as VJSL , what is BOAT coded as?

S(19) → V(22): +3. H(8) → J(10): +2. I(9) → S(19): +10. P(16) → L(12): −4 (or +22 with wrap-around).

The shifts are not uniform, so the rule is not a simple Caesar shift. Treat it as a per-position shift sequence: +3, +2, +10, −4.

Apply the same sequence to BOAT : B(2) + 3 = E(5), O(15) + 2 = Q(17), A(1) + 10 = K(11), T(20) − 4 = P(16) → EQKP .

The lesson: when no uniform rule fits the example, record the per-letter shift sequence from the example and apply that same sequence to the new word.

The Decoding Algorithm

Loading diagram... Decoding Decision Flow for Coding/Decoding Questions

Exam Scenarios and Traps

Trap 1 — Direction of shift. A code that adds 3 to encode requires you to subtract 3 to decode. Candidates under time pressure often apply the same direction both ways. Always invert.

Trap 2 — Letter wrap-around. When shifting forward past Z, wrap to A. ZYX shifted +3 becomes CBA (Z→C, Y→B, X→A). Forgetting the wrap produces impossible letters.

Trap 3 — Inconsistent per-position shifts. Some codes use a different shift per position. Verify the shift for every letter before applying the rule — do not assume uniformity from the first letter alone.

Trap 4 — Reverse coding. A code may reverse the word first and then shift: LION → NOIL → (shift +2) → PQKN . To decode, undo the shift (−2) to get NOIL , then reverse to get LION . Order matters: undo the last applied operation first.

Speed Tips

Memorise A=1, B=2, …, Z=26 and the reverse (Z=1, Y=2, …, A=26) so you do not count on your fingers.

For letter shifts, the distance between the first letter of the plain word and the first letter of the code word is the rule — read it off directly.

When the code is numeric, try sum of positions first; if it does not match, try product , then sum of squares .

For mixed codes, write the two operations as (op1 ∘ op2)(word) and apply the inverses in reverse order: op2⁻¹ ∘ op1⁻¹ .