Codes & Ciphers

Decoding and encoding messages using letter and number rules

Explanation

What are Codes and Ciphers?

A code replaces each letter with another letter, number, or symbol according to a rule. You must find the rule to decode (or encode) a word.

Common Cipher Types

1. Letter Shift (Caesar Cipher)

Each letter shifts forward (or backward) by a fixed number.

Example (+3): A→D, B→E, C→F → "CAT" becomes "FDW"

Example (−1): B→A, C→B, D→C → "DBU" means "CAT"

2. Reverse Alphabet

A↔Z, B↔Y, C↔X, D↔W ...

Example: "CAT" → "XZG"

3. Letters as Numbers

A=1, B=2, C=3 ... Z=26

Example: "3-1-20" = C-A-T = "CAT"

4. Consistent Substitution

A whole word is given with its coded form — find the shift and apply it.

Example: If RAIN is coded as SBJO, how is SNOW coded?
Each letter increases by 1: R→S, A→B, I→J, N→O
Apply to SNOW: S→T, N→O, O→P, W→X → TOPX

How to Decode

  1. Find the pattern by comparing the given word to its code.
  2. Determine direction: forward shift, backward shift, or reversal.
  3. Apply the same rule to encode or decode the target word.
  4. Check that your decoded result makes sense as a word.

Key Tips

  • Always work out the rule from the sample pair before tackling the question
  • For letter-to-number codes, remember A=1 (not A=0)
  • When wrapping: Z + 1 = A (use modular arithmetic: position mod 26)
  • Reverse alphabet: position of mirror letter = 27 − original position
Sample Practice Questions
  1. In the reverse alphabet code (A↔Z, B↔Y ...), what letter codes for M?

    • L
    • M
    • N
    • O
    Show answer

    Answer: N

  2. Each letter shifts back 3 (D→A, E→B ...). 'FDW' decodes to ___.

    • ACT
    • CAT
    • COT
    • DOG
    Show answer

    Answer: CAT

  3. If A = 1, B = 2, then C = ?

    • 2
    • 3
    • 4
    • 1
    Show answer

    Answer: 3

  4. Each letter shifts forward 2 (A→C, B→D ...). Decode 'EQI'.

    • COB
    • COG
    • COP
    • DOG
    Show answer

    Answer: COG

Take the full quiz →
Practice Questions

Test your knowledge of Codes & Ciphers with a timed quiz. Answers are revealed at the end.

Take Quiz →