Current Affairs updated daily
KalviGavaniKalviGavani
Practice this topic
All aptitude topics
Logical ReasoningbeginnerTNPSCSSCBank PORailwayPlacement

Coding and Decoding — Shortcuts, Tricks, and Solved Examples | TNPSC, SSC, Placement

Master Coding and Decoding for TNPSC, SSC, Bank PO, and placements. Letter coding, number coding, reverse coding, 8 solved examples, and 10 practice questions.

~8 min read

Quick Concept Summary

Coding-Decoding questions give you a word and its coded form. You must identify the pattern and use it to decode or encode a new word.

Core approach — 3 steps: 1. Compare original letter to code letter and find the relationship 2. Confirm with 2–3 more letters 3. Apply the same rule to the new word


Alphabet Reference Table

PosLetterOppositeReverse pos
1AZ26
2BY25
3CX24
4DW23
5EV22
6FU21
7GT20
8HS19
9IR18
10JQ17
11KP16
12LO15
13MN14

Types of Coding

Type 1 — Letter Shift Coding

Each letter is shifted by a fixed number of positions.

Example: If A→C, B→D, C→E ... then the shift is +2.

Example: If A→Y, B→Z, C→A ... then the shift is −2 (backward).


Type 2 — Number Coding

Letters are replaced by their position numbers or a modification of them.

Example: If A→1, B→2 ... BACK = 2+1+3+11 = 17 (sum of positions)

Example: If A→2, B→4, C→6 ... (double the position number)


Type 3 — Reverse Alphabet Coding

Each letter is replaced by its mirror (opposite) in the alphabet.

A↔Z, B↔Y, C↔X, D↔W ... (positions add to 27)


Type 4 — Positional Coding

Letters are written in reverse order, or odd/even positions are swapped.


Type 5 — Symbol/Mixed Coding

Letters are replaced by symbols, digits, or a combination. Decode by finding which symbol corresponds to which letter.


Worked Examples

Example 1 — Forward Shift

Q: If HELLO is coded as JGNNQ, how is WORLD coded?

SolutionH→J (+2), E→G (+2), L→N (+2), L→N (+2), O→Q (+2)

Pattern: shift each letter forward by 2.

W→Y, O→Q, R→T, L→N, D→F

AnswerYQTNF

Example 2 — Backward Shift

Q: In a code language, TIGER is written as QFDRP. What does CAMEL stand for?

SolutionT(20)→Q(17): shift = −3 I(9)→F(6): −3 ✓ G(7)→D(4): −3 ✓

Pattern: shift each letter backward by 3.

C(3)→Z(26)? No — 3−3=0, so wrap: use Z. → Z

Actually: C(3)−3 = 0 → use the 26th letter = Z? Let's be precise: subtract 3, if ≤0 add 26.

C(3)−3 = 0 → 0+26 = 26 = Z A(1)−3 = −2 → −2+26 = 24 = X M(13)−3 = 10 = J E(5)−3 = 2 = B L(12)−3 = 9 = I

AnswerZXJBI

Example 3 — Reverse Alphabet

Q: If EXAM is coded as VCNZ in some code, what is the code for PASS?

SolutionE(5) → V(22). 5+22=27 ✓ (opposite coding) X(24) → C(3). 24+3=27 ✓

Pattern: each letter is replaced by its opposite in the alphabet.

P(16) → K(11). 16+11=27 ✓ A(1) → Z(26) S(19) → H(8). 19+8=27 ✓ S(19) → H(8)

AnswerKZHH

Example 4 — Number Coding (Sum)

Q: If BOARD = 45, what does CHAIR equal?

SolutionB(2)+O(15)+A(1)+R(18)+D(4) = 40. Hmm, not 45.

Try B=2,O=15,A=1,R=18,D=4 → sum = 40 ≠ 45. Let me use a different interpretation.

If each letter = its position value and we add: B(2)+O(15)+A(1)+R(18)+D(4) = 40

Try B=2,O=15,A=1,R=18,D=9 (D=4th letter but coded as 9?). Let me try another pattern.

Suppose vowels = vowel position × 2: A→2, E→10, I→18, O→30, U→42 B=2, O=30, A=2, R=18, D=4 → 2+30+2+18+4 = 56. No.

Standard approach: BOARD = sum of letter positions = 2+15+1+18+4 = 40. If BOARD = 45, the constant added is +5 (one per letter: 5 letters).

Verify: BOARD (5 letters) → 40 + 5 = 45 ✓

CHAIR = C(3)+H(8)+A(1)+I(9)+R(18) = 39 + 5 (for 5 letters) = 44


Example 5 — Letter Reversal in Word

Q: In a certain code, PENCIL is written as LICNEP. How is MANGO written?

SolutionPENCIL → LICNEP: the word is written in reverse order.

MANGO reversed = OGNAM


Example 6 — Mixed: Shift + Reverse Word

Q: If CHAIR is coded as BGJHQ, what is the code for TABLE?

SolutionC(3)→B(2): −1 H(8)→G(7): −1 A(1)→J(10)? Wait, that's +9 not −1.

Let me try a different pattern — maybe the word is reversed first, then shifted:

CHAIR reversed = RIAH C R(18)→B(2)? Not consistent.

Or shifted: C→B(−1), H→G(−1), A→J? That doesn't work uniformly.

