Skip to content

Coding-Decoding

Letter, number and symbol codes and how to decode them. Open a topic to read its notes and practise it, then take the mixed tests: each question shows whether you were right and why, as soon as you answer.

Topics: notes and practice

Letter shift coding15 questions

A code turns a word into another form by a fixed rule. You get one or more examples, work out the rule, and apply it to a new word. Sometimes you run the rule backward to decode. In a letter shift code, every letter moves along the alphabet by a set number of places.

Letter positions: A to I are 1 to 9, J to R are 10 to 18, and S to Z are 19 to 26. Anchors: E = 5, J = 10, O = 15, T = 20, Y = 25.

  • Fixed shift. Every letter moves the same number of places. With +4, DOG becomes HSK.
  • Changing shift. The shifts follow a pattern. With +1, +2, +3, MAP becomes NCS. With −1, +1, −1, NET becomes MFS.
  • Position-wise shift. The shift depends on the place of the letter (first, last, odd or even place), or on the word, for example the shift equals the number of letters in it.
  • Wrap-around. After Z comes A, and before A comes Z. Y + 3 = B and B − 3 = Y. Add or subtract 26 if a count leaves the 1 to 26 range.
  • Opposite letter (reverse alphabet). The two positions add up to 27. G (7) and T (20) are a pair. A and Z, B and Y, down to M and N are the 13 pairs. The opposite of a letter is 27 minus its position, and the same step undoes the code. If the alphabet is written backward from Z, the nth letter from the left is the letter at position 27 − n.
  • Vowel and consonant rules. The vowels are A, E, I, O, U. A rule may treat them differently from consonants, so apply it letter by letter.
  • Rules that depend on the word. The code may use the previous letter for an odd count of letters and the next letter for an even count, or the first and last letters may move by different amounts while the rest stay.

To spot a shift, write the original and the coded letters in two rows with their positions and compare each pair. The same gap in every pair means a fixed shift. Gaps of 1, 2, 3 mean a growing shift. Pairs adding up to 27 mean opposite letters. To decode, move the opposite way: a code that moved letters forward is undone by moving them back.

Problem 1. In a code, HAND is written as FYLB. How is KING written?

Answer: IGLE

Each letter moves 2 places back: H to F, A to Y (A is 1, and 1 − 2 wraps to 25), N to L, D to B. Apply it to KING: K to I, I to G, N to L, G to E.

Problem 2. In a code, each letter is replaced by its opposite letter in the alphabet. Which word is written as UZIN?

Answer: FARM

The opposite of a letter is 27 minus its position, and the same step undoes the code. U (21) gives 6, which is F. Z (26) gives 1, which is A. I (9) gives 18, which is R. N (14) gives 13, which is M. The word is FARM.

Problem 3. In a code, the shifts for the four letters of a word are −1, +1, −1, +1 in order. How is CLAY written?

Answer: BMZZ

Apply each shift to its own letter. C − 1 = B. L + 1 = M. A − 1 wraps back to Z. Y + 1 wraps forward to Z. The code is BMZZ. A fixed shift of 1 would give DMBZ, which ignores the pattern.

Practise this topic15 questions, each with its solution

Direct and substitution coding15 questions

Here each word, letter or sign is simply swapped for another one by a given table. No arithmetic is needed, only careful reading. There are four common forms.

Word to word. One word is called by another name, often in a chain. Find the real name of the thing, locate it in the chain, and answer with the name it now has. Take one step only. If "white" is called "red", then the colour of a white cloth is called "red".

