Back to Courses

Logical Reasoning · Coding-Decoding

Basic - Concepts, Formulas, Key points and Examples

Explanation

🔵 CODING AND DECODING 🟢 1. BASIC CONCEPT Coding is a method of representing letters, words, numbers or sentences using a specific rule or pattern. Decoding is the process of finding the original word, letter, number or sentence from the coded form. The main objective is to identify the rule used in coding and apply the same rule to the given problem.
..............
🟡 KEY POINT The coding rule must always be identified from the information given in the question.
................
🟢 2. ALPHABET POSITIONS Every letter of the English alphabet has a numerical position.
A=1,B=2,C=3,…,Z=26 A=1,\quad B=2,\quad C=3,\quad \ldots,\quad Z=26
Important positions:
A=1,E=5,I=9,M=13 A=1,\quad E=5,\quad I=9,\quad M=13
N=14,R=18,V=22,Z=26 N=14,\quad R=18,\quad V=22,\quad Z=26
🟡 KEY POINT Knowing alphabet positions helps solve most coding and decoding questions quickly. 🟢 3. REVERSE ALPHABET POSITIONS In reverse alphabet coding, the alphabet is considered from Z to A.
A=26,B=25,C=24,…,Z=1 A=26,\quad B=25,\quad C=24,\quad \ldots,\quad Z=1
The reverse position of a letter is:
Reverse Position=27−Alphabet Position \text{Reverse Position} = 27-\text{Alphabet Position}
For example:
A→Z A\rightarrow Z
B→Y B\rightarrow Y
C→X C\rightarrow X
🟡 KEY POINT The normal position and reverse position of a letter always add up to 27.
Normal Position+Reverse Position=27 \text{Normal Position} + \text{Reverse Position} = 27
🟢 4. LETTER SHIFT CODING In letter shift coding, each letter is moved forward or backward by a fixed number of positions. For a forward shift of kk positions:
Coded Position=Original Position+k \text{Coded Position} = \text{Original Position}+k
For a backward shift of kk positions:
Coded Position=Original Position−k \text{Coded Position} = \text{Original Position}-k
Example of a forward shift:
A→C A\rightarrow C
when the shift is 2. Example of a backward shift:
D→B D\rightarrow B
when the shift is 2. 🔴 IMPORTANT If a forward shift passes Z, continue again from A. If a backward shift goes before A, continue again from Z. 🟢 5. FORWARD SHIFT In forward shift coding, letters are moved towards the right side of the alphabet. For a shift of 1:
A→B A\rightarrow B
B→C B\rightarrow C
C→D C\rightarrow D
For a shift of 2:
A→C A\rightarrow C
B→D B\rightarrow D
C→E C\rightarrow E
🟡 KEY POINT Check whether every letter has been shifted by the same number of positions. 🟢 6. BACKWARD SHIFT In backward shift coding, letters are moved towards the left side of the alphabet. For a shift of 1:
B→A B\rightarrow A
C→B C\rightarrow B
D→C D\rightarrow C
For a shift of kk:
Coded Position=Original Position−k \text{Coded Position} = \text{Original Position}-k
🟢 7. DECODING A SHIFT Decoding means reversing the operation used during coding. If coding uses a forward shift of kk:
Original Position=Coded Position−k \text{Original Position} = \text{Coded Position}-k
If coding uses a backward shift of kk:
Original Position=Coded Position+k \text{Original Position} = \text{Coded Position}+k
🟡 KEY POINT To decode, perform the opposite operation used for coding. 🟢 8. MIRROR OR REVERSE ALPHABET CODING In mirror alphabet coding, letters are paired from opposite ends of the alphabet.
A↔Z A\leftrightarrow Z
B↔Y B\leftrightarrow Y
C↔X C\leftrightarrow X
D↔W D\leftrightarrow W
The general formula is:
Mirror Position=27−Original Position \text{Mirror Position} = 27-\text{Original Position}
🟢 9. ALPHABET VALUE CODING In alphabet value coding, letters are replaced by their numerical positions.
A=1,B=2,C=3,…,Z=26 A=1,\quad B=2,\quad C=3,\quad \ldots,\quad Z=26
A word may be represented by the individual values of its letters. For example:
CAT→3, 1, 20 CAT\rightarrow 3,\ 1,\ 20
The values may also be added:
CAT=3+1+20 \text{CAT} = 3+1+20
=24 =24
🟡 KEY POINT Check whether the question requires individual alphabet values or the sum of the values.
................
🟢 10. ALPHABET DIFFERENCE Some coding questions are based on the difference between the positions of two letters. The formula is:
Difference=∣Position1−Position2∣ \text{Difference} = \left| \text{Position}_1-\text{Position}_2 \right|
For example:
H=8,C=3 H=8,\quad C=3
Therefore:
∣8−3∣=5 |8-3|=5
🟢 11. REARRANGEMENT CODING In rearrangement coding, the letters remain unchanged but their positions are changed. For complete reversal:
ABCDE→EDCBA ABCDE\rightarrow EDCBA
The question may also interchange selected positions. 🟡 KEY POINT Check whether the letters themselves have changed or only their order has changed. 🟢 12. POSITION-WISE CODING Sometimes different positions of a word follow different coding rules. For example:
Odd Positions→+k \text{Odd Positions}\rightarrow +k
Even Positions→−k \text{Even Positions}\rightarrow -k
The letters should first be numbered from left to right.
1, 2, 3, 4,… 1,\ 2,\ 3,\ 4,\ldots
🔴 IMPORTANT Do not apply one common rule to all letters unless the question supports it.
................
🟢 13. ODD AND EVEN POSITION CODING In some problems, odd-position letters and even-position letters are treated differently. For example:
Odd Position→+1 \text{Odd Position}\rightarrow +1
Even Position→−1 \text{Even Position}\rightarrow -1
The first, third, fifth and subsequent odd positions follow one rule. The second, fourth, sixth and subsequent even positions follow another rule.
................
🟢 14. NUMBER CODING In number coding, letters or words are represented using numbers. The most common method is alphabet position coding.
A=1,B=2,…,Z=26 A=1,\quad B=2,\quad \ldots,\quad Z=26
The numbers may then be: Added Subtracted Multiplied or used according to another rule given in the question.
................
🟡 KEY POINT Do not assume that numbers always represent alphabet positions. Check the pattern first.
................
🟢 15. SENTENCE CODING In sentence coding, complete words or sentences are represented by codes. The codes may consist of: Numbers Letters Symbols Other words Two or more coded statements are usually provided to identify the code of a particular word.
................
🟡 KEY POINT Compare the common words and common codes in the given statements.
................
🟢 16. COMMON WORD METHOD When two coded statements have one common word, the corresponding common code can often be identified. For example:
red blue green→ka la ma \text{red blue green} \rightarrow ka\ la\ ma
blue yellow→la pa \text{blue yellow} \rightarrow la\ pa
The common word is:
blue \text{blue}
The common code is:
la la
Therefore:
blue→la \text{blue}\rightarrow la
🟢 17. SUBSTITUTION CODING In substitution coding, one word, letter, number or object is represented by another word, letter, number or symbol. The relationship is determined from the conditions or examples given in the question. 🟡 KEY POINT Use only the information given in the question. Do not use outside assumptions. 🟢 18. ALPHABET WRAP-AROUND When a forward shift goes beyond Z, the counting continues from A. For example:
Z+1=A Z+1=A
Z+2=B Z+2=B
Y+3=B Y+3=B
Similarly, when a backward shift goes before A, the counting continues from Z.
A−1=Z A-1=Z
A−2=Y A-2=Y
B−3=Y B-3=Y
🔴 IMPORTANT Always consider the alphabet as circular when the question involves wrap-around coding.
................
🟢 19. MULTIPLE-STEP CODING Some questions use more than one operation.
................
For example:
Step 1: Shift letters \text{Step 1: Shift letters}
Step 2: Reverse the word \text{Step 2: Reverse the word}
Or:
Step 1: Reverse the word \text{Step 1: Reverse the word}
Step 2: Shift letters \text{Step 2: Shift letters}
🟡 KEY POINT Perform the operations in exactly the order given in the question.
................
🟢 20. HOW TO IDENTIFY THE CODING RULE Step 1: Compare the original word with the coded word. Step 2: Write the alphabet positions if necessary. Step 3: Check forward shifts. Step 4: Check backward shifts. Step 5: Check reverse alphabet relationships. Step 6: Check whether letters have been rearranged. Step 7: Check odd and even positions. Step 8: Check numerical operations. Step 9: For sentence coding, compare common words and common codes. Step 10: Verify the rule using all the given information.
................
🔴 IMPORTANT Never identify a coding rule using only one letter. The rule should explain the complete given example.
................
🟢 21. IMPORTANT FORMULAS FOR REVISION Alphabet position:
A=1,B=2,…,Z=26 A=1,\quad B=2,\quad \ldots,\quad Z=26
Reverse alphabet position:
Reverse Position=27−Alphabet Position \text{Reverse Position} = 27-\text{Alphabet Position}
Forward shift:
Coded Position=Original Position+k \text{Coded Position} = \text{Original Position}+k
Backward shift:
Coded Position=Original Position−k \text{Coded Position} = \text{Original Position}-k
Decoding a forward shift:
Original Position=Coded Position−k \text{Original Position} = \text{Coded Position}-k
Decoding a backward shift:
Original Position=Coded Position+k \text{Original Position} = \text{Coded Position}+k
Alphabet difference:
Difference=∣Position1−Position2∣ \text{Difference} = \left| \text{Position}_1-\text{Position}_2 \right|
Mirror alphabet:
Mirror Position=27−Original Position \text{Mirror Position} = 27-\text{Original Position}
Word value:
Word Value=∑Alphabet Positions \text{Word Value} = \sum \text{Alphabet Positions}
🟡 KEY POINTS Remember the alphabet positions. Check forward and backward shifts. Check reverse alphabet coding. Check whether letters are rearranged. Check odd and even positions. Check numerical patterns. For sentence coding, compare common words and common codes. For decoding, reverse the coding operation. Always verify the identified pattern before applying it.

