Coding-Decoding for RRB NTPC — Master Every Pattern in One Read

intermediate 18 min read

Concept

Coding-Decoding is one of the most reliable marks-givers in RRB NTPC reasoning. The question gives you a word-pair where the second word is the "code" of the first. Your job is to find the rule, then apply it to a new word. That's it — no logic traps, no ambiguity. Just pattern recognition.

Think of it like a lock-and-key puzzle. The examiner hands you one lock already opened (the example pair) and asks you to open a new lock using the same key. Your only task is to figure out what the key does.

Here's the mental model that works across all question types: every coding rule is just a transformation. Something happens to each letter — it moves forward, moves backward, gets replaced by its alphabet position number, or gets swapped with a fixed substitute. You need to identify what the transformation is and whether it applies to each letter individually or to the whole word.

The analogy that helps in the exam hall — imagine the alphabet is a number line from 1 to 26. A coding rule is just an instruction like "add 1 to every coordinate" or "reflect across the midpoint." Once you see the number line, letter shifts become trivial arithmetic.

In RRB NTPC, roughly 80% of coding-decoding questions fall into just three categories: +1 or -1 shift (next/previous letter), alphabet position substitution (A=1, B=2... Z=26), and small number-substitution grids. The remaining 20% are variations — reverse alphabet (A=26, B=25...), mixed shifts, or word-level coding. You don't need exotic techniques. You need to be fast and systematic.

One important check before you start solving: always verify the given code against the example word completely — all letters, not just the first one. Beginners verify one or two letters, guess the pattern, and get trapped on questions where the rule changes mid-word or uses a different alphabet mapping.


Deep Dive

Type 1 — Letter Shift Coding

The most common type. Each letter shifts by a fixed number of positions in the alphabet.

Rule: If the shift is +n, replace each letter with the letter that comes n places after it. If the shift is -n, go n places before.

To find the shift, subtract the position of the original letter from the position of the coded letter.

Example: BOOK → CPPL

Confirmed: shift = +1 for all letters.

Key alphabet positions you must memorize (or be able to derive in under 3 seconds):

| Letter | Position | Letter | Position | |--------|----------|--------|----------| | A | 1 | N | 14 | | B | 2 | O | 15 | | E | 5 | R | 18 | | G | 7 | S | 19 | | I | 9 | T | 20 | | J | 10 | U | 21 | | L | 12 | V | 22 | | M | 13 | W | 23 |

For the rest, use: position = (count from A). But for common letters like E, G, I, M, R, T — memorize them cold.

Wraparound: When shift takes you past Z (position 26), wrap around. Z+1 = A. This rarely appears in RRB NTPC but when it does, use modular arithmetic: (position + shift - 1) mod 26 + 1.

Type 2 — Alphabet Position Coding (Number Coding)

Each letter is replaced by its ordinal position in the alphabet. A=1, B=2, ..., Z=26.

Example: CAR → 3-1-18

Reverse variant: A=26, B=25, ..., Z=1. Check by seeing if A maps to 26 in the given code.

How to spot this quickly: If the coded output contains numbers and the numbers for a word like "BOY" come out as 2, 15, 25 — that's standard A=1 coding. If they come out as 25, 12, 2 — that's reverse (A=26) coding.

Type 3 — Substitution / Grid Coding

A specific cipher key is given or implied by the example. Each letter has a unique substitute with no arithmetic pattern.

Example: COMPUTER → 31475028

To decode a new word, extract only the letter-to-number mappings you need from the given key. Don't try to find a pattern — there is none. Just use the lookup table.

Trap: Sometimes a letter appears in the code word but not in the given key word. Read the question carefully — it may give multiple examples, or the question itself may only ask for letters present in the key.

Type 4 — Word-Level and Sentence Coding

Words in a sentence are replaced by other words. The position of the word in the sentence does not change; the substitute is fixed. Cross-reference two coded sentences to identify what each word's code is.

This type is less common in RRB NTPC than letter-level coding. If you see it, use a two-column matching approach: list the original words and their codes side by side from both given sentences, then find the intersection to isolate individual word codes.

Checking Your Pattern

Always verify using all letters of the given word before applying to the target word. One confirming letter is not enough — it could be coincidence. Three confirming letters with no anomaly is sufficient confidence to proceed.


Memory Tricks & Shortcuts

patternEJOTY — The Position Anchor

Memorize one sequence: E=5, J=10, O=15, T=20, Y=25. These are every 5th letter. From any anchor, you can reach any other letter in at most 2 steps of counting. For example, to find R: start from O(15), count forward 3 → R=18. Standard method (counting A to R) takes 18 counts. With EJOTY anchor, it takes 3 counts. Speed gain: counting time drops from ~4 seconds to under 1 second for any letter.

patternReverse Alphabet Mirror

