Coding-Decoding: Letter Shifts and Number Codes
The main coding-decoding patterns in reasoning tests, including letter shifts, opposite letters and number substitutions, with worked examples.
In coding-decoding questions, a word or number is transformed by a hidden rule, and you must apply the same rule to another. Spotting the type of rule is half the job.
Know the alphabet positions
| 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 |
The letters that are opposite each other (A–Z, B–Y, C–X, and so on) add up to 27.
Type 1: constant shift
Each letter moves forward or backward by a fixed number.
Example: CAT is coded as DBU. Each letter moves +1. So DOG becomes EPH.
Type 2: opposite letters
Each letter is replaced by its opposite: A ↔ Z, B ↔ Y, C ↔ X.
Example: CAT becomes XZG.
Type 3: reversed word
Example: If SMART is coded as TRAMS, then CLEAR becomes RAELC.
Type 4: alternating shifts
The first letter moves +1, the second −1, the third +1, and so on.
Example: CAT with +1, −1, +1: C→D, A→Z, T→U giving DZU.
Type 5: letters to numbers
Letters are replaced by their positions, sometimes with an operation.
Example: If A = 1, B = 2, then BAD = 2, 1, 4. If the code is the sum, BAD = 7.
Type 6: word-to-word substitution
Example: "sky" is called "sea", "sea" is called "tree". Where do fish live? Fish live in the sea, which is coded tree.
Number codes
Some questions give a few phrases with number codes and ask you to identify which number stands for which word, by comparing phrases that share one word and one number.
Method
- Compare the given word and its code letter by letter.
- Look for a consistent rule.
- Test the rule on every letter.
- Apply it to the new word.
Tips
- Write positions under letters to see shifts.
- Watch for the wraparound, where Z shifts to A.
- Try the simplest rule first.
Practice
Coding-decoding is easy to practise in short bursts.
Online Exam Question & Answer
Practice questions for SSC, Bank, IBPS, GATE, UPSC, RRB, CAT, MAT and more
More about Online Exam Question & Answer
Ages Problems: Present, Past and Future
How to solve age-based aptitude questions using simple equations, ratios and the 'difference stays constant' principle, with worked examples.
Read article →Boats and Streams: Upstream and Downstream Formulas
Master boats and streams questions with the upstream and downstream speed formulas, worked examples and a quick way to find speed in still water.
Read article →Calendars: Finding the Day of the Week
Use odd days and leap year rules to find the day of the week for any date — a classic reasoning topic in competitive exams.
Read article →Clocks: Angles Between Hands and Gain/Loss
Calculate the angle between clock hands with one formula, find when hands overlap or are opposite, and solve fast/slow clock questions.
Read article →