Try: odd positions shift −1, even positions shift +2? C(pos1)→B(−1): C→B ✓ H(pos2)→G? No, +2 would give J not G. Let me try −1: H→G(−1) ✓ A(pos3)→J? −1 would give Z. Not matching.

Hmm. Let me try: each letter position in alphabet −1 and the word is written in a shifted way: C=3→B=2(−1), H=8→G=7(−1), A=1→Z=26(−1, wrapping)? But code shows J not Z.

Let me check the original again — CHAIR→BGJHQ: C(3)→B(2): −1 H(8)→G(7): −1 A(1)→J(10): +9 (not consistent)

Perhaps the encoding is: alternate letters shift differently. This is a complex example.

Let me use a cleaner example instead.

Example 6 (revised) — Positional reversal with shift:

Q: If HOUSE is coded as FMRQC, how is LIGHT coded?

H(8)→F(6): −2 O(15)→M(13): −2 U(21)→R(18)? 21−2=19=S, not R.

21−3=18=R, so maybe −3? H(8)−3=5=E, not F.

H→F is −2. Let me try: position difference varies. H=8, F=6: diff=2 O=15, M=13: diff=2 U=21, R=18: diff=3 S=19, Q=17: diff=2 E=5, C=3: diff=2

Almost all −2 except U→R which is −3. Likely the shift is −2: U(21)−2=19=S not R. Possible typo in example. Let me use a clean example.


Example 6 (clean) — Number Code Lookup

Q: In a code, a=1, b=2, c=3 ... and spaces are ignored. If CODE = 3+15+4+5 = 27, what is LOGIC?

SolutionL(12)+O(15)+G(7)+I(9)+C(3) = 46

Example 7 — Symbol Coding

Q: If in a code: D=4, O=15, G=7 and DOG is written as 4157 (digit concatenation, not sum), what is CAT written as?

SolutionC(3), A(1), T(20)

Written as digit concatenation: 3120


Example 8 — Decoding

Q: In a code where each letter is shifted forward by 3, the word BDUV stands for what word in English?

SolutionTo decode, shift BACK by 3: B(2)−3 = −1 → +26 = 25 = Y D(4)−3 = 1 = A U(21)−3 = 18 = R V(22)−3 = 19 = S

Decoded word: YARS — wait, that doesn't make a word. Let me try shifting back 3:

Actually: if encoding adds 3 (A→D, B→E...), then to decode subtract 3. B→Y (2−3=−1, +26=25=Y) D→A (4−3=1=A) U→R (21−3=18=R) V→S (22−3=19=S)

YARS — not a real word. Let me try B(2)−3: if we can't go below 1, add 26: 2−3+26=25=Y. Hmm. Let me pick a cleaner example.

Q: In a code where each letter is shifted forward by 3 (A→D, B→E, ..., X→A, Y→B, Z→C), what does KHOOR mean?

SolutionDecode by shifting backward 3: K(11)−3=8=H H(8)−3=5=E O(15)−3=12=L O(15)−3=12=L R(18)−3=15=O

Decoded: HELLO ✓


Shortcuts and Tricks

Trick 1 — Always check the shift first Find code for first letter, calculate shift (+ or −). Confirm with second letter. If consistent, apply to all.

Trick 2 — Opposite pairs (sum = 27) A↔Z, B↔Y, C↔X, D↔W, E↔V, F↔U, G↔T, H↔S, I↔R, J↔Q, K↔P, L↔O, M↔N

Trick 3 — Reverse order If the coded word has the same letters but rearranged — check if it's the original word reversed (palindrome test).

Trick 4 — Word length If the code has the same number of letters as the original, it's likely letter substitution. If it's a number, it may be a sum of positions.


Exam Pattern

TNPSC Mental Ability: 3–5 questions on coding-decoding per paper. Mostly letter shift (+1, +2, −1, −2) or reverse alphabet. Rarely complex.

SSC/Bank: Up to 5 questions. May include mixed patterns (vowels shifted differently, consonants differently).

Placements: 2–3 questions. Usually straightforward letter/number coding.


Practice Questions

#QuestionAnswer
1If CAT = ECV (+2 shift), code DOG = ?FQI
2If BOOK is coded as ZMMI (opposite), code PEN = ?KVM
3If ABCD = DCBA (reversed), code MANGO = ?OGNAM
4If A=1,B=2...Z=26, what is SUM of KING?K(11)+I(9)+N(14)+G(7)=41
5If SMART is coded as RMBQS (−1 shift), code BRAVE = ?AQZUD
6If PENCIL = QFODJM (+1 shift), code BOARD = ?CPBSE
7If TIGER = VKIGV (+2 odd positions, +0 even), code LION = ?NION
8Decode KHOOR if coding is +3 shift (A→D)HELLO
9If ROAD is coded as 18+15+1+4=38, code STAR = ?19+20+1+18=58
10If Z=1, Y=2, X=3... (reverse), code CAT = ?C=24,A=26,T=7 → 24,26,7

Frequently Asked Questions

The main types are: 1) Letter coding (shift letters forward or backward), 2) Number coding (assign numbers to letters), 3) Reverse coding (mirror the alphabet), 4) Symbol coding (replace letters with symbols), 5) Mixed coding (combination of letter and number patterns).