For reverse alphabet coding (A=26, Z=1), use the formula: reverse position = 27 - forward position. So M(13) in reverse = 27-13 = 14 = N. You don't need to recount from Z. Standard method: recount from Z each time (~5 seconds per letter). Shortcut: one subtraction (~1 second per letter). For a 5-letter word, saves roughly 20 seconds total — enough to bank on a borderline question.

eliminationShift Verification Before Solving

Before applying your detected shift to the answer word, eliminate wrong options using only the first letter of the answer. On a +1 shift, if the target word starts with P, the code must start with Q. Check all four options — usually 2-3 are eliminated immediately. Then confirm with the second letter. This reduces full-word computation for 80% of questions. Standard approach: compute all 4-5 letters of the code, then match. This approach: compute 1-2 letters, eliminate, done. Step count: 5 steps → 2 steps.

patternAlphabet Position — The A=1 Quick Check

If you see a number code and suspect A=1 mapping, test it on the most distinctive letter in the given word — one with an unusual position like Q(17), X(24), or Z(26). If that position number appears in the code, the pattern is confirmed instantly. Do not test on A, E, I — their positions (1, 5, 9) are too close together and might match by accident. One distinctive test letter confirms the pattern in under 3 seconds vs. testing 3 common letters (~9 seconds).

eliminationOption Elimination on Number Codes

For number-coded words, always check the most unique digit in the answer options first. If three options share the first two digits and differ on the third, compute only the third letter of the target word. Identify what that letter maps to in the given key. Match it against the differing digit in the options. This zero-in approach solves most number-substitution questions in 2 computations instead of 4-5. Step count savings: 3 steps eliminated per question on average.


Fast-Solving Framework

When a coding-decoding question appears, run this decision tree:

Step 1 — Identify the code type. Look at the output format. Is it letters? → Letter coding. Is it numbers? → Number or position coding. Is it words? → Word-level coding.

Step 2 — For letter codes, subtract the position of the first letter from its code letter. That's your tentative shift. Verify on two more letters. If all match — it's a uniform shift. Apply to target word.

Step 3 — For number codes, check if the numbers fall between 1-26. If yes, try A=1 mapping. Check one distinctive letter. Confirmed? Build the mapping table and look up only what you need.

Step 4 — For substitution codes (no arithmetic pattern), extract the full cipher from the example. Map the target word letter by letter.

Step 5 — Use first-letter elimination. Before computing everything, check which answer options start with the correct code for the first letter of the target word. Eliminate non-matching options. Then confirm with one more letter.

Total time target: 45-60 seconds per question. If you are past 60 seconds and haven't confirmed the pattern, flag it and move on.


Solved PYQs

Why this question: Tests whether you can identify +1 shift from a longer, less familiar word and apply it cleanly without position-counting errors.

Previous Year Questionपिछले वर्ष का प्रश्न
In a certain code language, 'BOOK' is written as 'CPPL'. How is 'TREE' written in that code?
किसी कोड भाषा में 'BOOK' को 'CPPL' लिखा जाता है। तो उसी कोड में 'TREE' को कैसे लिखा जाएगा?
  1. USFF
  2. TQDD
  3. UQFF
  4. VSGG
  1. USFF
  2. TQDD
  3. UQFF
  4. VSGG
Solutionसमाधान
Each letter is shifted by +1 position in the alphabet. B→C, O→P, O→P, K→L. Similarly, T→U, R→S, E→F, E→F gives USFF.
प्रत्येक अक्षर को वर्णमाला में +1 स्थान आगे बढ़ाया गया है। B→C, O→P, O→P, K→L। इसी प्रकार, T→U, R→S, E→F, E→F से USFF मिलता है।

Solving path: Confirm shift by checking B→C (+1), O→P (+1), K→L (+1). All consistent. Apply: T(20)→U(21), R(18)→S(19), E(5)→F(6), E(5)→F(6). Code = USFF. Use first-letter elimination: only option A starts with U. Confirmed in under 30 seconds.


Why this question: Tests the standard A=1 alphabet position mapping — the most fundamental number-coding pattern. Tests whether you can hold two examples simultaneously and cross-verify.

Previous Year Questionपिछले वर्ष का प्रश्न
If in a certain code language, 'BOY' is coded as '25, 15, 25' and 'COW' is coded as '3, 15, 23', then 'DOG' will be coded as:
यदि किसी कोड भाषा में 'BOY' को '25, 15, 25' और 'COW' को '3, 15, 23' लिखा जाता है, तो 'DOG' को कैसे लिखा जाएगा?
  1. 4, 15, 7
  2. 7, 15, 4
  3. 4, 12, 7
  4. 7, 12, 4
  1. 4, 15, 7
  2. 7, 15, 4
  3. 4, 12, 7
  4. 7, 12, 4
