Coding-Decoding Questions with Solutions
Coding-Decoding questions give you a rule in disguise — one coded example — and ask you to apply the same rule to a new word or sentence. There’s no single trick that cracks every question, but four rule-types cover almost everything that’s actually asked. Here they are, with a fully worked example each, plus a few to try yourself.
The common rule-types, quickly
- Shift ciphers: every letter moves forward or backward by the same fixed number of places in the alphabet (e.g., CAT → DBU is a +1 shift on every letter).
- Mirror/reverse-alphabet codes: each letter is replaced by the letter the same distance from the OTHER end of the alphabet (A↔Z, B↔Y, C↔X, and so on).
- Numeric codes: each letter is replaced by its position number in the alphabet (A=1, B=2, … Z=26), or by some fixed arithmetic on that position.
- Word-substitution codes: whole words (not letters) are swapped for code-words, usually shown across two coded sentences that share a word — matching the repeated word to the repeated code cracks it.
Worked examples
1. In a certain code language, CAT is written as DBU. How will DOG be written in that language?
Solution
- Compare each letter: C→D, A→B, T→U — every letter has shifted forward by exactly 1 place in the alphabet.
- Apply the same +1 shift to D, O, G: D→E, O→P, G→H.
Answer: EPH
2. In a certain code language, "pen is good" is written as "ab cd ef", and "good is costly" is written as "ef cd gh". What is the code for "costly" in this language?
Solution
- "pen", "is", "good" code to "ab", "cd", "ef" (in order) in the first sentence; "good", "is", "costly" code to "ef", "cd", "gh" (in order) in the second.
- "is" and "good" are the words common to both sentences, and "cd" and "ef" are the codes common to both coded sentences — so together, {is, good} = {cd, ef}.
- "costly" is the only word in the second sentence that does not appear in the first, so its code must be the only code in the second sentence that does not appear among the first sentence’s codes.
- That code is "gh".
Answer: gh
3. In a code, each letter of a word is replaced by the letter that is the same distance from the end of the alphabet as the original letter is from the start (A↔Z, B↔Y, C↔X, and so on). How will FLOWER be coded?
Solution
- Position from the start: F=6, L=12, O=15, W=23, E=5, R=18.
- Mirror position from the end: position p maps to (27 − p) — so F(6)→21=U, L(12)→15=O, O(15)→12=L, W(23)→4=D, E(5)→22=V, R(18)→9=I.
- Putting the coded letters together in order: U, O, L, D, V, I.
Answer: UOLDVI
4. In a code, each letter is replaced by its position number in the English alphabet (A=1, B=2, … Z=26), separated by hyphens. If WATER is coded as 23-1-20-5-18, how will EARTH be coded?
Solution
- Position numbers: E=5, A=1, R=18, T=20, H=8.
- Writing these in order, separated by hyphens: 5-1-18-20-8.
Answer: 5-1-18-20-8
Try these yourself
Work through these the same way, then check against the answer.
1. In a certain code, BOOK is written as DQQM. Using the same rule, how will PAGE be coded?
Answer: RCIG (every letter shifts forward by 2)
2. Using the mirror rule from the worked examples (A↔Z, B↔Y, C↔X…), how will the word BRAIN be coded?
Answer: YIZRM
3. Using the A=1, B=2, … Z=26 rule, how will the word MIND be coded?
Answer: 13-9-14-4
Where this comes up
Coding-Decoding is a regular topic in the Reasoning/General Intelligence section of every exam Pariksha Saathi covers — SSC CGL, SSC MTS, SSC CHSL, IBPS PO, IBPS Clerk, SBI PO and SBI Clerk.
Practice more Coding-Decoding questions
This page covers the common rule-types and a handful of worked examples. Pariksha Saathi has full topic-wise practice sets for Coding-Decoding (and every other Reasoning/Quant/English topic) with instant scoring and explanations — free, no account required.
Practice Coding-Decoding free →