Coding - Decoding
🔒 Log in to trackReversal and reverse-plus-shift coding
🔒 Log in to trackThe code is the word written backwards, sometimes with a shift added. A close cousin replaces each letter by its opposite letter (A↔Z, B↔Y). Test both in seconds: read the code backwards, and add the positions of matching letters.
What reverse coding is
The word is written from right to left. LOGIC becomes CIGOL.
Examiners often add one more step, like a shift. Some codes use opposite letters instead. This lesson covers all of these.
Test for reversal in one move
Read the code from right to left. What you see names the rule.
| Reading the code backwards tells you | Rule |
|---|---|
| the word itself | pure reversal |
| the word with every letter moved by the same k | reverse, then shift by k |
| letters far from the word | try opposite letters |
- You see the word → pure reversal. GARDEN → NEDRAG.
- You see the word with every letter moved by the same steps → reverse and shift.
- You see nothing familiar → try opposite letters.
Tip: This backwards read takes three seconds. Do it before any subtraction.
Reverse and shift
PAINT → UOJBQ. Reverse PAINT to get TNIAP. Compare TNIAP with UOJBQ: T→U, N→O, I→J, A→B, P→Q. Each is +1. So the rule is: reverse, then +1.
With a flat shift, the order does not matter. "Reverse then shift" and "shift then reverse" give the same code.
Watch: With a changing shift like +1, +2, +3, the order matters. Copy the order the sample used.
For example, CLOUD reversed is DUOLC, and +1, +2, +3, +4, +5 gives EWRPH. Shifting first and reversing after gives IYRND. Only one of them matches the sample's rule.
Opposite letters
Fold the alphabet in the middle. A sits on Z, B on Y, C on X, and so on. These pairs are opposite letters. The positions in a pair always add up to 27.
| 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 |
To find an opposite, subtract the position from 27. Opposite of K (11) = 27 − 11 = 16 = P. Opposite of T (20) = 27 − 20 = 7 = G.
To spot it, add the positions of the first word letter and the first code letter. If the sum is 27, check one more letter. WHITE → DSRGV: W (23) + D (4) = 27 and H (8) + S (19) = 27.
Rule: Opposite = 27 − position. Not 26.
Opposite and reverse together
Some codes write the opposite letters and then reverse the result. LAMP → opposites OZNK → reversed KNZO.
Check it the same way, but on the far end. In DESK → PHVW, the first code letter P (16) and the last word letter K (11) add up to 27. That is the fingerprint of opposite plus reverse.
To spot it, check the first code letter against the last word letter. Here K is the opposite of P.
Decoding these codes
- Reversal undoes itself. Reverse the code to get the word back.
- Opposite letters undo themselves too. The opposite of P is K, and the opposite of K is P.
- For reverse and shift, undo the shift first, then reverse.
Question types you will see
Each type: how to recognise it, the method step by step, and one question to try.
Pure reversal
The code has the same letters as the word, written from right to left.
Read the sample code backwards. You should see the word.
Write the new word backwards.
For decoding, reverse the code.
Reversal is its own undo, so one read confirms the rule.
In a certain code language, GARDEN is written as NEDRAG. How will FLOWER be written in that language?
Show solutionHide solution
NEDRAG read backwards is GARDEN, so the rule is pure reversal.
FLOWER backwards is R-E-W-O-L-F.
REWOLF
Reverse and then shift
Reading the code backwards gives the word with every letter moved by the same steps.
Reverse the sample word.
Compare it with the code letter by letter to find the shift.
Reverse the new word and apply the same shift.
The code is two simple rules in a row.
In a certain code language, PAINT is written as UOJBQ. How will BRUSH be written in that language?
Show solutionHide solution
PAINT reversed is TNIAP. TNIAP → UOJBQ is +1 on each letter.
BRUSH reversed is HSURB.
HSURB +1 gives ITVSC.
ITVSC
Opposite letters (positions add to 27)
Code letters look far from the word letters. Each word letter and its code letter add up to 27.
Add the positions of the first word letter and the first code letter.
If the sum is 27, confirm with one more letter.
Write the opposite of each letter of the new word.
Opposite pairs are fixed, so the code is a simple look-up.
In a certain code language, WHITE is written as DSRGV. How will GREEN be written in that language?
Show solutionHide solution
W (23) + D (4) = 27, so the code uses opposite letters.
G↔T, R↔I, E↔V, E↔V, N↔M.
TIVVM
Opposite letters plus reversal
The first code letter is the opposite of the last word letter.
Pair the first code letter with the last word letter. Their sum should be 27.
For the new word, write the opposite letters.
Reverse the result.
Both steps undo themselves, so the order of the two steps does not change the answer.
In a certain code language, LAMP is written as KNZO. How will DESK be written in that language?
Show solutionHide solution
LAMP → opposites OZNK → reversed KNZO. The rule fits.
DESK → opposites WVHP.
Reverse WVHP to get PHVW.
PHVW
Reverse, then a rising shift (+1, +2, +3, …)
Reversing the word does not give a flat shift. The differences after reversing rise place by place.
Reverse the sample word.
Find the shift list between the reversed word and the code.
Reverse the new word, then apply the same list.
Do not shift first. The order changes the answer here.
With a changing shift, the place of each letter matters, so the order of steps matters.
In a certain code language, BRAIN is written as OKDVG. How will CLOUD be written in that language?
Show solutionHide solution
BRAIN reversed is NIARB.
NIARB → OKDVG is +1, +2, +3, +4, +5.
CLOUD reversed is DUOLC.
DUOLC with +1, +2, +3, +4, +5 gives EWRPH.
EWRPH
Shortcuts that save time
Read the code from right to left. If you see the word, just reverse new words. If every letter is off by the same k, reverse and shift by k.
If TABLE is written as FMCBU, how is CHAIR written?
Show solutionHide solution
TABLE reversed is ELBAT. ELBAT +1 gives FMCBU.
CHAIR reversed is RIAHC.
RIAHC +1 gives SJBID.
SJBID
Mistakes to avoid
Where most students lose marks on this subtopic.
Reversing the word but forgetting the extra shift.
After reversing, compare with the code letter by letter for a leftover shift.
Using 26 for opposites (26 − 11 = 15 = O for K).
Opposite = 27 − position. The opposite of K is P.
Shifting before reversing when the sample reversed first, with a changing shift.
Copy the sample's order. With +1, +2, +3 the two orders give different codes.
Leaving the middle letter of an odd word unchanged.
The middle letter stays in place on reversal, but it still gets the shift or opposite.
Matching the first code letter with the first word letter only.
Also check it against the last word letter. That catches opposite + reverse.
Quick revision
Read this the night before the exam.
Read the code backwards first: the word appears → reversal.
The word appears shifted → reverse and shift; find k from one letter.
Positions add to 27 → opposite letters; opposite = 27 − position.
First code letter pairs with the last word letter → opposite + reverse.
Flat shift: order does not matter. Changing shift: copy the order.
Reversal and opposite letters undo themselves when decoding.
Practice: 12 questions
Sets of 10, mixed across the question types above. Every answer has a step-by-step explanation.
Topic test · 12 questions
Suggested time 8 min · wrong answers go to your mistake notebook automatically.