Coding-Decoding Notes for Reasoning
Komal Gupta
UPSC Exam Expert & Content Editor
In this note
- 1.Know Your Alphabet First
- 2.Type 1: Letter Shifting
- 3.Type 2: Reverse Alphabet (Opposite Letter) Code
- 4.Type 3: Position and Number Codes
- 5.Type 4: Rearrangement and Reverse Codes
- 6.Type 5: Substitution Codes (Word Substitution)
- 7.Type 6: Comparing Messages (Sentence Codes)
- 8.Type 7: Number Pattern Codes
- 9.Type 8: Mixed Letter-Number Codes
- 10.Strategy for Solving
- 11.Common Mistakes
- 12.Practice Questions With Answers
- 13.Speed Tips From Toppers
- 14.Quick Revision
- 15.Related Notes to Read Next
- 16.Frequently Asked Questions (FAQ)
PDF Notes: Coding-Decoding Notes for Reasoning
Premium PDF · one-time payment of ₹5 · instant access
Coding-decoding is a favourite topic in the reasoning section of SSC, banking, railways, defence and state-level examinations. In these questions, a word, a number or a sentence is converted into a secret code by following a rule, and you have to find the rule and apply it to a new word. The topic needs a good command of the alphabet and a sharp eye for patterns. With a few shortcuts and regular practice, you can solve each question in 30 to 40 seconds. This note explains all the common types, the alphabet position table, the standard tricks, and solved examples, in simple language.
Know Your Alphabet First
| Letter | A | B | C | D | E | F | G | H | I | J | K | L | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| Letter | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Position | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
The word EJOTY helps you remember the positions 5, 10, 15, 20 and 25 (E, J, O, T, Y). The first half of the alphabet is A to M (1 to 13) and the second half is N to Z (14 to 26). The opposite letter (counting from the other end) of any letter has a position equal to 27 minus its position: A is opposite to Z, B to Y, M to N, and D (4) to W (23). Remember that the sum of the positions of opposite letters is always 27.
Type 1: Letter Shifting
Each letter is moved forward or backward by a fixed number. If CAT is coded as DBU, each letter is shifted by +1, so DOG becomes EPH. If TIGER is coded as UJHFS, then LION is MJPO. Sometimes the shifting number changes with the position of the letter. For example, in a code where C-O-D-E becomes D-Q-G-I, the shifts are +1, +2, +3 and +4: C (3) becomes D (4), O (15) becomes Q (17), D (4) becomes G (7) and E (5) becomes I (9). Write the shifts as a pattern and apply the same to the new word. Alternate shifts such as +1, −1, +1, −1 are also used.
Type 2: Reverse Alphabet (Opposite Letter) Code
Here each letter is replaced by its opposite: A by Z, B by Y and so on. BAD becomes YZW, since B (2) becomes Y (25), A (1) becomes Z (26), and D (4) becomes W (23). To find the opposite quickly, subtract the position from 27, or use the mid-point of the alphabet between M and N. Check any letter with the pair A-Z, E-V, J-Q, M-N and O-L to see that the sums are 27.
Type 3: Position and Number Codes
In these, each letter is replaced by its position number, or the word is converted into a sum or a product. For example, if A = 1, B = 2 and so on, then BAG is written as 217 and PEN has the sum 16 + 5 + 14 = 35. Sometimes, a letter is replaced by a two-digit number or the number is reversed. A pattern like "A = 26, B = 25" uses reverse positions. Be careful to read the exact rule.
Type 4: Rearrangement and Reverse Codes
The letters of a word may be written backward, in a jumbled fixed order, or by swapping the first and last letters. SCHOOL becomes LOOHCS when reversed. In another pattern, the first and last letters are exchanged: PLANET becomes TLANEP. Another variety is to move each letter to the next place cyclically. Check the first two or three letters to detect the rule, then apply it to the complete word.
Type 5: Substitution Codes (Word Substitution)
In substitution, common names are replaced by other names, and the question asks for the "coded" name of a thing. Example: If white is called blue, blue is called red, red is called yellow, yellow is called green, green is called black and black is called orange, what is the colour of human blood? Blood is red, and red is called yellow. So the answer is yellow. Always take the real thing first, then find what it is called in the code, and go only one step.
Type 6: Comparing Messages (Sentence Codes)
Several coded sentences are given, and by comparing the common words, you find the code for each word. Example: (1) "red car runs" is coded as "ma pe lo". (2) "car is fast" is coded as "pe zi ta". (3) "fast runs home" is coded as "ta lo ku". The common word in (1) and (2) is "car" and the common code is "pe", so car = pe. Between (1) and (3), the common word is "runs" and the common code is "lo", so runs = lo. Between (2) and (3), "fast" = "ta". Then red = ma, is = zi and home = ku. So "car runs fast" is coded as "pe lo ta". The method is to find a common word in two sentences and then the common code in the same two sentences.
Type 7: Number Pattern Codes
Here a number is converted to another by a rule. If 2 is coded as 5, 3 as 10 and 4 as 17, the pattern is n² + 1, so 6 is coded as 37. Other patterns include n² − 1, n³ + 1, 2n + 1, or the sum of digits. Test the rule on every given pair before using it, since more than one rule may fit the first pair.
Type 8: Mixed Letter-Number Codes
Some questions mix letters and numbers: for example, a letter is replaced by its position and the number is then multiplied by 2, or each vowel is given a different code. In such questions, work out the rule for vowels and consonants separately. The common types of vowel codes are replacing each vowel with the next vowel or marking vowels with symbols.
Strategy for Solving
- Write the word and its code one below the other, with the letters numbered.
- Compare the first letter with its code and find the shift; check with the second letter.
- If the shift is not constant, write the sequence of shifts.
- Test the rule for the entire word before applying it to the new word.
- If the code is of numbers, think of squares, cubes, sums and products.
- Use the opposite-letter rule (27 minus position) whenever the pair seems to be at an equal distance from the ends of the alphabet.
Common Mistakes
Common mistakes are miscounting the alphabet, forgetting that Z shifts forward to A, using only one letter to decide the rule, applying a rule to the wrong direction and assuming that the code is the same for the whole question set. Always verify the rule with at least two letters.
Practice Questions With Answers
Try these yourself. Question 1: If FRIEND is coded as GSJFOE, how is CANDLE coded? Each letter is shifted by +1, so CANDLE becomes DBOEMF. Question 2: In a certain code, MOUSE is written as PRXVH. How is SHIRT written? Each letter is shifted by +3, so S becomes V, H becomes K, I becomes L, R becomes U and T becomes W, giving VKLUW. Question 3: If the opposite letters are used, how is LOVE written? L (12) becomes O (15), O (15) becomes L (12), V (22) becomes E (5) and E (5) becomes V (22), so LOVE becomes OLEV. Question 4: If A = 1, B = 2, and so on, what is the value of the word DIG? D (4) + I (9) + G (7) = 20. Question 5: If 3 is coded as 10 and 4 as 17 with the pattern n² + 1, what is the code for 5? 5² + 1 = 26. Check your solutions and note any mistakes, as this helps you spot your weak types.
Speed Tips From Toppers
Write the alphabet with positions at the top of your rough sheet at the start of the reasoning section; it takes 20 seconds and saves much time later. For shifting questions, use small arrows above the letters to show the shifts. For long words, check only the first two letters to guess the rule, then confirm with the last letter. In the sentence codes, use a small table to list each word and its code. In the numerical codes, test the simple rules first: add, subtract, multiply, square, cube. If your first approach fails after 20 seconds, change the angle: for instance, try the opposite letter rule or the sum of positions. Keep calm and treat each question like a small puzzle, because panic leads to mistakes.
Quick Revision
- Opposite letter position = 27 minus the position.
- EJOTY = 5, 10, 15, 20, 25.
- Check the shift pattern; test the rule fully before applying.
- For sentence codes, compare common words and common codes.
Coding-decoding rewards a quiet and organised mind. Keep the alphabet table in memory, solve a few questions each day, and the topic will become a quick source of marks in your reasoning section.
Related Notes to Read Next
Continue your preparation with these related notes from the same subject:
- Direction Sense and Seating Arrangement Notes for Reasoning
- Number and Letter Series Notes for Reasoning
- Analogy, Classification and Odd One Out Notes for Reasoning
- All Reasoning notes
Frequently Asked Questions (FAQ)
What is coding-decoding in reasoning?
Coding-decoding is a reasoning topic in which words, numbers or sentences are written in a coded form using a rule, and you have to find the rule and apply it to another word.
What is the opposite letter rule?
The position of the opposite letter is 27 minus the position of the given letter. For example, A (1) is opposite to Z (26).
What is EJOTY?
EJOTY is a memory trick for the letters at positions 5, 10, 15, 20 and 25: E, J, O, T and Y.
How do I find the rule in a letter-shifting code?
Compare each letter of the word with its coded letter and find the number of positions shifted; check if the shift is constant or follows a pattern.
What is a substitution code?
In a substitution code, common names are replaced with other names, and you answer by following the substitution given for the real thing.
How do I solve sentence-based coding?
Find a common word in two sentences and the common code in their coded forms. Repeat for other pairs to get the code of each word.
What if the shifts are different for each letter?
Write down the shift sequence for each position, such as +1, +2, +3, and apply it to the new word in the same order.
How can I decode number-based codes?
Look for patterns like squares, cubes, sums, differences or simple arithmetic operations and test the rule on all given pairs.
What should I do when Z is shifted forward?
Continue counting from A. For example, Z shifted by +1 becomes A.
How much time should I spend on a coding-decoding question?
Aim for about 30 to 40 seconds per question. If the rule is unclear in one minute, move on and return later.
How can I improve speed in coding-decoding?
Memorise the alphabet positions, practise different types daily and check the rule on at least two letters.
Is coding-decoding asked in UPSC CSAT?
It is more common in SSC, banking and railway exams, but similar pattern-recognition skills are useful for the logical reasoning part of CSAT.
Previous chapter
Blood Relations Notes for Reasoning
Next chapter
Direction Sense and Seating Arrangement Notes for Reasoning
Komal Gupta
UPSC Exam Expert & Content Editor
Komal is a senior UPSC exam strategist with 8+ years of experience helping aspirants crack CSE, CDS and NDA exams. She writes in-depth notification breakdowns, exam pattern guides and preparation strategies.