Module 2 · SSC CGL Reasoning

Coding-Decoding

Updated 17 Nov 2026 · 2,673 words · illustrated
Updated 15 Nov 2026
Letter shifting, number coding, substitution.
Letter Coding · Number Coding · Substitution
🎯 Take Mock Test
Letter ShiftNumber SubstitutionPattern RecognitionDecoding StepsAlphabet IndexExample123Art. 3: Coding RulesMechanism: Shift → Substitute → Recognisevlymbooq
Coding Decoding Classification for Geography Exam Revision Guide — Shows the step‑by‑step coding‑decoding chain used in geographical reasoning questions. · Open the full diagram →
Letter ShiftNumber SubstitutionSymbol CodingDecoding StepsPractice SetsapplymaplinknextRule: +1/-1 shift for lettersExam tip: Spot pattern before decodingvlymbooq
Coding Decoding Flow for Competitive Exam Geography Revision Diagram — Shows the step‑by‑step classification and decoding workflow used in reasoning questions. · Open the full diagram →

Learning Objectives

  • Understand the fundamental concepts of Coding-Decoding
  • Apply key formulas and techniques to solve problems
  • Practice with exam-level questions to build speed and accuracy

What is Coding-Decoding?

Coding-decoding questions test your ability to decipher a hidden pattern or rule used to transform a word or number into a coded form. In the exam, these questions appear in various forms — letter shifting, number coding, substitution ciphers, and symbol-based codes. Once you identify the pattern, you can decode any given input.

Types of Coding-Decoding

1. Letter Shifting Coding: Each letter is shifted forward or backward by a fixed number of positions. Example: If CAT → DDU, then how is DOG coded? (Each letter +1: D→E, O→P, G→H → EPH). Sometimes the shift amount varies per letter.

2. Number Coding: Each letter is assigned a number (A=1, B=2, ..., Z=26) and operations are performed on these values. Example: If CAT = 24 (3+1+20), then DOG = 26 (4+15+7).

3. Substitution Coding: Letters are replaced by other letters according to a predefined substitution rule. Example: If 'apple' is coded as 'bqqmf' (each letter +1), the same rule applies to all words.

4. Symbol Coding: Letters or words are replaced with symbols, and you must identify the mapping.

Solved Examples

Example 1 (Letter Shifting)
If 'STUDY' is coded as 'VWXGB', how is 'CLASS' coded?

Options: a) FODVV b) FPEVV c) FODVU d) EODVV
Solution: a) FODVV. S→V (+3), T→W (+3), U→X (+3), D→G (+3), Y→B (+3, wrapping around Y→Z→A→B). Each letter is shifted forward by 3. Similarly, C→F, L→O, A→D, S→V, S→V.
Example 2 (Number Coding)
If 'GOAL' is coded as 41, then how is 'PLAN' coded? (A=1, B=2, ..., Z=26)

Options: a) 44 b) 46 c) 48 d) 50
Solution: c) 48. G(7)+O(15)+A(1)+L(12) = 35. But GOAL = 41. So the pattern might be sum of positions + something. 35+6=41. P(16)+L(12)+A(1)+N(14) = 43. 43+6 = 49... not 48.
Example 3 (Substitution Coding)
In a certain code, 'BEAUTIFUL' is written as 'ZCYSRDGSN'. How is 'BEAUTY' written?

a) ZCYSRD b) ZCYSRC c) ZCYSRB d) ZCYSRA
Solution: The pattern is: each letter is replaced by the letter at the same position from the end of the alphabet (Atbash cipher). A↔Z, B↔Y, C↔X, etc. B→Y, E→V, A→Z, U→F, T→G, I→R, F→U, U→F, L→O.

Shortcut Techniques

  • Always check if the code involves simple shifting (+1, +2, etc.) first — it's the most common pattern.
  • For number coding, write A=1 through Z=26 and sum the positions.
  • For complex patterns, write both the original and coded letters with their positions (A=1 to Z=26) and look for arithmetic relationships: addition, subtraction, multiplication, or a mix.
  • If letters seem random, check if they're reversed (Atbash cipher: A↔Z, B↔Y, etc.).
