Sarkari RiseLogin

Directions and Coding-Decoding Questions for UPSC CSE

Free, AI-curated practice for the Directions and Coding-Decoding section of UPSC CSE. We have 17+ verified questions in this bank. Below: 5 sample questions. Sign up free to unlock unlimited practice + AI explanations + per-topic analytics.

▶ Start free — UPSC CSE mockAll UPSC CSE resourcesAlready a user? Sign in →
Why this topic matters · 7 min read
Directions and Coding-Decoding are staple topics in UPSC CSAT Paper 2 (General Studies Paper 2). CSAT is qualifying in nature (33% cutoff) but aspirants must not underestimate it. Directions questions test spatial reasoning and appear 1-2 times per paper. Coding-Decoding tests pattern recognition and logical substitution and appears 2-3 times. Both are high-accuracy, low-time-investment questions if you have the core tricks memorised. Wrong approaches here waste time and reduce confidence.

Directions: Core Compass Framework

Think of directions as a clock face. North is 12 o clock, East is 3, South is 6, West is 9. The most common error is confusing left and right turns relative to the person's current facing direction, not the map. Always track: where the person is FACING after each turn, not just where they moved. Shadow-based questions add a twist: morning sun is in the East, so shadow falls West. Evening sun is in the West, so shadow falls East. At noon, shadow is shortest and falls toward the South in India.

  • Left turn = anticlockwise rotation of 90 degrees from current facing direction
  • Right turn = clockwise rotation of 90 degrees
  • Opposite directions: North-South, East-West
  • Diagonal directions: NE, NW, SE, SW are at 45 degrees between main directions
  • Shadow rule: morning shadow is opposite to sun, so faces West. Evening shadow faces East
  • Net displacement shortcut: resolve all movements into North-South and East-West components, then use Pythagoras for straight-line distance
Key formulas
Straight-line distance
Distance = sqrt((Net NS movement)^2 + (Net EW movement)^2)
When: Use when question asks for shortest distance between start and end point after multiple movements
Worked examples

A person walks 3 km North, turns right walks 4 km. Straight-line distance from start = sqrt(3^2 + 4^2) = sqrt(9+16) = sqrt(25) = 5 km. Classic 3-4-5 Pythagorean triple — memorise this.

A walks 5 km East, 5 km South, 5 km West. Net EW = 0, Net NS = 5 km South. Distance from start = 5 km South. No Pythagoras needed when one component is zero.

Coding-Decoding: Types and Tactics

Coding-Decoding questions give you a rule (sometimes hidden) by which letters, words or numbers are transformed. Your job is to decode the rule and apply it to a new input. There are roughly four types: letter shifting (A becomes D means shift of +3), substitution (each word is replaced by another word), symbol or number coding, and mixed coding (sentences coded into groups). The key is to find the rule from the given example before solving — do not guess.

  • Letter shift coding: count the alphabet position shift. A=1, B=2 ... Z=26. If A is coded as D, shift is +3.
  • Reverse alphabet trick: A=Z(26), B=Y(25). Position from front + position from back = 27. Useful shortcut.
  • If coding reverses word order or letter order, check that pattern first before assuming a shift.
  • In number coding, look at the relationship between word length or letter position and the number given.
  • In sentence coding, decode one word at a time by finding which code appears in two sentences that share that word.
  • Watch for capital vs lowercase, odd vs even position patterns — UPSC sometimes hides the trick here.
Key formulas
Alphabet position complement
Position from back = 27 - Position from front
When: Use when letters seem to be coded as their mirror in the alphabet. E.g., A(1) coded as Z(26): 1+26=27
Letter shift formula
Coded letter position = (Original position + Shift - 1) mod 26 + 1
When: Use when alphabet wraps around, e.g., Y shifted by +3 becomes B not AB
Worked examples

If MANGO is coded as NBNHP, each letter is shifted by +1 (M+1=N, A+1=B, N+1=O wait that gives O not N). Recheck: M=13+1=14=N, A=1+1=2=B, N=14+1=15=O but code shows H. So it is not +1 uniform. Try alternate position shifts: odd positions +1, even positions +2. M(+1)=N, A(+2)=C... does not match. Always verify ALL letters before committing to a rule.

Sentence coding: 'sky is blue' = 'pe la ni', 'grass is green' = 'la ho ti'. Common word is 'is' and common code is 'la'. So 'is' = 'la'. This elimination method works for all sentence-coding questions.

Shadow and Clock-Based Direction Questions

A special sub-type combines directions with shadows or clock hands. For shadows: the sun rises in the East and sets in the West. If a person faces North in the morning, their shadow falls to the West (behind them if they face East, but they face North so shadow is to their West). A simpler rule: shadow always points AWAY from the sun. For clock-based problems, 12 is North, 3 is East, 6 is South, 9 is West — same as the compass-clock analogy mentioned earlier.

  • Morning sun in East: shadow points West
  • Evening sun in West: shadow points East
  • Noon sun overhead (approximately South in India): shadow points North and is shortest
  • If a person's shadow falls to their right, and it is morning, they are facing South
  • Always anchor the shadow direction to the sun position first, then infer facing direction
