Coding Basics is a reasoning topic in which a word is written in a coded form under a given rule, and the candidate must decode another word or find the code for a new word. The coding rules include letter shifting forward or backward, reversing letters, interchanging positions, using reverse alphabet positions, and assigning numbers to letters. In RRB JE CBT-1, 1 to 3 questions appear per shift from coding, making it one of the most frequent topics in the reasoning paper. Coding questions are formulaic and fast to solve when the rule is identified. The common forms are letter coding, number coding, symbol coding, and mixed coding. A clear understanding of alphabet positions, both forward and reverse, is the foundation for this topic.
Every coding question hides a rule that converts letters or numbers from the plain form to the coded form. Identifying the rule from one example and applying it consistently is the core skill. Below are the main coding methods.
Each letter is replaced by a letter a fixed number of positions ahead. Example: If "CAT" is coded as "FDW", then each letter shifts +3: C to F, A to D, T to W. To decode, shift back by the same amount.
Each letter shifts backward. Example: "DOG" coded as "AME" means D to A (-3), O to L (-3), G to D (-3). The code rule is -3.
Each letter is replaced by its mirror letter, where positions sum to 27. Example: A → Z, B → Y, C → X. If "CAT" is coded as "XZG", then C→X, A→Z, T→G. Reverse coding is applied letter by letter.
Different letters shift by different steps, but the pattern is constant across the code. Example: In "PLAY" coded as "SNCW", P→S is +3, L→N is +2, A→C is +2, Y→W is -2. The rule is applied position-wise.
Each letter is replaced by its alphabet position, sometimes with addition or subtraction of a constant. Example: "BAD" coded as 214 means B=2, A=1, D=4. In another style, each position is increased by 1: "BAD" → 325.
The reverse position of each letter is used. Example: A=26, B=25, C=24. So "CAT" with reverse positions gives C=24, A=26, T=7.
The code of a word is the sum of the positions of its letters. Example: "BAT" = B(2) + A(1) + T(20) = 23. Example: "CAT" = 3 + 1 + 20 = 24.
The letters of the word are rearranged by a fixed rule, such as reversing the order or swapping pairs. Example: "CAT" coded as "TAC" means the word is reversed. Another: "AB" coded as "BA" (swapped).
Method to solve: Write the plain word and its code vertically, letter by letter, and compute the shift for each letter. Check whether the shift is constant (forward or backward), whether letters are mirrored, or whether numbers are involved. Once the rule is identified, apply it to the target word. For number codes, always note whether positions are forward or reverse, and whether a constant is added or subtracted.
| Type | Rule | Plain → Code | New Question |
|---|---|---|---|
| Forward shift | +3 | CAT → FDW | DOG → GRJ |
| Backward shift | -3 | DOG → AME | BAT → YXQ |
| Mirror coding | positions sum to 27 | CAT → XZG | BED → YVW |
| Alternate shifts | position-wise steps | PLAY → SNCW | COLD → FQOG |
| Number positions | A=1...Z=26 | BAD → 214 | DAD → 414 |
| Reverse numbers | A=26...Z=1 | CAT → 24 26 7 | DOG → 11 12 20 |
| Position sum | sum of letter positions | BAT → 23 | DOG → 26 |
| Reversed word | reverse letters | CAT → TAC | DOG → GOD |
| Trick | Detect | Procedure |
|---|---|---|
| Shift test | All letters move equally | Compute first two letters' shift |
| Mirror test | Sum of positions = 27 | Check C ↔ X, A ↔ Z |
| Reverse number test | Code numbers large | Use A=26 ... Z=1 |
| Position-wise test | Shifts differ per slot | Compare letter by letter |
| Sum test | Code is a single number | Add all positions |
| Reversal test | Word order changed | Compare first and last letters |
graph TD
A[Coding question] --> B{Identify the code rule}
B -->|letters shift| C[Compute shift per letter]
B -->|mirror| D[Use pairs summing to 27]
B -->|numbers| E{Forward or reverse positions?}
B -->|reversal| F[Reverse the word order]
C --> G{Constant shift?}
G -->|Yes| H[Apply same shift to target]
G -->|No| I[Apply position-wise shifts]
D --> H
E -->|forward| J[Use A=1 to Z=26]
E -->|reverse| K[Use A=26 to Z=1]
F --> H
J --> H
K --> H
I --> H
H --> L[Write the code of the new word]
flowchart LR
A["If CAT = 214, code DAD"] --> B["C=3? No, code 214 = positions"]
B --> C["B=2, A=1, D=4 in BAD = 214"]
C --> D["So CAT would be 3120"]
D --> E["Rule: letter = its position"]
E --> F["DAD = 4 1 4 = 414"]
| Shortcut | Rule |
|---|---|
| Two-letter verification | Confirm rule on two letters |
| Shift recognition | Constant shift = simple code |
| Reverse-position clue | Large numbers → A=26 |
| Sum code clue | Single number output → sum positions |
| Mirror clue | Pairs sum to 27 |
| Two-way practice | Encode and decode both |
Example 1. If "CAT" is coded as "FDW", how is "DOG" coded? Solution: C→F is +3, A→D is +3, T→W is +3. So each letter shifts +3. D(+3)=G, O(+3)=R, G(+3)=J. Answer: GRJ.
Example 2. If "BAT" is coded as "YXQ", how is "DOG" coded? Solution: B→Y is -3, A→X is -3, T→Q is -3. Each letter shifts -3. D(-3)=A, O(-3)=L, G(-3)=D. Answer: ALD.
Example 3. If "BAD" is coded as "214", how is "DAD" coded? Solution: B=2, A=1, D=4. Each letter is replaced by its position. D=4, A=1, D=4. Answer: 414.
Example 4. If "CAT" is coded as "XZG", how is "BED" coded? Solution: C→X and A→Z and T→G are mirror pairs (positions sum to 27). B mirror is Y, E mirror is V, D mirror is W. Answer: YVW.
Example 5. If the sum of positions of "BAT" is 23, find the code of "DOG". Solution: D=4, O=15, G=7; sum = 4 + 15 + 7 = 26. Answer: 26.
Example 6. If "CAT" is coded as "TAC", how is "DOG" coded? Solution: The word is reversed. "DOG" reversed is "GOD". Answer: GOD.
| Q. No. | Question | Answer |
|---|---|---|
| 1 | CAT → FDW, then SUN → ? | VXQ |
| 2 | DOG → AME, then BAT → ? | YXQ |
| 3 | BAD → 214, then ACE → ? | 135 |
| 4 | CAT → XZG, then DOG → ? | WLT |
| 5 | BAT → 23 (sum of positions), then DOG → ? | 26 |
| 6 | CAT → TAC (reversed), then PEN → ? | NEP |
| 7 | COLD → FQOG (position-wise +3,+2,+3,+3), then WARM → ? | ZCUP |
| 8 | APPLE → BMQQF (+1 each), then MANGO → ? | NBOHP |
| 9 | HEART → SVZIG (mirror coding), then WATER → ? | DZGVJ |
| 10 | INDIA → positions I=9,N=14,D=4,I=9,A=1, then INDIA → ? | 914491 |
| 11 | If PENCIL → QFODJM (+1), then PAPER → ? | QBQFS |
| 12 | If GREEN → HQFFO (+1,-1,+1,+1,+1), then BLUE → ? | CKVD |
Coding Basics is a high-frequency topic in RRB JE CBT-1, appearing in nearly every shift with 1 to 3 questions. It is formulaic and fast, making it an ideal scoring area for candidates who have memorised alphabet positions. The topic overlaps with Alphabet Series and Alphabet Analogies, so preparation for one strengthens the others. Because coding questions are deterministic, regular practice converts them into guaranteed marks. Both encoding and decoding directions, as well as number and symbol coding, should be covered before the exam.
Coding Basics is a reliable, fast-scoring topic in RRB JE CBT-1 reasoning. Master letter shifts, mirror pairs, reverse positions, and number coding, and always verify the rule on two letters before applying it. With consistent practice, coding questions become mechanical, providing quick and accurate marks and reinforcing the alphabet-position skills used across the entire reasoning section.