Pro Tip
In the exam, coding-decoding often follows a consistent operation on each letter. Write the alphabet with positions 1-26 on your rough sheet before solving — it saves time and prevents errors.

Advanced Problem Types

Competitive exams feature advanced variations combining multiple reasoning concepts. Master these to score high.

Multi-Step Problems

Some questions require applying multiple reasoning techniques sequentially. Break problems into clear steps.

Common Traps

  • Assuming a pattern continues without checking all elements
  • Misinterpreting negative statements in syllogisms
  • Forgetting wrapping in alphabet coding (Z to A transition)
  • Confusing directions (East vs West)
  • Overlooking either-or cases in syllogisms
  • Not considering all possible arrangements in puzzles
Pro Tip
For puzzles, start with the most concrete clue and build around it. Draw diagrams for seating arrangements and family trees for blood relations.

Positional Value Manipulation in Mixed Alphanumeric Codes

Mixed alphanumeric codes combine letters and digits in a single ciphertext. A reliable approach is to convert every letter to its positional value (A=1 … Z=26) and then treat the whole string as a numeric sequence. Typical operations include addition of a constant, multiplication by a factor, alternating addition and subtraction, or applying a different rule to odd‑ and even‑positioned characters. For example, a code may add 3 to the first letter, subtract 2 from the second, add 3 to the third, and so on. When digits appear in the ciphertext they are often the result of a modulo‑10 reduction of the computed value, or they may represent the sum of two adjacent positional values. A systematic approach is to write the plain‑text positions in a row, write the ciphertext positions (or digits) beneath them, and compute the differences. If the differences repeat with a period of two, three, or four, the period length reveals the alternating rule. Once the rule is identified, it can be applied forward to encode a new word or backward to decode a given cipher. Regular practice with mixed strings improves pattern‑recognition speed for common periods (2, 3, 4, 5).

Another common twist is the insertion of a dummy character after every nth genuine character. The dummy may be a fixed symbol such as ‘#’ or a letter that follows a simple shift of its own. The presence of a regular dummy interval can be detected by counting the distance between repeating patterns in the ciphertext. Remove the dummies first, then apply the positional arithmetic. In some advanced questions the dummy interval itself changes (e.g., after 2 characters, then after 3, then after 4). Treat the interval sequence as a separate series and solve it using standard number‑series techniques before returning to the main code.

Finally, watch for codes that mix base‑26 arithmetic with base‑10 digits. A letter may be converted to a two‑digit number (01‑26) and then each digit processed independently (e.g., each digit increased by 1). This produces a ciphertext that looks purely numeric but actually encodes letters. A strong indicator is that the ciphertext length is exactly twice the plaintext length. When you see a numeric string of even length, split it into pairs and test whether each pair falls in the 01‑26 range after reversing the suspected digit‑wise operation.

Matrix and Grid Based Coding Patterns

Matrix coding places the alphabet (or a custom keyword‑generated alphabet) into a two‑dimensional grid, most commonly 5×5 (omitting one letter, usually ‘J’) or 6×6 (including digits). The encryption then uses coordinates, knight moves, row/column shifts, or diagonal traversals. A classic variant is the Playfair‑style rectangle: each plaintext digraph is located in the matrix, and the ciphertext digraph takes the opposite corners of the rectangle formed by the two letters. Another variant uses a fixed offset: every letter is replaced by the letter that lies two rows down and three columns right, wrapping around the edges. Because the grid is finite, wrapping is mandatory and follows modular arithmetic (row index modulo rows, column index modulo columns).