⚠ Common mistakes to avoid
  • Confusing absolute directions (map North) with relative directions (the person's left or right). Always rotate the compass based on the current facing direction before applying left or right.
  • In Coding-Decoding, assuming the pattern from just one letter and not verifying with all letters. UPSC setters deliberately make the first letter fit two different patterns to trap you.
  • Forgetting that in Pythagoras distance problems, you need NET displacement in each axis, not total distance walked in that axis. Walking 3 km North then 2 km South gives net 1 km North, not 5 km.
  • In shadow questions, reversing the sun-shadow relationship. Remember: shadow is the sun's opposite, not the person's opposite.
  • Spending more than 90 seconds on a single CSAT question. If the coding rule is not clear in 60 seconds, mark and move — come back later.
🧠 Memory aids
  • NESW clock analogy: Never Eat Soggy Waffles — North East South West going clockwise. Place on a clock: N=12, E=3, S=6, W=9.
  • Shadow trick — SUN CHASES SHADOW AWAY: Shadow always runs away from the sun. Morning sun (East) means shadow flees to the West.
  • Alphabet complement: A+Z=27, B+Y=27. Remember 27 is your magic number for reverse alphabet coding.
  • Coding rule: VCAT — Verify all letters, Check for shift, Alternating pattern check, Try reverse alphabet. Use VCAT before committing to any coding answer.
🎯 UPSC CSE exam tips
  • UPSC CSAT typically has 1-2 direction questions and 2-3 coding-decoding questions per paper. Together they can fetch you 10-15 marks in 10-12 minutes if practiced — excellent ROI.
  • Direction questions in recent papers (2019-2023) have increasingly combined two concepts: a displacement path AND a shadow or clock element. Practice hybrid questions.
  • Coding-Decoding in UPSC CSAT tends to use sentence coding (3 coded sentences, find the code for one word) more than simple letter-shift coding. Practice the elimination method thoroughly.
  • In CSAT, negative marking is 0.83 marks per wrong answer (one-third of 2.5 marks). For directions, if you draw the path on paper accurately, you can be almost certain — attempt these. For tricky coding, if you cannot find the rule, skip rather than guess.
  • Time management: allocate maximum 2 minutes per directions question (draw it out) and 90 seconds per coding question. If a coding question has no clear pattern in 90 seconds, it is likely a high-difficulty setter trap — skip it.

Sample questions

Q1 · medium · AI-verified
A boy starts walking from point P, goes 5 km East, then 3 km North, then 5 km West, then 7 km South. How far and in which direction is he from point P?
  1. 4 km, South
  2. 10 km, South
  3. 5 km, South-West
  4. 4 km, North
Q2 · medium · AI-verified
If in a code language, 'SISTER' = 'RHRSDQ' and 'FATHER' = 'EZSGDQ', what does 'MOTHER' mean in the same code?
  1. MNSGDQ
  2. LNSGDQ
  3. KNSGDQ
  4. LNTGDQ
Q3 · medium · AI-verified
Priya starts from her house, walks 8 km towards North, then turns right and walks 6 km, then turns right and walks 8 km. What is the shortest distance between her current position and her house?
  1. 6 km
  2. 14 km
  3. 10 km
  4. 8 km
Q4 · medium · AI-verified
If in a code, 'TIGER' is written as 'TIGRE', 'WATER' is written as 'WATRE', then 'POWER' is written as:
  1. POWRE
  2. POWERS
  3. RPOWE
  4. POREW
Q5 · hard · AI-verified
Four friends A, B, C, and D are standing at four cardinal points of a square. A is North of B. D is West of B. C is diagonally opposite to A. If the square has a side length of 5 km, and A moves 3 km towards B while B moves 2 km towards D, what is the straight-line distance between A and B after these movements?
  1. √13 km
  2. 3 km
  3. 2 km
  4. √10 km
💡 Want answers + explanations + 12+ more Directions and Coding-Decoding questions? Sign up free →
⭐ Recommended for UPSC CSE aspirants

Pro Plus 6-month

UPSC Prelims + Mains Essay Coach + Cutoff Planner
₹2,499~₹13.8/day
Sign up free, then unlockSee all plans →

More UPSC CSE topics

Ancient India
51+ practice questions
Modern India
43+ practice questions
Medieval India
41+ practice questions
Mineral Resources
40+ practice questions
Indian National Movement
39+ practice questions
Physical Geography of India
33+ practice questions

Free practice, AI explanations, 24 exams — all in one app

Daily 10-Q quiz · AI doubt solver in Hindi + English · adaptive mocks · 4,150+ verified PYQs.

Sign up freePricingTry Daily 10-Q