In this guide
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
- Write the word and its code one under the other, letter by letter.
- Write the position of each letter (use EJOTY: E 5, J 10, O 15, T 20, Y 25).
- Compare pairs. Is each code letter a fixed shift away? Is the code the word reversed? Is it the opposite letter?
- Test the rule on every letter, not just the first two.
- 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
| Type | Rule | Example |
|---|---|---|
| Shift | Each letter moves by a fixed number | CAT → DBU (+ 1) |
| Reverse | The word is written backwards | APPLE → ELPPA |
| Reverse and shift | Reverse, then shift each letter | WORD → ESPX (reverse, then + 1) |
| Opposite | Each letter is replaced by its opposite (A ↔ Z) | GOOD → TLLW |
| Position | Letters replaced by their positions | CAT → 3-1-20 |
| Sum | The code is the sum of the positions | CAT → 24 |
| Sentence | Each word has a code; find it from common words | See Q6 |
| Substitution | Objects are "called" by other names | See 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
- If PEN is coded QFO, how is INK coded?
- If BOOK is written KOOB, how is PAGE written?
- If CAT = 24 (sum of positions), what is BAT?
- If DOG is coded WLT, how is CAT coded?
- If MAN is coded NBO, how is WOMAN coded?
- If ROAD is coded EBPS, how is LAMP coded?
- 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"?
- 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:
- JOL. Each letter + 1.
- EGAP. The word is reversed.
- 23. 2 + 1 + 20.
- XZG. Opposite letters: C (3) → X (24), A (1) → Z (26), T (20) → G (7).
- XPNBO. Each letter + 1.
- QNBM. ROAD reversed is DAOR, and each letter + 1 gives EBPS. LAMP reversed is PMAL; + 1 gives QNBM.
- zo. "is" and "good" appear in both sentences, and so do "pa" and "ta". The remaining word "bad" must be "zo".
- 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.