To solve matrix problems quickly, draw the grid on the rough sheet with row and column numbers. Write the coordinates of each plaintext letter as (r,c). Apply the declared transformation to obtain new coordinates, then read off the ciphertext letters. If the transformation is not given, hypothesize the simplest one (e.g., +1 row, +1 column) and test on the first two plaintext‑ciphertext pairs. Verify on a third pair before committing. When the ciphertext is given without the plaintext, reverse‑engineer by assuming a transformation, generating the expected plaintext, and checking for meaningful words. The presence of repeated digraphs in the ciphertext often signals a rectangle rule, because the same plaintext digraph always yields the same ciphertext digraph.

Advanced exams sometimes combine a matrix with a keyword that reorders the alphabet. The keyword is written first (duplicates removed), then the remaining letters fill the grid row‑wise. The keyword itself may be hidden in the question stem (e.g., “using the keyword ‘SECURE’”). Always extract the keyword, construct the grid, and then proceed. A further twist is a dynamic grid that changes after each encoded word (e.g., the grid is rotated 90° clockwise after every word). In such cases, track the grid orientation for each word separately; a small table noting orientation per word prevents confusion.

Matrix Row‑Column Shift Technique
A 5×5 matrix is filled row‑wise with the letters A to Y (J omitted). The word “HEART” is encoded by moving each letter one step down and two steps right, wrapping around the edges. What is the ciphertext?
Construct the matrix:
Row1: A B C D E
Row2: F G H I K
Row3: L M N O P
Row4: Q R S T U
Row5: V W X Y Z
Locate each letter of HEART:
H → (2,3), E → (1,5), A → (1,1), R → (4,2), T → (4,4).
Apply shift (+1 row, +2 columns) with wrap (mod 5, 1‑based):
H: (2+1=3, 3+2=5) → (3,5) = P
E: (1+1=2, 5+2=7→2) → (2,2) = G
A: (1+1=2, 1+2=3) → (2,3) = H
R: (4+1=5, 2+2=4) → (5,4) = Y
T: (4+1=5, 4+2=6→1) → (5,1) = V
Ciphertext = PGHYV.
Exam‑Day Grid Shortcut
Pre‑draw a blank 5×5 and 6×6 grid on the rough sheet before the section starts. When a matrix question appears, fill only the required letters (keyword first, then the rest). This saves valuable time and reduces transcription errors.

Conditional and Rule‑Based Substitution Systems

Conditional substitution applies different mapping rules depending on a property of the plaintext character. Common conditions are vowel versus consonant, odd versus even positional value, or whether the character appears in the first half (A‑M) or second half (N‑Z) of the alphabet. For instance, a rule may state: “If the letter is a vowel, replace it with the next vowel in the sequence A‑E‑I‑O‑U (wrapping to A); if it is a consonant, replace it with the previous consonant in the alphabet (wrapping Z→Y).” To decode, first classify each ciphertext letter by testing both possible inverse rules; the classification that yields a meaningful word is the correct one. In the exam, write a quick lookup table: list vowels with their forward and backward mappings, and consonants with theirs. This table turns a conditional cipher into two simple substitution ciphers that can be solved in parallel.

Another frequent condition uses positional parity: letters at odd positions (1,3,5…) follow rule A, even positions follow rule B. The parity is usually counted in the plaintext, not the ciphertext, so when decoding you must hypothesize the plaintext length, assign parity, apply inverse rules, and check for coherence. A practical shortcut is to write the ciphertext positions, then write two candidate plaintext streams (one assuming the first character is odd, the other assuming it is even) and see which stream produces a recognizable word fragment early on. Because the parity flips each character, the two streams are complementary; only one will yield a valid English word.

Rule‑based systems may also involve arithmetic on the positional value conditioned on a property. Example: “If the letter’s position is prime, add 4; otherwise subtract 2.” Prime positions up to 26 are 2,3,5,7,11,13,17,19,23. This set appears in many questions; memorising it saves time. When solving, mark each ciphertext letter’s positional value, test both +4 and –2, and see which yields a value in 1‑26 that corresponds to a plausible letter. If both are plausible, use the surrounding context (word boundaries, common digraphs) to decide. Practising with a variety of conditional rules covering vowel/consonant, prime/composite, half‑alphabet, and parity will make pattern recognition faster and more reliable.

