7 Types of Coding-Decoding Questions in Aptitude Tests
7 coding-decoding question types with 11 worked examples. Letter shift, mirror, number assignment, word substitution, and message decoding for aptitude tests.
Coding-decoding questions test one thing: whether you can extract a substitution rule from a worked example and apply it accurately under time pressure.
TCS NQT, AMCAT, Infosys, Wipro NLTH, and Cocubes all include coding-decoding in their aptitude and logical reasoning sections because it functions as a quick proxy for systematic reasoning. The question gives you a rule implied by a worked example and asks whether you can generalise it without positional errors. Seven distinct types appear across these assessments, and they are covered below with 11 worked examples.
The Alphabet Position Table You Need
One reference handles the arithmetic in almost every coding-decoding question. Memorise five anchor points and interpolate: A=1, E=5, M=13, N=14, T=20, Z=26.
| A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
Type 1: Fixed Letter-Shift Coding
Every letter moves the same number of positions forward or backward in the alphabet. This is the most common type in placement aptitude tests. The shift is constant across all letters in the word. Verify on the first two or three letters before applying to the target.
-
Example 1 (shift +2, coding direction):
-
Given: TEACHER is coded as VGCEJGT.
-
Verify: T(20)+2=V(22), E(5)+2=G(7), A(1)+2=C(3). Shift = +2 for every letter.
-
Question: Code for CHILDREN in the same system?
-
Apply: C(3)+2=E, H(8)+2=J, I(9)+2=K, L(12)+2=N, D(4)+2=F, R(18)+2=T, E(5)+2=G, N(14)+2=P.
-
Answer: EJKNFTGP
-
Example 2 (shift +5, decoding direction):
-
Given: ROAD is coded as WTFI.
-
Verify: R(18)+5=W(23), O(15)+5=T(20), A(1)+5=F(6), D(4)+5=I(9). Shift = +5.
-
Question: What does GJFY decode to?
-
Apply in reverse (subtract 5): G(7)-5=B(2), J(10)-5=E(5), F(6)-5=A(1), Y(25)-5=T(20).
-
Answer: BEAT
Type 2: Reverse-Order Coding
The code is the original word written backward. Identify this type when the coded word contains exactly the same letters as the original but in reverse sequence. No shift arithmetic needed.
- Example 3:
- Given: PENCIL is coded as LICNEP.
- Verify: P-E-N-C-I-L reversed = L-I-C-N-E-P.
- Question: Code for ERASER?
- Apply: E-R-A-S-E-R reversed = R-E-S-A-R-E.
- Answer: RESARE
Type 3: Mirror and Progressive-Shift Coding
Two variants are grouped here because both require per-position calculation rather than a single constant shift.
Mirror coding replaces each letter with its alphabetic mirror. The formula: code position = 27 minus original position. So A(1) maps to Z(26), B(2) maps to Y(25), C(3) maps to X(24), and so on.
- Example 4 (mirror coding):
- Given: COLD is coded as XLOW.
- Verify: C(3) gives 27-3=24=X, O(15) gives 27-15=12=L, L(12) gives 27-12=15=O, D(4) gives 27-4=23=W.
- Question: Code for FACE?
- Apply: F(6) gives 27-6=21=U, A(1) gives 27-1=26=Z, C(3) gives 27-3=24=X, E(5) gives 27-5=22=V.
- Answer: UZXV
Progressive-shift coding increases the shift by one for each successive letter position in the word.
- Example 5 (progressive shift):
- Given: ABCDE is coded as BDFHJ.
- Verify: A(1)+1=B(2), B(2)+2=D(4), C(3)+3=F(6), D(4)+4=H(8), E(5)+5=J(10). Shift grows by 1 per position.
- Question: Code for FACE?
- Apply: F(6)+1=G(7), A(1)+2=C(3), C(3)+3=F(6), E(5)+4=I(9).
- Answer: GCFI
Type 4: Number-Assignment Coding
Each letter is assigned a unique digit. The digit-to-letter map is not stated directly; you reconstruct it by matching common letters across the coded words given.
-
Example 6:
-
Given: ROSE = 6821, CHAIR = 73456, PREACH = 961473.
-
Extract: R=6, O=8, S=2, E=1 from ROSE. C=7, H=3, A=4, I=5 from CHAIR (R=6 consistent). P=9 from PREACH (all prior assignments consistent).
-
Question: Code for SEARCH?
-
Apply: S=2, E=1, A=4, R=6, C=7, H=3.
-
Answer: 214673
-
Example 7:
-
Given: SUN = 275, MOB = 394, BUS = 372.
-
Extract: S=2, U=7, N=5 from SUN. M=3, O=9, B=4 from MOB. Cross-check BUS: B=4, U=7, S=2. Consistent.
-
Question: Code for BONUS?
-
Apply: B=4, O=9, N=5, U=7, S=2.
-
Answer: 49572
Type 5: Word-Substitution Coding
Entire words are relabelled with different words. No letter-position arithmetic applies. The common trap: a student answers with the real-world term (“sky”) and forgets to apply the substitution (“star”).
- Example 8:
- Given: “sky” is called “star,” “star” is called “cloud,” “cloud” is called “earth.”
- Question: Where do birds fly?
- Logic: Birds fly in the sky. In this code, “sky” is called “star.”
- Answer: star
Type 6: Message Decoding
Two or three coded sentences are given. You isolate a word’s code by finding which sentences share that word and identifying the code word common to both.
-
Example 9:
-
Given:
- “sun shines brightly” is coded as “ba lo sul”
- “houses are brightly lit” is coded as “kado ula ari ba”
- “light comes from sun” is coded as “dopi kup lo nro”
-
“sun” appears in sentences 1 and 3. Common code across both: “lo.” Code for sun = lo.
-
“brightly” appears in sentences 1 and 2. Common code across both: “ba.” Code for brightly = ba.
-
Answer: sun = lo, brightly = ba
-
Example 10:
-
Given:
- “cat eats fish” is coded as “mop kir dul”
- “dog eats bone” is coded as “sir kir pav”
- “cat drinks water” is coded as “mop bun zal”
-
“eats” appears in sentences 1 and 2. Common code: “kir.” Code for eats = kir.
-
“cat” appears in sentences 1 and 3. Common code: “mop.” Code for cat = mop.
-
In sentence 1, cat=mop and eats=kir are assigned. The remaining code “dul” maps to the remaining word “fish.”
-
Answer: fish = dul
Type 7: Conditional and Mixed Coding
Different rules apply to different letter classes within the same word. The most common variant treats vowels and consonants differently.
- Example 11 (vowel/consonant split):
- Rule: Vowels in the original word become $ in the code; consonants shift forward by +1.
- Given: FACE is coded as G$D$.
- Verify: F (consonant)+1=G, A (vowel)=$, C (consonant)+1=D, E (vowel)=$.
- Question: Code for COLD?
- Apply: C (consonant)+1=D, O (vowel)=$, L (consonant)+1=M, D (consonant)+1=E.
- Answer: D$ME
A 3-Step Routine for Any Coding-Decoding Question
Most coding-decoding questions resolve cleanly with three steps applied in order:
-
Identify the type. Is the code made of letters, digits, or words? Same character count as the original? Digits signal number-assignment coding. Letters matching the original count suggest shift or mirror coding. A word-for-word swap with no letter manipulation points to substitution coding. Multiple coded sentences with isolated word comparisons signal message decoding.
-
Extract the rule from the given example. For letter codes, compute the shift for the first three letters individually. A constant shift means fixed-shift coding. A shift that grows by 1 each time means progressive coding. A result equal to 27 minus original position means mirror coding. Verify at least two letters before applying. Never assume the pattern.
-
Apply consistently and explicitly. Write the source word and target in aligned rows, compute each step, read off the answer. Speed comes from alphabet-position recall being automatic, not from skipping the verification step.
IndiaBix’s coding-decoding practice bank has over 200 sets organised by sub-type, which is useful for timed repetition after you are comfortable with each variant. GeeksforGeeks also covers each variant with theory and worked examples alongside the drills.
Coding-decoding belongs to the same aptitude cluster as clock arithmetic problems and calendar questions, where a short explicit method consistently beats trial-and-error. Blood relations and statements and assumptions follow the same logic: systematic labelling replaces guesswork.
The underlying skill is identical across all these types: extract a rule from one worked example, verify it holds, apply it to new inputs. Applied to AI systems, that same process becomes prompt engineering, where you write an instruction, run a test case, check whether the model’s output matches the expected pattern, and then scale. TinkerLLM at ₹299 is where that connection becomes hands-on, using the same extraction-and-verification approach this article has demonstrated on aptitude ciphers.
Primary sources
Frequently asked questions
How many coding-decoding questions appear in TCS NQT?
TCS NQT typically includes 3 to 5 coding-decoding questions per sitting across the Verbal Ability and Reasoning sections. The exact count varies across test versions, so practise all 7 types rather than drilling only one.
What is the quickest way to solve a letter-shift coding question?
Write the original and coded letters side by side, compute the position difference for the first two or three letters, verify the pattern is consistent, then apply it to the target word.
Can the shift value differ for different positions within the same word?
Yes. Progressive-shift questions use a different increment per position: +1 for the first letter, +2 for the second, +3 for the third, and so on. Always check each position separately before assuming a fixed shift.
How do I solve message-decoding questions quickly?
List the coded sentences and mark words that appear in exactly two sentences. Find the code word that is common to both sentences for that word, then verify against the third sentence to confirm.
Do coding-decoding questions appear in AMCAT?
Yes. AMCAT's Logical Ability module includes coding-decoding questions, typically as letter or number coding variants. Difficulty is moderate and similar to TCS NQT patterns.
What is the difference between coding and decoding in aptitude?
Coding applies a rule to produce a cipher from a given word. Decoding reverses the rule to recover the original word from a cipher. Most aptitude questions give a worked example and ask you to code a new word or decode a given cipher.
A self-paced playground for building with LLMs.
TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.
Try TinkerLLM (₹299 launch)