Skip to content
Free shipping above ₹499
Oakspine Press

Coding–decoding for RRB NTPC: letter, number and sentence codes

If CAT is written DBU, how is DOG written? Coding–decoding questions hide a simple rule inside a word. Letter shifts, reversals, opposite letters, number codes, sentence codes and substitution, with a method for each, seven worked questions and practice.

25 Oct 2026 6 min read

यह गाइड हिंदी में पढ़ें →
In this guide
  1. A method
  2. The common types
  3. Worked questions
  4. Coding direction: a quick check
  5. Common mistakes
  6. Practice set
  7. What to do next

A coding question shows a word and its code, finds a rule hidden between them, and asks you to apply that rule to a new word. Sometimes it runs the other way: you are given a code and asked to decode it. Either way, the job is to find the rule exactly and test it on every letter before you use it.

In NTPC, coding–decoding is a quick question type, usually 30–40 seconds each. The rules are simple: shifts, reversals, opposite letters and number codes. The risk is not difficulty but carelessness, such as a rule that fits three letters and fails on the fourth.

A method

  1. Write the word and its code one under the other, letter by letter.
  2. Write the position of each letter (use EJOTY: E 5, J 10, O 15, T 20, Y 25).
  3. Compare pairs. Is each code letter a fixed shift away? Is the code the word reversed? Is it the opposite letter?
  4. Test the rule on every letter, not just the first two.
  5. Apply it to the new word, and check the answer against the options.

If a simple shift does not work, check whether the word has been reversed first. Reverse-then-shift is the most common "trick" in this topic.

The common types

TypeRuleExample
ShiftEach letter moves by a fixed numberCAT → DBU (+ 1)
ReverseThe word is written backwardsAPPLE → ELPPA
Reverse and shiftReverse, then shift each letterWORD → ESPX (reverse, then + 1)
OppositeEach letter is replaced by its opposite (A ↔ Z)GOOD → TLLW
PositionLetters replaced by their positionsCAT → 3-1-20
SumThe code is the sum of the positionsCAT → 24
SentenceEach word has a code; find it from common wordsSee Q6
SubstitutionObjects are "called" by other namesSee Q7

Some questions use symbols such as #, @ or $ for letters or digits. Treat them exactly like letter codes: match each symbol to its letter and check that the matching is consistent across the whole word.

Worked questions

Q1. If CAT is coded DBU, how is DOG coded?

C → D, A → B, T → U: each letter + 1. DOG → EPH.

Q2. If TIGER is coded SHFDQ, how is LION coded?

T → S, I → H, G → F, E → D, R → Q: each letter − 1. LION → KHNM.

Q3. If WORD is coded ESPX, how is FAST coded?

A shift does not work letter by letter: W → E is not the same shift as O → S. Try reversing: WORD reversed is DROW. Now D → E, R → S, O → P, W → X: each + 1.
So the rule is "reverse, then + 1". FAST reversed is TSAF; + 1 gives UTBG.

Q4. In a code, each letter is replaced by its opposite letter. How is GOOD written?

G (7) → T (20). O (15) → L (12). D (4) → W (23). Each pair adds to 27. GOOD → TLLW.

Q5. If CAT = 24, what is DOG?

CAT = 3 + 1 + 20 = 24, so the code is the sum of positions. DOG = 4 + 15 + 7 = 26.

Q6. In a code language, "sun is hot" is written "la mo pi", "moon is cold" is written "ta mo ri", and "sun and moon" is written "pi ka ta". What is the code for "hot"?

  • "is" appears in the first two sentences, and the only code common to them is mo.
  • "sun" appears in the first and third, and the common code is pi.
  • In "sun is hot" = "la mo pi", sun = pi and is = mo, so hot = la.

The order of codes need not match the order of words. Always find words by what is common between sentences, never by position.

Q7. If sky is called sea, sea is called water, water is called air, what do we drink?

We drink water, and water is called air. The answer is the name given to the real object, not the object itself.

Coding direction: a quick check

A common slip is shifting the wrong way. Before applying a rule, say it in words: "the code is one letter after the word" or "one letter before". Then check one letter of your answer against the given example. If the example goes C → D, your answer must also move forward.

Common mistakes

  • Finding the rule from two letters and not checking the rest.
  • Confusing shift direction (+ 1 vs − 1), especially when decoding.
  • Missing a reversal. If the shifts look random, reverse the word and try again.
  • Assuming sentence codes follow word order. They usually do not.
  • Answering the object, not its name, in substitution questions.
  • Counting positions wrongly. Anchor on EJOTY instead of counting from A.

Practice set

  1. If PEN is coded QFO, how is INK coded?
  2. If BOOK is written KOOB, how is PAGE written?
  3. If CAT = 24 (sum of positions), what is BAT?
  4. If DOG is coded WLT, how is CAT coded?
  5. If MAN is coded NBO, how is WOMAN coded?
  6. If ROAD is coded EBPS, how is LAMP coded?
  7. In a code, "red is good" is written "ka pa ta" and "good is bad" is written "ta zo pa". What is the code for "bad"?
  8. If pen is called pencil, pencil is called eraser, and eraser is called sharpener, what would you use to rub out a pencil mark?

Answers:

  1. JOL. Each letter + 1.
  2. EGAP. The word is reversed.
  3. 23. 2 + 1 + 20.
  4. XZG. Opposite letters: C (3) → X (24), A (1) → Z (26), T (20) → G (7).
  5. XPNBO. Each letter + 1.
  6. QNBM. ROAD reversed is DAOR, and each letter + 1 gives EBPS. LAMP reversed is PMAL; + 1 gives QNBM.
  7. zo. "is" and "good" appear in both sentences, and so do "pa" and "ta". The remaining word "bad" must be "zo".
  8. Sharpener. You rub out a mark with an eraser, and an eraser is called a sharpener.

What to do next

  • Learn the 13 opposite-letter pairs (A–Z to M–N); opposite codes are common.
  • For 20 coding questions, write the positions under both the word and the code before you decide the rule.
  • Revise letter series for fast position work.
  • Then try mathematical operations, which use symbol substitution in arithmetic.

A note on dates and numbers. Exam patterns, vacancies and schedules change from year to year. Always confirm the current details in the latest notification on the Railway Recruitment Boards website .

Get the next RRB NTPC guide by email

New guides every week. No spam, unsubscribe any time.