Coding - Decoding
🔒 Log in to trackThe coding-decoding family
🔒 Log in to trackA coding question shows a word and its code. You find the rule from that pair, then use the same rule on a new word. No vocabulary is tested. The rule is always mechanical: letters move, change places, or turn into numbers or symbols.
What a code is
A code hides a word with a fixed rule. If every letter moves one step forward, CAT becomes DBU.
- Coding means turning a word into its code.
- Decoding means turning a code back into the word.
In the exam you see one word with its code. You find the rule. Then you use the same rule on a new word.
Rule: The rule comes only from the sample pair. Never invent a new rule for the new word.
The families at a glance
| Family | What happens | Small example |
|---|---|---|
| Letter shift | every letter moves forward or back | CAT → DBU (+1) |
| Reversal | the word is written backwards | LOGIC → CIGOL |
| Opposite letters | A↔Z, B↔Y and so on | BAD → YZW |
| Rearrangement | same letters, new order | PLANET → LPNATE |
| Number coding | the word becomes a number | CAT → 24 |
| Symbol coding | each letter gets a symbol | M = #, A = @ |
| Substitution | things get new names | sky is called sea |
| Language coding | sentences become code words | good day = pa ki |
Each family has its own lesson. This lesson shows how to tell them apart. It also covers rearrangement and two-step rules.
Find the rule in four checks
Do these checks in order. Stop at the first one that fits.
- Count the letters. Same count? Compare the letters one by one.
- Same letters, new order? It is a rearrangement. Mark where each letter went.
- Read the code backwards. If you see the word, reversal is part of the rule.
- Different letters? Write the positions (A = 1 … Z = 26). Subtract slot by slot.
A constant difference like +2 means a shift. Two positions that add up to 27 mean opposite letters.
Example: HOME → IPNF. The letters are different. H→I, O→P, M→N, E→F are each +1. The rule is a +1 shift.
Rearrangement: same letters, new order
The letters stay the same. Only their places change. Four orders come up again and again.
- Pair swap: swap the letters two at a time. PLANET → PL AN ET → LP NA TE → LPNATE.
- Halves reversed: split the word in two. Write each half backwards. MONKEY → MON KEY → NOMYEK.
- Halves swapped: write the second half first. MONKEY → KEYMON.
- First–last swap: only the end letters change places. LEMON → NEMOL.
In a word with an odd number of letters, the middle letter usually stays in place. In a pair swap, the last letter stays.
Tip: Look at the first two letters of the code. They usually tell you which order was used.
Two-step rules
Some codes use two simple rules one after the other. Find the first rule, then see what is still different.
- Vowels one way, consonants another. Vowels (A, E, I, O, U) move +1 and consonants move −1. BASKET → ABRJFS.
- Opposite, then shift. BAD → opposite YZW → +1 → ZAX.
- Rearrange, then shift. First swap the pairs, then move every letter +1.
Watch: Do the steps in the same order as the sample. With a changing shift, a different order gives a different code.
Alphabet facts to learn once
- EJOTY: E = 5, J = 10, O = 15, T = 20, Y = 25. Every letter is at most 2 steps from one of these.
- Opposite pairs: A-Z, B-Y, C-X, D-W, E-V, F-U, G-T, H-S, I-R, J-Q, K-P, L-O, M-N. Each pair adds up to 27.
- Wrap-around: after Z comes A again. So Y + 3 = B.
Question types you will see
Each type: how to recognise it, the method step by step, and one question to try.
Pair swap (neighbouring letters change places)
The code has the same letters as the word. Letters 1-2, 3-4, 5-6 have changed places.
Split the word into pairs from the left.
Write each pair backwards.
If one letter is left over at the end, keep it as it is.
No letter changes, only the order, so checking pairs is enough.
In a certain code language, BRIGHT is written as RBGITH. How will SILVER be written in that language?
Show solutionHide solution
BRIGHT → BR IG HT → RB GI TH. So the rule is a pair swap.
SILVER → SI LV ER.
Swap each pair: IS VL RE.
ISVLRE
Halves reversed (each half written backwards)
The code has the same letters. The first half and the second half each appear backwards.
Split the word into two equal halves.
In an odd word, keep the middle letter in place.
Write each half backwards.
Add any extra shift only if the sample shows one.
Reading each half of the sample backwards gives back the original halves.
In a certain code language, CANDLE is written as NACELD. How will WINDOW be written in that language?
Show solutionHide solution
CANDLE → CAN DLE → NAC ELD. Each half is reversed.
WINDOW → WIN DOW.
Reverse each half: NIW WOD.
NIWWOD
First and last letters interchanged
The first letter of the word is at the end of the code, and the last letter is at the front.
Swap the first and last letters.
Compare the middle letters with the sample: same, or all moved by the same steps?
Apply both steps to the new word.
The middle part tells you whether a second rule is hidden in the code.
In a certain code language, TIGER is written as RJHFT. How will HORSE be written in that language?
Show solutionHide solution
T and R have changed places.
Middle IGE → JHF: each letter is +1.
HORSE: swap H and E, and move ORS +1 to PST.
EPSTH
Vowels and consonants change differently
The differences are not all equal. All vowels move one way, and all consonants move another way.
Write the difference under each letter of the sample.
Group them: what happened to the vowels? What happened to the consonants?
Code the new word letter by letter. First ask: vowel or consonant?
The rule depends on the type of letter, not on its place in the word.
In a certain code language, BASKET is written as ABRJFS. How will PENCIL be written in that language?
Show solutionHide solution
Vowels move +1: A→B, E→F.
Consonants move −1: B→A, S→R, K→J, T→S.
PENCIL: P−1, E+1, N−1, C−1, I+1, L−1.
OFMBJK
Two rules in a row (mixed coding)
No single rule explains the sample. The letters are opposite and shifted, or reversed and shifted.
Test the simple rules first: shift, opposite, reverse.
If one rule almost works, the leftover difference is the second step.
Apply both steps to the new word in the same order.
Every mixed rule is two basic rules, one after the other.
In a certain code language, BAD is written as ZAX. How will CUP be written in that language?
Show solutionHide solution
Opposite of BAD is YZW. YZW +1 gives ZAX. So the rule is: opposite, then +1.
Opposite of CUP is XFK.
XFK +1 gives YGL.
YGL
Halves swapped (second half written first)
The code has the same letters. The second half of the word comes first, unchanged.
Split the word into two halves.
Write the second half first, then the first half.
In an odd word, keep the middle letter in the middle.
Each half keeps its own letter order, so the two halves are easy to spot in the code.
In a certain code language, SILVER is written as VERSIL. How will MARKET be written in that language?
Show solutionHide solution
SILVER → SIL VER → VER SIL. The halves are swapped.
MARKET → MAR KET.
Write KET first, then MAR.
KETMAR
Shortcuts that save time
Write the sample word above its code. Subtract the positions slot by slot. The list of differences is the rule. Apply the same list to the new word.
If CAT is written as FDW, how is DOG written?
Show solutionHide solution
C→F, A→D, T→W: each is +3.
Apply +3 to DOG: D→G, O→R, G→J.
GRJ
Mistakes to avoid
Where most students lose marks on this subtopic.
Using a different shift for the new word than the sample showed.
Apply exactly the rule you found on the sample pair.
Checking only one letter and trusting the rule.
Check at least three letters. A rising shift looks flat on one letter.
Taking Y + 3 as 'out of the alphabet'.
Wrap around after Z: Y + 3 = B.
Doing a two-step rule in a different order from the sample.
Copy the order of the steps from the sample.
Trying hard rules before the easy checks.
Check rearrangement and backwards reading first. They take seconds.
Quick revision
Read this the night before the exam.
Same letters, new order → rearrangement (pair swap, halves, first–last).
Different letters → subtract positions: a constant = shift, a sum of 27 = opposite letters.
Read the code backwards before trying anything complicated.
EJOTY: E = 5, J = 10, O = 15, T = 20, Y = 25.
Two-step rules: same steps, same order as the sample.
Check the rule on three letters before coding the new word.
Practice: 14 questions
Sets of 10, mixed across the question types above. Every answer has a step-by-step explanation.
Topic test · 10 questions
Suggested time 7 min · wrong answers go to your mistake notebook automatically.