Example

🔵 CODING AND DECODING — SOLVED EXAMPLES 🟢 EXAMPLE 1: LETTER SHIFT CODING QUESTION: If each letter of a word is shifted 2 positions forward in the alphabet, how will CAT be coded? SOLUTION:
C→E C\rightarrow E
A→C A\rightarrow C
T→V T\rightarrow V
Therefore:
CAT→ECV CAT\rightarrow ECV
🔵 ANSWER:
ECV ECV
🟢 EXAMPLE 2: BACKWARD LETTER SHIFT QUESTION: If each letter of a word is shifted 2 positions backward in the alphabet, how will DOG be coded? SOLUTION:
D→B D\rightarrow B
O→M O\rightarrow M
G→E G\rightarrow E
Therefore:
DOG→BME DOG\rightarrow BME
🔵 ANSWER:
BME BME
🟢 EXAMPLE 3: FINDING THE CODING RULE QUESTION: If CAT is coded as DBU, how will DOG be coded using the same rule? SOLUTION: Compare the letters:
C→D C\rightarrow D
A→B A\rightarrow B
T→U T\rightarrow U
Each letter is shifted 1 position forward. Therefore:
D→E D\rightarrow E
O→P O\rightarrow P
G→H G\rightarrow H
Hence:
DOG→EPH DOG\rightarrow EPH
🔵 ANSWER:
EPH EPH
🟢 EXAMPLE 4: ALPHABET POSITION CODING QUESTION: If each letter is represented by its alphabet position, write the code for CAT. SOLUTION:
C=3 C=3
A=1 A=1
T=20 T=20
Therefore:
CAT→3, 1, 20 CAT\rightarrow 3,\ 1,\ 20
🔵 ANSWER:
3, 1, 20 3,\ 1,\ 20
🟢 EXAMPLE 5: WORD VALUE QUESTION: If the value of a word is the sum of the alphabet positions of its letters, find the value of CAT. SOLUTION:
C=3 C=3
A=1 A=1
T=20 T=20
Therefore:
CAT=3+1+20 \text{CAT}=3+1+20
=24 =24
🔵 ANSWER:
24 24
🟢 EXAMPLE 6: REVERSE ALPHABET CODING QUESTION: If A is coded as Z, B as Y, C as X and so on, how will DOG be coded? SOLUTION:
D→W D\rightarrow W
O→L O\rightarrow L
G→T G\rightarrow T
Therefore:
DOG→WLT DOG\rightarrow WLT
🔵 ANSWER:
WLT WLT
🟢 EXAMPLE 7: REVERSE ALPHABET POSITION QUESTION: Find the reverse alphabet positions of B, F and T. SOLUTION:
Reverse Position=27−Alphabet Position \text{Reverse Position} = 27-\text{Alphabet Position}
For B:
27−2=25 27-2=25
For F:
27−6=21 27-6=21
For T:
27−20=7 27-20=7
🔵 ANSWER:
25, 21, 7 25,\ 21,\ 7
🟢 EXAMPLE 8: DECODING A FORWARD SHIFT QUESTION: A word is coded by shifting every letter 3 positions forward. If the coded word is KHOOR, find the original word. SOLUTION: For decoding, shift every letter 3 positions backward.
K→H K\rightarrow H
H→E H\rightarrow E
O→L O\rightarrow L
O→L O\rightarrow L
R→O R\rightarrow O
Therefore:
KHOOR→HELLO KHOOR\rightarrow HELLO
🔵 ANSWER:
HELLO HELLO
🟢 EXAMPLE 9: ALPHABET WRAP-AROUND QUESTION: If every letter is shifted 3 positions forward, how will XYZ be coded? SOLUTION: When the shift passes Z, continue again from A.
X→A X\rightarrow A
Y→B Y\rightarrow B
Z→C Z\rightarrow C
Therefore:
XYZ→ABC XYZ\rightarrow ABC
🔵 ANSWER:
ABC ABC
🟢 EXAMPLE 10: BACKWARD WRAP-AROUND QUESTION: If every letter is shifted 2 positions backward, how will ABZ be coded? SOLUTION: For A:
A→Y A\rightarrow Y
For B:
B→Z B\rightarrow Z
For Z:
Z→X Z\rightarrow X
Therefore:
ABZ→YZX ABZ\rightarrow YZX
🔵 ANSWER:
YZX YZX
🟢 EXAMPLE 11: REARRANGEMENT CODING QUESTION: If the letters of a word are written in reverse order, how will TABLE be coded? SOLUTION: Reverse the order of the letters:
TABLE→ELBAT TABLE\rightarrow ELBAT
🔵 ANSWER:
ELBAT ELBAT
🟢 EXAMPLE 12: ALPHABET DIFFERENCE QUESTION: Find the difference between the alphabet positions of H and C. SOLUTION:
H=8 H=8
C=3 C=3
Therefore:
∣8−3∣=5 |8-3|=5
🔵 ANSWER:
5 5
🟢 EXAMPLE 13: SENTENCE CODING QUESTION: In a certain code, "red blue green" is written as "ka la ma" and "blue yellow" is written as "la pa". What is the code for blue? SOLUTION: The common word in both statements is:
blue \text{blue}
The common code is:
la la
Therefore:
blue→la \text{blue}\rightarrow la
🔵 ANSWER:
la la
🟢 EXAMPLE 14: SENTENCE CODING QUESTION: "book pen paper" is coded as "ka ta ma" and "book paper" is coded as "ka ma". What is the code for pen? SOLUTION: The common words are:
book, paper \text{book,\ paper}
Their common codes are:
ka, ma ka,\ ma
The remaining word is:
pen \text{pen}
The remaining code is:
ta ta
Therefore:
pen→ta \text{pen}\rightarrow ta
🔵 ANSWER:
ta ta
🟢 EXAMPLE 15: ODD AND EVEN POSITION CODING QUESTION: In a code, letters in odd positions are shifted 1 position forward and letters in even positions are shifted 1 position backward. Find the code for ABCD. SOLUTION: Position 1:
A→B A\rightarrow B
Position 2:
B→A B\rightarrow A
Position 3:
C→D C\rightarrow D
Position 4:
D→C D\rightarrow C
Therefore:
ABCD→BADC ABCD\rightarrow BADC
🔵 ANSWER:
BADC BADC
🟢 EXAMPLE 16: MIXED POSITION CODING QUESTION: In a code, the first and third letters are shifted 2 positions forward, while the second and fourth letters are shifted 1 position backward. Find the code for ABCD. SOLUTION: First letter:
A→C A\rightarrow C
Second letter:
B→A B\rightarrow A
Third letter:
C→E C\rightarrow E
Fourth letter:
D→C D\rightarrow C
Therefore:
ABCD→CAEC ABCD\rightarrow CAEC
🔵 ANSWER:
CAEC CAEC
🟢 EXAMPLE 17: FINDING A CODE USING COMMON WORDS QUESTION: In a certain language, "good boy" is coded as "ra ti" and "good girl" is coded as "ra mo". What is the code for boy? SOLUTION: The common word is:
good \text{good}
The common code is:
ra ra
The remaining word in the first statement is:
boy \text{boy}
The remaining code is:
ti ti
Therefore:
boy→ti \text{boy}\rightarrow ti
🔵 ANSWER:
ti ti
🟢 EXAMPLE 18: DECODING REVERSE ALPHABET QUESTION: If a word is coded using the reverse alphabet, decode WLT. SOLUTION: Using reverse alphabet coding:
W→D W\rightarrow D
L→O L\rightarrow O
T→G T\rightarrow G
Therefore:
WLT→DOG WLT\rightarrow DOG
🔵 ANSWER:
DOG DOG
🟢 EXAMPLE 19: FORWARD SHIFT CODING QUESTION: If A is coded as D, B as E, C as F and so on, how will HOME be coded? SOLUTION: The shift is:
+3 +3
Therefore:
H→K H\rightarrow K
O→R O\rightarrow R
M→P M\rightarrow P
E→H E\rightarrow H
Hence:
HOME→KRPH HOME\rightarrow KRPH
🔵 ANSWER:
KRPH KRPH
🟢 EXAMPLE 20: MIRROR ALPHABET QUESTION: Find the mirror letters of G, M and R. SOLUTION: Using:
Mirror Position=27−Original Position \text{Mirror Position} = 27-\text{Original Position}
For G:
27−7=20 27-7=20
Therefore:
G→T G\rightarrow T
For M:
27−13=14 27-13=14
Therefore:
M→N M\rightarrow N
For R:
27−18=9 27-18=9
Therefore:
R→I R\rightarrow I
🔵 ANSWER:
T, N, I T,\ N,\ I
🟢 EXAMPLE 21: DECODING A BACKWARD SHIFT QUESTION: A word is coded by shifting every letter 2 positions backward. If the coded word is ZMJJM, find the original word. SOLUTION: For decoding, shift every letter 2 positions forward.
Z→B Z\rightarrow B
M→O M\rightarrow O
J→L J\rightarrow L
J→L J\rightarrow L
M→O M\rightarrow O
Therefore:
ZMJJM→BOLLO ZMJJM\rightarrow BOLLO
🔵 ANSWER:
BOLLO BOLLO
🟢 EXAMPLE 22: WORD VALUE QUESTION: If the value of a word is the sum of its alphabet positions, find the value of DOG. SOLUTION:
D=4 D=4
O=15 O=15
G=7 G=7
Therefore:
DOG=4+15+7 \text{DOG}=4+15+7
=26 =26
🔵 ANSWER:
26 26
🟢 EXAMPLE 23: NUMBER CODING QUESTION: If the code of a word is obtained by adding the alphabet positions of its first and last letters, find the code for GAME. SOLUTION: First letter:
G=7 G=7
Last letter:
E=5 E=5
Therefore:
Code=7+5 \text{Code}=7+5
=12 =12
🔵 ANSWER:
12 12
🟢 EXAMPLE 24: TWO-STEP CODING QUESTION: Each letter of a word is first shifted 1 position forward and then the letters are written in reverse order. Find the code for CAT. SOLUTION: First shift each letter forward by 1:
C→D C\rightarrow D
A→B A\rightarrow B
T→U T\rightarrow U
Therefore:
CAT→DBU CAT\rightarrow DBU
Now reverse the order:
DBU→UBD DBU\rightarrow UBD
🔵 ANSWER:
UBD UBD
🟢 EXAMPLE 25: IDENTIFYING THE PATTERN QUESTION: If PEN is coded as QFO, how will BOOK be coded using the same rule? SOLUTION: Compare the given coding:
P→Q P\rightarrow Q
E→F E\rightarrow F
N→O N\rightarrow O
Each letter is shifted 1 position forward. Therefore:
B→C B\rightarrow C
O→P O\rightarrow P
O→P O\rightarrow P
K→L K\rightarrow L
Hence:
BOOK→CPPL BOOK\rightarrow CPPL
🔵 ANSWER:
CPPL CPPL
🟢 EXAMPLE 26: REVERSE POSITION CODING QUESTION: If each letter is replaced by its reverse alphabet letter, how will CODE be coded? SOLUTION:
C→X C\rightarrow X
O→L O\rightarrow L
D→W D\rightarrow W
E→V E\rightarrow V
Therefore:
CODE→XLWV CODE\rightarrow XLWV
🔵 ANSWER:
XLWV XLWV
🟢 EXAMPLE 27: ALPHABET POSITION SUM QUESTION: Find the sum of the alphabet positions of the letters in the word BOOK. SOLUTION:
B=2 B=2
O=15 O=15
O=15 O=15
K=11 K=11
Therefore:
BOOK=2+15+15+11 \text{BOOK}=2+15+15+11
=43 =43
🔵 ANSWER:
43 43
🟢 EXAMPLE 28: REVERSE WORD AND SHIFT QUESTION: A word is first reversed and then each letter is shifted 1 position forward. Find the code for CAT. SOLUTION: First reverse the word:
CAT→TAC CAT\rightarrow TAC
Now shift each letter 1 position forward:
T→U T\rightarrow U
A→B A\rightarrow B
C→D C\rightarrow D
Therefore:
TAC→UBD TAC\rightarrow UBD
🔵 ANSWER:
UBD UBD
🟢 EXAMPLE 29: DECODING A NUMBER CODE QUESTION: If A = 1, B = 2, C = 3 and so on, decode the number sequence 3, 1, 20. SOLUTION:
3→C 3\rightarrow C
1→A 1\rightarrow A
20→T 20\rightarrow T
Therefore:
3, 1, 20→CAT 3,\ 1,\ 20\rightarrow CAT
🔵 ANSWER:
CAT CAT
🟢 EXAMPLE 30: MIXED CODING QUESTION: If each letter is shifted 2 positions forward and then the word is reversed, find the code for DOG. SOLUTION: First shift each letter 2 positions forward:
D→F D\rightarrow F
O→Q O\rightarrow Q
G→I G\rightarrow I
Therefore:
DOG→FQI DOG\rightarrow FQI
Now reverse the word:
FQI→IQF FQI\rightarrow IQF
🔵 ANSWER:
IQF IQF