Coding and Decoding
TABLE OF CONTENTS:
.
1 I ntroduction
2. Letter Coding
3. Number Coding
4. Substitution Coding
5. Basic Aptitude Questions
6. Practice Questions
Introduction:
oding and decoding are fundamental concepts in logical reasoning, where the goal is to
C
transform a message using a specific rule (coding) and then revert it back to its original form (decoding).
These concepts are not just limited to cryptography but are widely used in various reasoning tests,
puzzles, and real-world applications like data security and information processing.
I n the context of logical reasoning, coding and decoding challenge your ability to recognize
patterns, identify sequences, and apply logical rules systematically. They test your analytical thinking,
attention to detail, and problem-solving skills.
nderstanding how to decode a message requires identifying the underlying rule or pattern used to
U
encode it. These patterns can be based on shifting letters, substituting numbers for letters, or replacing
entire words with coded equivalents. The ability to swiftly and accurately decode these messages
demonstrates a strong grasp of logical thinking and is an invaluable skill in both academic and
professional settings. Coding and Decoding primarily cover three topics, which are:
❖
L etter Coding
❖ Number or Symbol Coding
❖ Substitution Coding
Letter Coding:
oncept: Letter coding is when letters in a word are replaced by other letters following a specific pattern
C
to form its code. The pattern can involve various operations such as shifting the letters by a certain
number of positions, adding or subtracting a constant value, or following a sequence of operations.
A B C D E F G H I J K L M
Z Y X W V U T S R Q P O N
xample:
E
Situation: Sam and Alex are working on a school project about ancient Rome, where they come across a
Caesar Cipher. Sam wants to send a coded message to Alex saying "HELLO," but using a shift of 3
letters.
Encoding Process:
H
○ → K (H+3 positions)
○ E → H (E+3 positions)
L → O (L+3 positions)
○
○ L → O(L+3 positions)
○ O → R (O+3 positions)
Coded Message: "KHOOR"
●
● Decoding Process: To decode, Alex shifts each letter in "KHOOR" back by 3 positions:
○ K → H
○ H → E
○ O → L
○ O → L
○ R → O
● Decoded Message: "HELLO"
etaphor: Imagine you have a circular alphabet wheel where rotating it by a certain number of notches
M
changes each letter to another. The sender and receiver need to know how many notches were turned to
understand the message.
Number or Symbol Coding:
oncept: In number or symbol coding, each letter of the alphabet is assigned a unique number or symbol.
C
This type of code can be more complex, as it often requires a key to decode.
xample: Situation: Lily receives a coded email from her friend, Max. The email reads "7-5-10-9-11"
E
with the clue that each symbol represents a letter in their favorite number sequence (2, 3, 5, 7, 11, ...).
● Step-by-Step Decoding:
○ First, Lily identifies the sequence of prime numbers.
○ Then, she matches each number to its corresponding letter in the alphabet
(𝐴 = 1, 𝐵 = 2, ... 𝑍 = 26).
○ 7 → G (7th letter)
○ 5 → E
○ 10 → J
○ 9 → I
○ 11 → K
● Decoded Message: "GEJIK"
etaphor: Think of this like a secret menu at a restaurant where you need to know the code (or special
M
ingredients) to get the dish you want.
ubstitution Coding
S
Concept:
In substitution coding, entire words or phrases are replaced with others according to a specific key. To
decode, you must substitute the coded words back into their original form.
xample:
E
Situation: Maria and Raj are part of a mystery club where they send clues using substitution codes. Maria
sends Raj the message, "The owl is in the nest." They both know from their key that:
"owl" = "key"
"nest" = "box"
Step-by-Step Decoding:
Raj substitutes "owl" with "key" and "nest" with "box," so the decoded message is, "The key is in the
box."
Metaphor: Imagine you're solving a puzzle where each piece (word) fits only in one specific spot, and
once all pieces are in place, the full picture (message) is revealed.
Examples with Hypothetical Situations
etter Coding:
L
Situation: Emma receives a secret note that says "SPY" coded as "TQZ." To decode the message, she
shifts each letter back by 1: T → S, Q → P, Z → Y, revealing "SPY."
umber Coding:
N
Situation: Mark gets a message "6-9-18-19-20" and knows that each number corresponds to a letter’s
position in the alphabet. He decodes it to "FIRST."
ubstitution Coding:
S
Situation: John and Mia have a code where "cake" is replaced with "dessert," and "apple" with "fruit."
John sends, "I brought dessert and fruit," which Mia decodes as "I brought cake and apple."
Basic Aptitude Questions:
1 ) If AMAZON is coded as ZNZALM, then FLIPKART will be coded as? [CUET UG 2023 - General
Test - June 7 (Shift 3) - Question 17]
A) UORKPZIG B) OPKSZIGT C) TKESJRIO D) WQDVIMXA
Answer: (A) UORKPZIG
This involves swapping alphabets to their opposites.
A B C D E F G H I J K L M
Z Y X W V U T S R Q P O N
Steps:
Switch alphabets for their opposites Switch alphabets for their opposites
→Z
A →U
F
M→N L→O
A→Z I→R
Z→A P→K
O→L K→P
N→M A→Z
R→I
T→G
Ans:ZNZALM Ans:UORKPZIG
witch alphabets for their opposites.
S
A→Z
M→N
A→Z
Z→A
O→L
N→M
Solution:
For "FLIPKART":
Apply steps.
UORKPZIG
2 ) If BE QUICK is coded as ZC OSGAI, then the code of the last letter of the third word in the sentence I
LOVE MY COUNTRY is
A) A B) T C) U D) W
Answer:(D) W
The rule here is to shift each letter by -2 (i.e., move 2 positions backward in the alphabet).
B→Z(B-2 positions)
E→C(E-2 positions)
Q→O(Q-2 positions)
U→S(U-2 positions)
I→G(I-2 positions)
C→A(C-2 positions)
K→I(K-2 positions)
For I LOVE MYCOUNTRY
Y→W(Y-2 positions)
3 ) In a certain code language, THANKS is written as SKNTHA. How is STUPID written in that code
language?
A) DIPUTS B) DISPUT C) DIPUST D) None of the above
Answer: (D) None of the above
First 3 letters: The first three letters are moved to the end
Last 3 letters: The last three letters are moved to the front in reverse order.
4 ) If“BHARAT”stands for'B-8-A-18-A-20and"ENGLAND"stands forE-14-G-12-A-14-Dthen how
will you code the SRILANKA ?:
A) S-18-I-12-A-14-K-1 B) R-18-I-14-A-14-K-2
C) S-14-I-12-B-14-K-2 D) R-18-I-12-B-14-K-1
Answer: (A) S-18-I-12-A-14-K-1
The rule is here alternate letters only coded as unique numbers given to letters from above table .
→B
B →E
E
H→8th letter from alphabet order N→14th letter from alphabet order
A→A G→G
R→18th letter from alphabet order L→12th letter from alphabet order
A→A A→A
T→20th letter from alphabet order N→14th letter from alphabet order
D→D
For “SRILANKA”
5) If E = 5, PEN = 35 then PAGE = ?
A) 27 B) 29 C) 28 D) 36
Answer:(B) 29
Calculate the sum of the positions of the letters in the word.
E = 5
PEN = 16 + 5 + 14 = 35
P = 16, A = 1, G = 7, E = 5
PAGE = 16 + 1 + 7 + 5 = 29
Solution: The value for "PAGE" is 29.
6) If NIGHT can be coded as 29, 19, 15, 17, 41, then 'COLD' will be coded as:
A) 7, 25, 31, 9 B) 7, 27, 31, 11 C) 7, 9, 31, 25, D) 7,31, 25, 9
Answer:(D) 7, 31, 25, 9.
Each letter's position in the alphabet is multiplied by 2, then 1 is added to the result.
1. N is the 14th letter: Coded as29 = (14×2) + 1 = 28 + 1 = 29
2. I is the 9th letter:Coded as19 = (9×2) + 1 = 18 + 1 = 19
3. G is the 7th letter: Coded as15 = (7×2) + 1 = 14 + 1 = 15
4. H is the 8th letter: Coded as17 = (8×2) + 1 = 16 + 1 = 17
5. T is the 20th letter: Coded as41 = (20×2) + 1 = 40 + 1 = 41
Apply this rule to the word "COLD":
1. C is the 3rd letter:(3×2) + 1 = 6 + 1 = 7
2. O is the 15th letter:(15×2) + 1 = 30 + 1 = 31
3. L is the 12th letter:(12×2) + 1 = 24 + 1 = 25
4. D is the 4th letter:(4×2) + 1 = 8 + 1 = 9
So, "COLD" is coded as 7, 31, 25, 9
7 ) If Paper is called Wood, Wood is called Straw, Straw is called Grass, Grass is called Rubber and
Rubber is called Cloth, then what is furniture made of?
A) Straw B) Paper C) Grass D) Rubber
Answer : (A) Straw
Follow the substitution chain.
Furniture is made of "Wood," which is called "Straw."
8 ) If 'cook' is called 'butler', 'butler' is called 'manager', 'manager' is called 'teacher', 'teacher' is called
'clerk' and 'clerk' is called 'principal', who will teach in a class?
A) Teacher B) Butler C) Clerk D) Manager
Answer:(C) Clerk
Follow the substitution chain.
“Teachers" will teach in a class which is called “Clerk”
9 ) The data given below represents a coded language for different colours, analyse it and answer the
question:
“black orange yellow purple blue” is written as “set jet let get bet”.
“grey green red purple” is written as “get pet wet vet”.
“purple blue red silver” is written as “vet set get tet”.
“grey orange pink” is written as ” bet ret pet”.
Based on the information given above, what is the code for pink?
A) Ret B) set C) wet D) get
Answer: (A) ret
"grey" appears in the second and fourth sentences. The common word across these codes is "pet." So,
"grey" is likely "pet."
"orange" appears in the first and fourth sentences. The common word across these codes is "bet." So,
"orange" is likely "bet."
In the fourth sentence, where “grey orange pink” is coded as “bet ret pet,” by identifying that “grey” is
“pet” and “orange” is “bet,” the remaining code “ret” corresponds to “pink.”
Given below are codes for a few alphabets, based on the coding answer the following questions:
10) How will the word ‘Pens’ be written in coded language?
A) $%&* B) ^+%@ C) @#$% D) +@#%
Explanation:
● P corresponds to ^
● E corresponds to +
● N corresponds to %
● S corresponds to @
So, the code for "Pens" is ^+%@ .
Answer:(B) ^+%@
Practice Questions:
1 ) In a certain code language, "MATRIX" is coded as "OCSTGA", and "VECTOR" is coded as
"XGBVMT". How would "SYSTEM" be coded in the same language?
A) UARVCO B) UYTGPN C) VUVFMP D) TYUGPO
2 ) If "COMPUTER" is coded as "EQOSWYGT", and "HARDWARE" is coded as "JCTFYCTG", how is
"SOFTWARE" coded in this language?
A) UQHVYCTG B) QSHUZFTI C) UPGTXFTF D) URHYXFUG
3) If "CAT" is coded as "DBU", and "DOG" is coded as "EPH", how is "BIRD" coded in this language?
A) CJTE B) CJSE C) AKRE D) DKRE
4) "BEAR" is coded as "2-5-1-18." What is the code for "LION"?
A) 12-14-6-17 B) 12-3-6-15 C) 12-9-15-14 D) 12-10-16-17
5) "PEAR" is coded as "16-5-1-18" and "GRAPE" as "7-18-1-16-5." What is the code for "PLUM"?
A) 16-12-21-13 B) 16-13-20-14 C) 16-17-19-3 D) 16-7-14-15
6) If in a certain code, BAT=23 and CAT=24, then what will BALL be in this code?
A) 27 B) 32 C) 28 D) 120
7 ) If sky is water, water is yellow, yellow is blue, blue is fish, fish is crow, crow is bird and bird is sky in a
coding language, then where does the crow live?
A) In sky B) In water C) In yellow D) In bird
8 ) If the meaning of 253 is “Book are old”, the meaning of 546 is “Man is old” and the meaning of 378 is
“ Buy good book” in a coding language, what is the symbol of “are” in this language?
A) 5 B) 4 C) 2 D) None of these
I nstructions for questions (9):In a coding languagethe mathematical symbol of + is used for A, — for
E, x for I and numerical positions of other alphabets of is used, i.e., B=2, C=3, D=4, F=6, then answer the
following questions completing all mathematical operations:
9) What will be the value of TEPAR in this coding language?
A) 36 B) 18 C) 28 D) 22
10) If WING is written as *₤?= and THEN as @$©? then how will NITE be written?
A) ?*@© B) ?₤$© C) ?₤@© D) ?₤@$