Why this topic matters · 7 min read
Coding-Decoding is a HIGH-FREQUENCY topic in UP Police Constable reasoning section (typically 3-5 questions per paper). Examiners test your ability to recognize patterns in letter-to-number or letter-to-letter substitutions. Questions range from simple A=1, B=2 patterns to reverse alphabets, position shifts, and mixed operations. Speed and pattern recognition matter more than calculation. Most aspirants lose marks by missing the substitution rule or making careless arithmetic errors.
Basic Letter-Number Substitution
The simplest and most common form. Each letter of the alphabet is assigned a number based on its position. A is always position 1, B is 2, and so on up to Z at position 26. The code word is converted letter-by-letter using this rule. For example, CAT becomes 3-1-20. This is the foundation; once you master it, all other patterns build on this base.
- A=1, B=2, C=3... Z=26 is the standard forward alphabet code
- Always count from the start of the alphabet, not from the word
- Write out A-Z with numbers 1-26 on your rough sheet at exam start — saves time
- Reverse alphabet: A=26, B=25, C=24... Z=1 (opposite direction)
- Mixed codes: some letters forward, some reverse — watch for the pattern in the question
Key formulas
Forward Position
Letter Position = (Letter - A) + 1
When: Converting any letter to its forward alphabet position (A=1, B=2, etc.)
Reverse Position
Letter Position = 27 - (Letter - A)
When: Converting any letter to its reverse alphabet position (A=26, Z=1)
Worked examples
Code the word POLICE using forward alphabet: P=16, O=15, L=12, I=9, C=3, E=5. Answer: 16-15-12-9-3-5
Code the word POLICE using reverse alphabet: P=11 (27-16), O=12 (27-15), L=15 (27-12), I=18 (27-9), C=24 (27-3), E=22 (27-5). Answer: 11-12-15-18-24-22
Position Shift and Offset Coding
Instead of using the direct position, each letter is shifted by a fixed number. For example, A might become 2 (shift by +1), B becomes 3, C becomes 4, etc. This is also called Caesar Cipher in some contexts. The shift can be forward (add) or backward (subtract). The key is to identify the shift value from the given example in the question.
- Identify the shift by comparing a known letter with its code in the example
- Shift is consistent across all letters in the word
- If A=2, then shift is +1; if A=0, then shift is -1
- Watch for wrapping: if Z is shifted forward, it may wrap to 1 or 0
- Always verify your shift with at least two letters before coding the entire word
Key formulas
Shift Coding
Code = Position + Shift (or Position - Shift)
When: When letters are offset by a constant value from their standard position
Worked examples
If A=3, B=4, C=5, then shift is +2. To code HELP: H=8+2=10, E=5+2=7, L=12+2=14, P=16+2=18. Answer: 10-7-14-18
If Z=0, Y=1, X=2, then shift is reverse with offset. Z=26-26=0, Y=26-25=1. To code BAT: B=26-2=24, A=26-1=25, T=26-20=6. Answer: 24-25-6
Reverse Alphabet and Mirror Coding
Each letter is replaced by its mirror opposite in the alphabet. A pairs with Z, B with Y, C with X, and so on. This is very common in UP Police exams. The formula is simple: if a letter is at position P, its mirror is at position (27 - P). This creates a symmetric substitution where the entire alphabet flips.
- A-Z mirror: 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
- Memorize the middle pairs (M-N, L-O, K-P) — they're easy to confuse
- Mirror coding is symmetric: if A→Z, then Z→A automatically
- Use the mnemonic AZYXWVUTSRQPONMLKJIHGFEDCB to visualize the reverse alphabet
- In exams, write out the mirror pairs on your rough sheet for quick lookup
Key formulas
Mirror Position
Mirror = 27 - Original Position
When: Finding the opposite letter in reverse alphabet coding
Worked examples
Code HELLO using mirror alphabet: H(8)→S(19), E(5)→V(22), L(12)→O(15), L(12)→O(15), O(15)→L(12). Answer: SVOOL
Decode GSRH using mirror alphabet: G(7)→T(20), S(19)→H(8), R(18)→I(9), H(8)→S(19). Answer: THIS
Mixed and Conditional Coding
Advanced patterns where the rule changes based on position, vowel/consonant, or other conditions. For example, vowels might be coded one way and consonants another. Or odd positions use one rule, even positions use another. These require careful reading of the example to identify the pattern before applying it.
- Always analyze the given example(s) to extract the rule — don't assume
- Check if vowels (A, E, I, O, U) and consonants are treated differently
- Look for position-based rules: first letter, last letter, middle letters
- Some questions use multiple operations: shift + reverse, or shift + vowel swap
- Read the question statement carefully — the rule is always hidden in the example
Decoding (Reverse Process)
Given a code, you must find the original word. This requires reversing the substitution rule. If the rule is A=1, then 1=A. If the rule is mirror alphabet, then applying mirror again gives the original. The key is to apply the inverse operation. Decoding is slightly trickier because you must work backward, but the logic is identical.
- Decoding is the reverse of encoding — apply the opposite operation
- If encoding shifts by +3, decoding shifts by -3
- If encoding uses mirror, decoding also uses mirror (mirror is self-inverse)
- Always verify by re-encoding your decoded answer to match the original code
- In exams, decoding questions are less common but test deeper understanding
Worked examples
If the code is 8-5-12-12-15 and rule is A=1, B=2, etc., decode: 8=H, 5=E, 12=L, 12=L, 15=O. Answer: HELLO
If the code is SVOOL and rule is mirror alphabet, decode: S→H, V→E, O→L, O→L, L→O. Answer: HELLO
⚠ Common mistakes to avoid
- Forgetting that A=1, not A=0. Many aspirants start counting from 0 and lose marks on every question.
- Confusing forward and reverse alphabet. Write both out clearly on rough paper before starting; don't rely on memory.
- Misidentifying the shift value. Always verify with at least two letters from the example before coding the entire word.
- Arithmetic errors in position calculation. Double-check your addition/subtraction, especially under time pressure.
- Not reading the question carefully. Some questions have conditional rules (vowels vs. consonants) hidden in small print — miss this and your entire answer is wrong.
- Wrapping errors in reverse alphabet. If you get a number > 26 or < 1, you've made an error — recalculate.
🧠 Memory aids
- A-Z = 1-26: Think of A as 'first' (1) and Z as 'last' (26). Write this on your rough sheet immediately.
- AZYXWVUTSRQPONMLKJIHGFEDCB: This is the reverse alphabet in order. Memorize the first half (AZYXWVUTSRQPON) and the second half mirrors it.
- Mirror pairs: AM, BL, CK, DJ, EI, FH, GG (middle). Use this to quickly find opposites.
- Shift = Code - Position: If you see A=3, then Shift = 3 - 1 = 2. Always calculate shift first.
- Decode = Reverse the Rule: If encoding adds 5, decoding subtracts 5. Keep this simple rule in mind.
🎯 UP POLICE CONSTABLE exam tips
- UP Police Constable typically asks 3-5 coding-decoding questions in the reasoning section. They are usually straightforward (forward alphabet or mirror) with occasional shift patterns. Expect 1-2 minutes per question if you're prepared.
- Recent papers show a preference for mirror alphabet and simple shift coding. Reverse alphabet (A=26) appears in 60% of papers. Master this first.
- Questions often ask you to code a word given the rule, or decode a word given the code. Decoding is slightly less common but tests deeper understanding.
- Time-saving tip: Write A-Z with numbers 1-26 and the reverse alphabet on your rough sheet in the first 30 seconds. This eliminates counting errors and saves 30 seconds per question.
- Watch for multi-word questions. If the question asks to code a phrase like 'HELLO WORLD', apply the rule to each word separately. Don't skip spaces or punctuation unless told to.
- In mixed coding (vowel-consonant rules), identify the pattern from the first example, then apply consistently. One mistake in pattern identification ruins the entire answer.
Q1 · medium · AI-verified
If in a code language, TABLE = 20-1-2-12-5 and CHAIR = 3-8-1-9-18, then what is the code for BENCH?
- 2-5-14-3-9
- 2-4-14-3-8
- 2-5-13-3-8
- 2-5-14-3-8
Q2 · medium · AI-verified
In a code language, PENCIL is written as QFODKM. Then how will PAPER be written?
- QBQFS
- QBPFS
- QAQFS
- RBQFS
Q3 · hard · AI-verified
If in a code language NECTOR = 'OFDUQS', then FOREST = ?
- GPSETU
- GPSFTU
- GPRFTU
- GPSFSU
Q4 · hard · AI-verified
In a certain code language, if 25 means 'E' (5th letter) and 169 means 'M' (13th letter), then 196 means which letter?
- P
- O
- M
- N
Q5 · hard · AI-verified
In a certain code language, if 'WATER' = 'YCVGT', then 'STONE' = ?
- UVQOG
- UVQPG
- TVQPG
- UVRPG