Symbols for letters. Write the table first (for example A = @, B = #), then change the word letter by letter. When the table is hidden, build it from the examples: a letter that appears in two coded words has one code in both.

Same-position coding. The code keeps every letter at its place and only changes some of them. For example, only the vowels change, or only the letters at even places. Mark the places first, then change only those.

Operator codes. The signs +, −, ×, ÷ take new meanings. First replace the signs in the expression using the rule. Then solve with BODMAS: brackets, then orders (powers and roots), then division and multiplication, then addition and subtraction. Division and multiplication have equal rank, and so do addition and subtraction, so work left to right inside each pair: 12 ÷ 3 × 2 = 4 × 2 = 8. If + means × and × means +, then 5 + 2 × 3 becomes 5 × 2 + 3 = 13. Never solve the sum with the old meanings.

Problem 4. In a code, milk is called water, water is called tea and tea is called juice. What does a cow give, in this code?

Answer: water

A cow gives milk. In the code, milk is called water, so the answer is water. The chain stops there: carrying on to tea would be a second step that the question does not ask for.

Problem 5. In a code, SEAT is written as PQRT and EAST is written as QRPT. How is TEAS written?

Answer: TQRP

Match letters in order: from SEAT, S is P, E is Q, A is R, T is T. EAST agrees. TEAS is T, E, A, S, so T, Q, R, P gives TQRP.

Problem 6. In a code, + means −, − means ×, × means ÷ and ÷ means +. What is the value of 18 × 3 + 10 ÷ 4 − 2?

Answer: 4

Put the new meanings into the sum: 18 ÷ 3 − 10 + 4 × 2. By BODMAS, 18 ÷ 3 = 6 and 4 × 2 = 8. Then 6 − 10 + 8 = 4.

Practise this topic15 questions, each with its solution

Number coding15 questions

Here letters are turned into numbers by their place in the alphabet, and the numbers are joined, added, multiplied or changed by a rule. Learn the positions in Letter shift coding above.

  • Joined positions. FIG becomes 6-9-7, and written together it is 697.
  • Sum. F + I + G = 6 + 9 + 7 = 22.
  • Product. 6 × 9 × 7 = 378.
  • Changed values. The question may double each value (sometimes taking 1 away), subtract the number of letters, multiply the sum by the number of letters, count vowels twice, or use the first and last letters only. Read the rule from the examples and test it on all of them.
  • Reverse numbering. If A = 26, B = 25 and so on down to Z = 1, a letter's value is 27 minus its usual position.
  • Letter values in expressions. Replace each letter by its value and solve with BODMAS, for example (X ÷ L) + (S − P) = 2 + 3.

To find a word from numbers, convert each number back to its letter. When the question gives only a total, test each option and add its letters.

Matrix coding. The letters sit in a grid, and each letter is coded by its row number and column number, written as two digits. Read the order the question states: row then column, or column then row. Take this grid, with rows 0 to 2 and columns 0 to 2:

0 1 2
0 A B C
1 D E F
2 G H I

With row first, H is in row 2, column 1, so H is 21. I is 22, D is 10 and E is 11, so HIDE is 21 22 10 11. To decode 12 00 02 11, read each pair as row and column: 12 is F, 00 is A, 02 is C and 11 is E, so the word is FACE. If the question says column first, the same H becomes 12.

Problem 7. In a code, each letter is replaced by its position and the numbers are joined. How is BIRD written?

Answer: 29184

B is 2, I is 9, R is 18 and D is 4. Written together these give 2, 9, 18, 4, which is 29184.

Problem 8. In a code, the value of a word is the sum of the positions of its letters, minus the number of letters. What is the value of LAMP?

Answer: 38

L = 12, A = 1, M = 13, P = 16. The sum is 42. LAMP has 4 letters, so the value is 42 − 4 = 38.

Problem 9. In a code, the letters are numbered backward: A = 26, B = 25 and so on up to Z = 1. What is the sum of the values of the letters of DOT?

Answer: 42

The value of a letter is 27 minus its usual position. D (4) is 23, O (15) is 12 and T (20) is 7. The sum is 23 + 12 + 7 = 42.

Practise this topic15 questions, each with its solution

Mixed and combined coding15 questions

A mixed code uses two or more steps in one rule, or gives letters and numbers together in the result. Work through the steps one at a time, in the order the question gives them, and write the word after each step.

  • Letters plus numbers. Some letters become letters and others numbers. For example, vowels become their position and consonants the next letter, so MOVE gives 13, then P, 22, F: 13P22F.
  • Two rules in one code. One rule for odd places and another for even places, or one rule for vowels and another for consonants.
  • Reversal plus shift. The word is written backward and each letter then moves. Reversal and a plain shift give the same result in either order, but a position rule (such as moving only the first letter) depends on the order.
  • Rearranging. Reverse the word, swap pairs, or swap the first and last letters. The same letters appear in a new order.

Order matters when one step depends on a position. If the first and last letters swap before a shift, the shift is applied to the new word.

Read "next letter" and "next vowel" as different instructions. After E, the next letter is F, but the next vowel is I (the vowels run A, E, I, O, U).

To decode, undo the steps in reverse order, last step first. A code made of "reverse, then move forward 2" is undone by moving back 2 and then reversing. Check your answer by coding it again.

Problem 10. In a code, each vowel is replaced by the next letter of the alphabet and each consonant by its position number. How is MOVE written?

Answer: 13P22F

M is a consonant at position 13. O is a vowel, replaced by the next letter, P. V is a consonant at position 22. E is a vowel, replaced by F. Together: 13P22F.

Problem 11. In a code, the first and last letters of a word are swapped, and then each letter is moved 2 places forward. How is CLOUD written?

Answer: FNQWE

Swap C and D to get DLOUC. Move each letter 2 forward: D to F, L to N, O to Q, U to W, C to E. The code is FNQWE.

Problem 12. In a code, the letters of a word are written in reverse order and each vowel is then replaced by the next letter in the alphabet. How is MANGO written?

Answer: PGNBM

Reverse MANGO to get OGNAM. The vowels O and A change: O to P and A to B. The consonants G, N, M stay. The result is PGNBM.

Practise this topic15 questions, each with its solution

Pair relation coding15 questions

Here two things are linked by a code, and you apply the same link to a third. The usual stem is "A is to B as C is to ?", or a pair of numbers or letters followed by "what goes with this?". Find the link in the first pair, test it on the second pair if there is one, and apply it.

For words, check these links in turn: a shift, the opposite letter, reversal, positions joined, and the sum of positions. For letter pairs such as AC and EG, treat the two letters separately.

Number rules. When a number is coded as another number, find the rule from the examples:

Rule Examples
n² + 3 1 → 4, 2 → 7, 3 → 12
n² + 1 2 → 5, 3 → 10, 4 → 17
n² − 1 2 → 3, 3 → 8, 4 → 15
n × (n + 1) 2 → 6, 3 → 12, 4 → 20
n³ + 1 2 → 9, 3 → 28, 4 → 65
n³ − n 2 → 6, 3 → 24, 4 → 60
n² + 3n 1 → 4, 2 → 10, 3 → 18

If the codes grow slowly, think squares. If they grow fast, think cubes. If the second differences between codes are constant, the rule is a square type. When the numbers coded go up by 1, a second difference of 2 means n² (one n²), and of 4 means 2n². Subtract n² (or 2n²) from every code and look at what is left: it is usually a simple rule such as n, 2n, n + 1 or a fixed number.

Two numbers joined by a sign. For a # b, try the sum, the product, the sum of squares, the difference of squares, the square of one number plus the other (b² + a), and the product plus the sum (a × b + a + b). The code may also be two results written side by side: 5 # 3 = 28 is the difference 2 followed by the sum 8. Test each rule on every example.

Vertical and horizontal patterns. The pairs may sit in a table of rows and columns. A letter or number in each row or column follows a rule: the third number may be the product of the first two, or the letters may go up by a set step along a row and a different step down a column. The right rule fits every complete row or column.

Problem 13. FAN is related to HCP in the same way as MAP is related to which word?

Answer: OCR

Compare F with H, A with C and N with P. Each letter moves 2 places forward. MAP becomes M to O, A to C, P to R, which is OCR.

Problem 14. In a code, 2 is written as 7, 3 as 13, 4 as 21 and 5 as 31. How is 8 written?

Answer: 73

The codes rise by 6, 8, 10, which suggests n² plus something. Try n² + n + 1: 4 + 2 + 1 = 7, 9 + 3 + 1 = 13, 16 + 4 + 1 = 21, 25 + 5 + 1 = 31. All four fit. For 8: 64 + 8 + 1 = 73.

Problem 15. A table has three rows and three columns. Row 1 reads 5, 10, 15. Row 2 reads 7, 14, 21. Row 3 reads 9, 18 and a missing number. Which number is missing?

Answer: 27

In each row the second number is twice the first and the third number is three times the first: 5, 10, 15 and 7, 14, 21. For Row 3, 9 × 3 = 27.

Practise this topic15 questions, each with its solution

Decoding and message codes15 questions

Here a code is given in sentences, or as a message, and you find what a word stands for or read the message.

Words in sentences. Each sentence gives a few word codes. A word that appears in two sentences has the code that appears in both. The order of the code words need not follow the order of the words.

If "big dog" is "ra pu" and "dog bark" is "pu zi", then "dog" is "pu" because only "pu" is common. So "big" is "ra" and "bark" is "zi".

With several sentences, find the common words first. Then use them to remove known words from the longest sentence, and the code word left over belongs to the word left over. A word that occurs in only one sentence can be found only after the others are known.

Number codes in sentences. The codes may be digits. If "sun rises early" is 4 8 1, "early birds sing" is 1 6 2 and "birds fly high" is 6 9 5, then "early" is 1 (the digit common to the first two) and "birds" is 6 (common to the last two). In the second sentence the digit left over is 2, so "sing" is 2. The digits need not follow the word order.

Fictitious languages. The same method applies when the question says "in a certain language". A word keeps its code in every sentence, and an unknown code is found by elimination.

Message codes. A message may be sent by writing each word backward, by writing the words in reverse order, by moving each letter along the alphabet, or by taking the first letters of the words. State the rule, then apply it in the stated order. If a message uses two rules (words in reverse order and each word backward), do them in order and check the result.

Problem 16. In a code, "cool fresh breeze" is "ka ru no", "fresh air" is "ru sa" and "cool morning air" is "ka he sa". What is the code for "morning"?

Answer: he

"Cool" is common to the first and third sentences, and "ka" is common to their codes, so cool is "ka". "Air" is common to the second and third, and "sa" is common to those codes, so air is "sa". In the third sentence the code word left over is "he", so morning is "he".

Problem 17. In a language, "nor ve" means "soft bread", "ve tak" means "bread slice" and "tak lo" means "slice thin". What is the code for "soft"?

Answer: nor

"Bread" is common to the first two sentences, so it is "ve". In the first sentence the other code word is "nor", and the other word is "soft". So "soft" is "nor". The third sentence only confirms "tak" for slice.

Problem 18. A message is sent by moving each letter 3 places forward. What does the message ZLQ mean?

Answer: WIN

Undo the code by moving each letter 3 places back. Z goes back to W, L goes back to I, and Q goes back to N. The word is WIN. Check by coding it again: W to Z, I to L, N to Q.

Practise this topic15 questions, each with its solution

Quick revision
Item Fact
Positions A to I 1 to 9, J to R 10 to 18, S to Z 19 to 26
Anchors E 5, J 10, O 15, T 20, Y 25
Opposite letter 27 minus the position; pairs A-Z down to M-N
Wrap-around After Z comes A; add or subtract 26
Reverse numbering A = 26 down to Z = 1; value is 27 minus position
Decoding Undo the steps in reverse order
Number rules n² + 1, n² − 1, n × (n + 1), n³ + 1, n³ − n
Sentence codes The code common to two sentences is the common word
Operator codes Change the signs first, then use BODMAS
Common mistakes
  • Testing the rule on one letter only. Test every pair of letters.
  • Forgetting the wrap-around at Z and A.
  • Using 26 for the opposite letter instead of 27.
  • Solving a symbol sum with the usual meanings of the signs. Change the signs first.
  • Matching code words to words by their order in a sentence. The order is often jumbled.
  • Undoing the steps of a combined code in the same order. Undo them in reverse order.

By ICE Academy · Updated 4 Dec 2026 · Found a mistake? Write to info@iceacademy.in

Mixed tests

All 165 questions of this chapter on paper, with the answer key and solutions. Free: the first download asks for your name, phone number and email.

Exams that test this chapter