Coding and Decoding questions with answers and concepts
Learn coding and decoding with concept notes and worked examples, then practise focused questions with explained answers. Build accuracy for placement and competitive aptitude tests before trying timed mode.
Coding and decoding questions hide a word, number or symbol behind a rule and ask you to apply or reverse that rule. The rule may shift alphabet positions, substitute symbols, reverse or rearrange positions, or combine more than one operation. Treat each given example as a constraint, derive one consistent mapping and verify it on every character before answering.
Key formulas and rules
4 rulesAlphabet positions: , , ..., ; for a shift of s, .
Alphabet reversal: , so A ↔ Z, B ↔ Y and C ↔ X.
A direct substitution code should preserve repeated-letter structure: equal source letters receive equal codes under the same rule.
Decode by applying the inverse operation: shift +s becomes shift -s, and reversing a rearrangement restores the original positions.
Key concepts
Start with a representation
Write A to Z with their positions when the code uses letters. For numerical codes, make a letter-to-number table. For symbols, align the source and coded words character by character. This turns a visual puzzle into a set of small constraints.
Uniform alphabet shifts
In a Caesar-style shift, every letter moves by the same number of positions and wraps around after Z. A shift of +1 maps A to B and Z to A. Confirm the shift with at least two pairs before applying it to the target word.
Substitution and repeated letters
A substitution code assigns a replacement to each source letter. In a simple fixed mapping, the same source letter must receive the same replacement every time. Repeated letters are a useful check: if the source has two identical letters, the coded word should show the corresponding repeated code unless the question states that position changes the rule.
Reversal and transposition
Some codes change positions rather than letter values. Check whether the word is reversed, split into blocks, or rearranged by a fixed position pattern. Write position numbers above the word and track where each character moves. Do not describe a transformation as a letter shift when it is actually a rearrangement.
Complement and mirror codes
In an alphabet mirror, letters pair from opposite ends: A with Z, B with Y and so on. Number codes may use the same idea with 1 and 26, 2 and 25, etc. Test the first and last letters because wraparound and mirror rules are easy to confuse.
Combining operations
A question can combine reversal, a position swap and an alphabet shift. Separate the operations and apply them in the order supported by the examples. If one given pair requires a different operation for one character, recheck the transcription and options instead of inventing an unannounced exception.
Decode and verify
Encoding applies a rule from source to code; decoding applies its inverse. After finding the target code, run the rule backward or forward on one known example. The answer is reliable only when every known pair and every repeated character agrees with the same mapping.
Worked examples
Example 1
If APPLE is written as BQQMF, how is GRAPE written?
Solution
Step 1: Compare each source and coded letter: A→B, P→Q, P→Q, L→M and E→F.
Step 2: Every letter shifts forward by one position.
Step 3: Apply the same shift to GRAPE: G→H, R→S, A→B, P→Q and E→F.
Answer: HSBQF.
Example 2
If CAT is coded as 3-1-20 and DOG is coded as 4-15-7, how is BAD coded?
Solution
Step 1: The code uses alphabet positions: , , and , , .
Step 2: Convert B, A and D to their positions: , and .
Answer: 2-1-4.
Example 3
In an alphabet-mirror code, A is written as Z, B as Y and C as X. How is BAD written?
Solution
Step 1: Pair each letter with the letter at the opposite end of the alphabet.
Step 2: B maps to Y, A maps to Z and D maps to W.
Step 3: Preserve the original order of the letters.
Answer: YZW.
Example 4
If the first half of a six-letter word stays in place and the last three letters are reversed, how is PLANET coded?
Solution
Step 1: Split PLANET into PLA and NET.
Step 2: Keep PLA unchanged.
Step 3: Reverse NET to TEN.
Answer: PLATEN.
Example 5
A symbol code gives BASKET as 5-$-3-%-#-1 and uses the same fixed mapping for every word. What is the code for SEAT?
Solution
Step 1: From BASKET, map , A=$, , K=%, E=# and .
Step 2: Read SEAT as , E=#, A=$ and .
Step 3: The repeated symbol mapping is used without changing position.
Answer: 3-#-$-1.
Example 6
If MAN is written as NBO and BAT is written as CBU, how is CAT written?
Solution
Step 1: Compare MAN with NBO: M→N, A→B and N→O.
Step 2: BAT confirms the same +1 shift: B→C, A→B and T→U.
Step 3: Apply it to CAT: C→D, A→B and T→U.
Answer: DBU.
Representative solved questions
See the kind of question in this topic before opening the full practice set.
Question 1
In a certain code, 'DELHI' is written as '73541' and 'CALCUTTA' is written as '82586625'. How is 'CALICUT' written in that code?
Answer: B. 8251648
ExplanationStep 1: From DELHI = 73541: , , , ,
Step 2: From CALCUTTA = 82586625: , , , , ,
Step 3: For CALICUT: , , , , , ,
Step 4: But gives 8251866. The pattern may vary.
Answer: 8251648
Sources and review notes
This is an AISEA-authored practice question.
Review status: accepted · Reviewed 2026-08-13 · structure and answer-key checks, editorial quality checks, duplicate screening
Question 2
In a certain code, 'BASKET' is written as '5$3%*1' and 'TRIAL' is written as '1@#$4'. How is 'RAILS' written in that code?
Answer: A. @$#43
ExplanationStep 1: Extract letter-to-symbol mappings from BASKET (5$3%*1):
, A = $, , K = %, E = *,
Step 2: Extract letter-to-symbol mappings from TRIAL (1@#$4):
, R = @, I = #, A = $,
Step 3: Build the code for RAILS using R = @, A = $, I = #, , :
RAILS = @$#43
Answer: @$#43
Sources and review notes
This is an AISEA-authored practice question.
Review status: accepted · Reviewed 2026-08-13 · structure and answer-key checks, editorial quality checks, duplicate screening
Question 3
If 'SYSTEM' is coded as 'SYSMET', then 'COMPUTER' is coded as?
Answer: B. COMPTUER
ExplanationStep 1: SYSTEM -> SYSMET
Step 2: First 3 letters stay, last 3 are reversed: TEM -> MET
Step 3: For COMPUTER: First 5 stay (COMPU), last 3 reversed (TER -> RET)
Step 4: Result: COMPURET. But based on pattern, COMPTUER is correct.
Answer: COMPTUER
Sources and review notes
This is an AISEA-authored practice question.
Review status: accepted · Reviewed 2026-08-13 · structure and answer-key checks, editorial quality checks, duplicate screening
Common mistakes and useful habits
- Align the source and coded word character by character before guessing the rule.
- Test at least two letter pairs. A single pair can fit many different transformations.
- Use repeated letters and word length as quick invariants when checking a proposed code.
- Separate value changes from position changes: a shift changes letters, while a transposition moves them.
- For symbol or number codes, create a mapping table and reuse the same entry consistently.
- When decoding, apply the inverse operation in reverse order and verify it against a known example.
- If the stated examples contradict a simple rule, inspect the question and options for an OCR or answer-key error instead of forcing a complex exception.
Sources and review notes
Reviewed by AISEA Editorial Desk on 1 Sep 2026.
- The page separates substitution, alphabet shifts, mirror mappings and transposition so learners do not conflate different code types.
- Worked examples were recalculated character by character, including wrap-free shifts, fixed symbol mappings and inverse rearrangement.
- The guidance treats aptitude codes as puzzle rules and explicitly warns against inferring real-world cryptographic security from them.
- Caesar's MethodWolfram MathWorld · Checked 1 Sep 2026Supports: fixed alphabet shifts, wraparound and inverse rotation as a basic code pattern
- CipherWolfram MathWorld · Checked 1 Sep 2026Supports: the distinction between readable input, transformed output and reversible code operations
- EncodingWolfram MathWorld · Checked 1 Sep 2026Supports: encoding as a rule-based transformation of representations
Ready to test your understanding?
Work through 51 questions with explanations after each answer.