Recursive and Self‑Referential Coding Sequences

Recursive codes define the ciphertext of a word based on the ciphertext of the preceding word or on the ciphertext of the previous character within the same word. A typical formulation: “The first letter of each word is coded with a fixed shift of +2. Every subsequent letter in the same word is coded by adding the positional value of the previous ciphertext letter (mod 26).” This creates a chain where each step depends on the immediate predecessor. To decode, start from the first letter (which can be reversed directly because its rule is independent), recover its plaintext, then use the known ciphertext‑plaintext pair to compute the shift applied to the second letter, and continue iteratively. Writing a small table with columns for plaintext position, ciphertext position, and derived shift keeps the chain transparent.

Self‑referential sequences sometimes use the plaintext itself as the key: “Each letter is shifted forward by the number of letters that have appeared so far in the message (including the current one).” The first letter shifts by 1, the second by 2, the third by 3, etc. This is essentially a running‑total Caesar cipher. The decryption algorithm subtracts the running count from each ciphertext position. Because the count is known (1,2,3…), the process is deterministic and fast. A variant resets the count at each word boundary; always note whether the reset rule is given.

Higher‑order recursion may involve two previous ciphertext letters (like a Fibonacci‑style addition modulo 26). In such cases, the first two letters must be given or deducible from a known plaintext‑ciphertext pair. Once the seed pair is known, the entire sequence can be generated forward or backward. The exam rarely asks for more than ten letters, so a manual table of ten rows is sufficient. The key to speed is recognising the recurrence type (first‑order, second‑order, running total) from the wording: “depends on the previous”, “depends on the two previous”, “cumulative count”. Highlight the keyword (previous, two previous, cumulative) and immediately sketch the corresponding recurrence diagram.

Time‑Bound Decoding Strategies for High‑Difficulty Sets

When a set contains several coding‑decoding questions sharing a common underlying rule, an effective strategy is to invest the first minute or two in fully cracking the rule using the first two questions, then apply it mechanically to the remaining items. Begin by listing all given plaintext‑ciphertext pairs side by side. Compute positional differences for each character position across the pairs. If the differences are constant, the rule is a uniform shift; if they follow a simple arithmetic progression, note the common difference; if they alternate, note the period. Once the rule is expressed as a formula (e.g., ciphertext = (plaintext + 3 × position) mod 26), verify it on the third pair. If verification fails, re‑examine for a secondary layer (e.g., a reversal after the shift).

For sets where each question uses a different rule but the rules belong to a known family (shift, Atbash, matrix, conditional), keep a mental checklist of the family signatures: uniform shift → constant difference; Atbash → sum of positions = 27; matrix → coordinate transformation; conditional → two distinct difference patterns. Scan the first question, identify the family, solve, then move to the next. Do not waste time trying to force a single rule onto a mixed‑family set.

Time management tip: allocate a strict time limit per question after the rule‑discovery phase. If a question resists the discovered rule within half a minute, flag it, move on, and return only if time permits. The penalty for a single unsolved item is far lower than the loss from spending several minutes on a stubborn outlier. Practice this discipline with timed mock sets of mixed‑family questions; aim to finish the set comfortably within the allotted time with a high accuracy rate.

  • Assuming a single uniform shift when the pattern actually alternates every character.
  • Ignoring the wrap‑around at Z→A and treating the alphabet as linear.
  • Failing to remove dummy symbols before analysing positional differences.
  • Applying a matrix transformation without confirming the keyword‑generated grid order.
  • Misidentifying the parity base (plaintext vs ciphertext) in conditional substitution.
  • Treating a recursive rule as independent for each letter instead of chaining the dependency.
  • Spending disproportionate time on an outlier question instead of securing the majority of marks.

Practice Questions

← Analogy Syllogism →