Solutionसमाधान
Letters are coded as their position numbers in alphabet. B=2, O=15, Y=25; C=3, O=15, W=23. Therefore, D=4, O=15, G=7.
अक्षरों को उनकी वर्णमाला में स्थिति संख्या के रूप में कोड किया गया है। B=2, O=15, Y=25; C=3, O=15, W=23। अतः D=4, O=15, G=7।

Solving path: From BOY: B=2, O=15, Y=25 — matches A=1 standard. Verify with COW: C=3, O=15, W=23 — confirmed. Apply: D=4, O=15, G=7. Answer: 4, 15, 7.


Why this question: Tests a clean +1 shift on a word where several letters are adjacent in the alphabet — a situation where careless counting often produces errors.

Previous Year Questionपिछले वर्ष का प्रश्न
In a certain code, 'TRAIN' is written as 'USBJO'. How is 'PLANE' written in that code?
किसी कोड में 'TRAIN' को 'USBJO' लिखा जाता है। तो उसी कोड में 'PLANE' को कैसे लिखा जाएगा?
  1. QMBOF
  2. QMCOF
  3. QMBPF
  4. RMBOF
  1. QMBOF
  2. QMCOF
  3. QMBPF
  4. RMBOF
Solutionसमाधान
Each letter is replaced by the next letter in alphabetical order. T→U, R→S, A→B, I→J, N→O. Similarly, P→Q, L→M, A→B, N→O, E→F gives QMBOF.
प्रत्येक अक्षर को वर्णमाला में अगले अक्षर से बदला गया है। T→U, R→S, A→B, I→J, N→O। इसी प्रकार, P→Q, L→M, A→B, N→O, E→F से QMBOF मिलता है।

Solving path: T→U, R→S, A→B, I→J, N→O confirms +1. Apply to PLANE: P→Q, L→M, A→B, N→O, E→F = QMBOF. Eliminate: only option A starts with Q and has M as second letter.


Why this question: Tests number substitution where the cipher is given via a longer word. Forces you to extract only relevant letter codes, not compute the whole alphabet.

Previous Year Questionपिछले वर्ष का प्रश्न
If 'COMPUTER' is coded as '31475028', what is the code for 'MOUSE'?
यदि 'COMPUTER' को '31475028' कोड किया गया है, तो 'MOUSE' का कोड क्या होगा?
  1. 41562
  2. 47562
  3. 41672
  4. 47672
  1. 41562
  2. 47562
  3. 41672
  4. 47672
Solutionसमाधान
C=3, O=1, M=4, P=7, U=5, T=0, E=2, R=8. From this we get M=4, O=1, U=5, S=6 (not directly given, but following pattern), E=2. So MOUSE = 41562.
C=3, O=1, M=4, P=7, U=5, T=0, E=2, R=8। इससे हमें M=4, O=1, U=5, S=6 (सीधे नहीं दिया गया, लेकिन पैटर्न के अनुसार), E=2 मिलता है। अतः MOUSE = 41562।

Solving path: From COMPUTER: C=3, O=1, M=4, P=7, U=5, T=0, E=2, R=8. For MOUSE: M=4, O=1, U=5. S is not in COMPUTER — but options differ at position 4. Check: option A gives S=6. Verify by elimination — options B, C, D have M=4 or 7, O=1 or 7, U=5 or 6. Only option A has M=4, O=1, U=5. That alone pins it as the answer. Code = 41562.


Why this question: Tests whether you apply shift coding to a word with a double letter (EE) and don't trip up by treating repeated letters differently.

Previous Year Questionपिछले वर्ष का प्रश्न
In a certain code, 'CHAIR' is written as 'DIBJS'. What will be the code for 'TABLE'?
एक निश्चित कोड में 'CHAIR' को 'DIBJS' लिखा जाता है। तो 'TABLE' का कोड क्या होगा?
  1. UBCMF
  2. TBCMF
  3. UBDMF
  4. TBDMF
  1. UBCMF
  2. TBCMF
  3. UBDMF
  4. TBDMF
Solutionसमाधान
Each letter is shifted by +1 position. C→D, H→I, A→B, I→J, R→S. For TABLE: T→U, A→B, B→C, L→M, E→F gives UBCMF.
प्रत्येक अक्षर को +1 स्थान आगे बढ़ाया गया है। C→D, H→I, A→B, I→J, R→S। TABLE के लिए: T→U, A→B, B→C, L→M, E→F से UBCMF मिलता है।

Solving path: C→D, H→I, A→B, I→J, R→S. Shift = +1. Apply to TABLE: T→U, A→B, B→C, L→M, E→F = UBCMF. Eliminate: option B starts with T (wrong, no shift applied), option C has D as third letter (wrong), option D starts with T. Only A = UBCMF.


Common Mistakes


Related Topics

Practice on SarkariRise

Sign up + get 3 free mocks →