- Foundation
- About 13 min
- 5 practice questions
Letter shifting and the opposite alphabet
Apply forward shifts, backward shifts and the opposite-letter rule (A to Z, B to Y), and use the sum-to-27 trick to code quickly.
If something looks wrong, please tell us.
Most coding questions use one of three letter rules: shift forward, shift backward, or replace with the opposite letter. This lesson shows how to do each quickly and avoid slips.
The three rules
The three rules
-
Forward shift +n
- The letter n steps later
- Y with +2 wraps around to A
-
Backward shift −n
- The reverse of a forward shift
- B with −2 wraps around to Z
-
Opposite letter
- A and Z, B and Y, C and X
- A pair's positions add up to 27
- Forward shift +n: A becomes the letter n steps later; Y with +2 wraps around to A.
- Backward shift -n: the reverse; B with -2 wraps around to Z.
- Opposite letter: A and Z, B and Y, C and X ... The positions of a pair always add up to 27.
For an opposite letter, subtract the position from 27. For D (4), the opposite is 27 - 4 = 23, which is W. For P (16), the opposite is 27 - 16 = 11, which is K.
Finding the opposite letter
- Take the position D = 4.
- Subtract from 27 27 − 4 = 23.
- Name the letter 23 is W.
Worked examples
Example 1. Code BAD using the opposite-letter rule. B (2) to 25 = Y. A (1) to 26 = Z. D (4) to 23 = W. The code is YZW.
Example 2. If DOG is coded as WLT, find the rule. D (4) and W (23) add to 27. O (15) and L (12) add to 27. G (7) and T (20) add to 27. The rule is opposite letters. So CAT is coded as X, Z, G: XZG.
Example 3 (wrap-around). Code ZOO with +2. Z (26) + 2 = 28, and 28 - 26 = 2, which is B. O (15) + 2 = 17, which is Q. The code is BQQ.
Example 4 (decoding). The code is BQQ, and the rule was +2. Go back 2: B (2) - 2 = 0, so add 26 to get 26, which is Z. Q (17) - 2 = 15, which is O. The word is ZOO.
Opposite letters add up to 27. For wrap-around, add or subtract 26.
Key takeaways
- Use position arithmetic; add or subtract 26 for wrap-around.
- Opposite pairs sum to 27.
- Decode by reversing the operation.
Check your understanding
-
1. Using the opposite-letter rule, what is the code for BOX?
- YLD
- YMC
- YLC
- ZLC
Show answer
Answer: C. Opposite positions add to 27. B (2) to 25 = Y, O (15) to 12 = L, X (24) to 3 = C. The code is YLC.
-
2. If each letter is shifted forward by 3, what is the code for WAX?
- YDA
- ZCA
- ZDB
- ZDA
Show answer
Answer: D. W (23) + 3 = 26 = Z. A (1) + 3 = 4 = D. X (24) + 3 = 27, and 27 - 26 = 1 = A. The code is ZDA.
-
3. If GOD is coded as TLW, how is FUN coded?
- UEM
- UFN
- VFM
- UFM
Show answer
Answer: D. G (7) and T (20) add to 27, as do O and L, D and W, so the rule is opposite letters. F (6) to 21 = U, U (21) to 6 = F, N (14) to 13 = M. The code is UFM.
-
4. If each letter is shifted back by 2, what is the code for BAT?
- ZYR
- AYR
- DCV
- ZXR
Show answer
Answer: A. B (2) - 2 = 0, add 26 to get 26 = Z. A (1) - 2 = -1, add 26 to get 25 = Y. T (20) - 2 = 18 = R. The code is ZYR.
-
5. A word was coded by shifting each letter forward by 2, giving ACM. What is the word?
- CEO
- YAK
- YAL
- ZBL
Show answer
Answer: B. Decode by shifting back 2. A (1) - 2 = -1, add 26 to get 25 = Y. C (3) - 2 = 1 = A. M (13) - 2 = 11 = K. The word is YAK.
Sign in to keep track of the lessons you finish.