Coding and Decoding
About 7 min · General Intelligence and Reasoning · English
Time worked out from the lesson's 505 words at 150 words a minute, plus a minute for each question.
Coding and Decoding is a reasoning topic in RRB NTPC, testing your ability to identify patterns and apply logical rules consistently. In these questions, a word, number, or phrase is transformed according to a hidden rule, and you must either decode a given code or encode a new word using the same rule. This topic directly evaluates pattern recognition, attention to detail, and logical consistency — skills critical for administrative and technical roles in Indian Railways.
Key ideas
- Letter Position Values: Every letter has a position in the English alphabet: A=1, B=2, C=3...Z=26. Many coding schemes rely on these position values, either directly or after arithmetic operations.
- Forward and Reverse Alphabets: In reverse alphabet coding, A↔Z, B↔Y, C↔X and so on. Position of a letter + position of its reverse counterpart always equals 27. This is a common transformation rule.
- Fixed Shift (Caesar Cipher): Each letter is replaced by a letter a fixed number of positions ahead or behind in the alphabet. For example, shift +3 means A→D, B→E, C→F.
- Conditional Rules: The coding rule changes based on a condition — e.g., "if the word starts with a vowel, reverse the entire code; if consonant, shift each letter by +2." Identifying the condition is the key challenge.
- Number-Letter Correspondence: Words may be coded as sequences of numbers corresponding to letter positions, or through arithmetic (sum, product, difference of positions).
Watch out for
- Ignoring Opposite-Letter Symmetry: Students often try +1 or -1 shifts when the actual rule is opposite letters. Always check if position_old + position_new = 27 for any pair. If yes, opposite-letter coding is in play.
- Inconsistent Rule Application: Applying a rule to only part of the word or changing the rule mid-word. The same transformation must apply to every letter (or follow a consistent positional/conditional pattern). Verify your rule with all given examples before finalizing.
- Wraparound Errors in Shifts: Forgetting that after Z comes A (forward) or before A comes Z (backward). For example, Y + 3 = B (not 28). Use modular arithmetic: (25 + 3 - 1) mod 26 + 1 = 2 = B.
Quick reference
- Alphabet positions: A=1, B=2...Z=26; opposite of n is 27-n.
- Common patterns: fixed shift (+n or -n), opposite letters, position sums, conditional rules.
- Always verify your identified rule against all given examples before applying to the question.
- Watch for wraparounds when shifting near A or Z.
- In conditional coding, distinguish vowels (A,E,I,O,U) from consonants carefully.
Check yourself: 3 questions
1. In a certain code language, 'PENCIL' is written as 'QFODJM'. How will 'ERASER' be written in that code?
2. In a certain code language, if 'sky is blue' is coded as '816', 'blue and white' is coded as 'promotion' wait, let me rewrite: If 'sky is blue' is coded as '8 3 6', 'sea is deep' is coded as '5 3 9', and 'blue ocean deep' is coded as '6 7 9', what is the code for 'sky'?
3. In a certain code language, if 'TRAIN' is written as 'USBJO', how is 'TRACK' written in that code?
This lesson is cut from the topic's note, not rewritten. Fact-checked on 18 Oct 2026: an AI-assisted check of this note against cited sources; the errors it found were corrected that day. Some errors may remain. The questions are from Shishya's validated question bank.
Read the full noteFlashcards for this topic
Saves this lesson and its 3 questions in this browser on this phone. No sign-in; nothing about you is saved or sent. A saved copy is not updated until you save it again. Parts that load from the server when you use them (the AI tutor, adaptive practice, sign-in) still need a connection.