Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Coding Decoding
2.1.
Letter Coding
2.2.
Number Coding
2.3.
Symbol Coding
2.4.
Decipher Coding
3.
Important Problems
4.
Frequently Asked Questions
4.1.
What is the difference between coding and decoding?
4.2.
What are the main kinds of coding questions?
4.3.
What is substitution coding?
4.4.
Are the exam questions on coding and decoding easy?
4.5.
How many kinds of coding-decoding questions are there?
5.
Conclusion
Last Updated: Mar 27, 2024

Coding-Decoding

Author Reet Maggo
2 upvotes
Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

Introduction

One of the most important sections to learn is “coding-decoding”. We need to understand this to answer aptitude questions in placement and other entrance examinations.

Coding-Decoding Intro

It is an essential part of logical reasoning that requires in-depth logical analysis. Let us dive deep into the topic.

Coding Decoding

Coding-decoding in aptitude exams is a significant part of logical reasoning. This can be either for words, numbers or patterns that need to be encrypted or decrypted.

  • The coding process encrypts words or numbers in the code or pattern based on a specific set of rules.
     
  • The decoding process decrypts patterns into the original words or numbers from the given codes.
     

Let us look at different types of coding-decoding processes.

Letter Coding

Such questions have alphabets of a word replaced by other alphabets according to some particular rule to form code or follow some specific pattern.

Example: In a specific code, HELLO is written as IGOPT and COST as LTUX. What would SCHOOL be written as using the same code?

Number Coding

Such questions have alphabets of a word replaced by numbers following some specific pattern.

Example: In a certain code, HELLO is written as 32991 and THRIFT as 534865. What would FIRE be written as using the same code?

Symbol Coding

Such questions have alphabets of a word replaced by symbols following some specific pattern.

Example: In a certain code, HELLO is written as &#%%* and THRIFT as @&!)(@.  What would FIRE be written as using the same code?

Decipher Coding

Such questions have words or phrases replaced by words or phrases following specific patterns or rules.

Example: In a certain code, if ‘lee iff nop’ means ‘what are you’, and ‘kim lee nop’ means ‘how are you’, what is the code for ‘how’?

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Important Problems

Q1.) Using certain rules, 16890 is written as TYUVG, and 5341 is written as ORST. How will 34651 be written in that code?

Answer: 34651 would be written as RSYOT using coding because the numbers are coded as alphabets like the following: 

3 -> R, 
4 -> S,
6 -> Y, 
5 -> O, and
1 -> T in given data.


Q2.) Coding the word DELHI using a particular pattern, the word is written as EFMIJ. How would PERSON be written in the same code?

Answer: Every alphabet of DELHI is increased by one, and the result of coding it is a word with the next letter of the respective alphabet. So, PERSON would be written as QFSTPO.

PERSON to QFSTPO

Q3.) Coding the word MOON using a particular pattern, the word is written as NQRR. How would FOREST be written in the same code?

Answer: FOREST would be written as GQUIXZ on coding. It is because the first alphabet in MOON is increased by 1, the second alphabet by 2, the third by 3 and so on.

M -> (+1) -> N
O -> (+2) -> P Q
O -> (+3) -> P Q R
N -> (+4) -> O P Q R

Here, MOON -> NQRR. 

FOREST to GQUIXZ

Q4.) In a certain language, BIRTHDAY is written as TRIBYADH. How is MOUNTAIN written in this code?

Answer: Let us try to decipher on BIRTHDAY being TRIBYADH. We can see that the word is divided into two parts. Then each part is shuffled as follows:

BIRT -> TRIB
HDAY -> YADH

BIRTHDAY to TRIBYADH

Similarly, the same pattern is followed for MOUNTAIN:

MOUNTAIN to NUOMNIAT

MOUNTAIN will be written as NUOMNIAT.


Q5.) In a certain code, NUMBER is written as NVOSFC. What would be MOBILE coded as?

Answer: Let us first understand how NUMBER became NVOSFC.

NUM -> MUN -> (incrementing by 1) -> NVO
BER -> REB -> (incrementing by 1) -> SFC

Similarly,

MOBILE to CPNFMJ

Hence, it can be written as CPNFMJ.


Q6.) In a certain code, NEWJERSEY is written as 124. What would NUMBER be written as on coding?

Answer: In NEWJERSEY, 14+5+23+10+5+18+19+5+25=124. 

Using a similar pattern while coding NUMBER, 14+21+13+2+5+18=73. So, the NUMBER would be 73.

NUMBER decoded to 73

Table of letters encoded to numbers(For reference):

Table of letters encoded to numbers

Q7.) In a certain code, STARE is written as 27. What would be the code for ACTIVE using the same pattern?

Answer: In STARE,

S=19 -> 1+9=10 (Note: If any letter encoded to a number is not a single-digit number, then add all the digits.)
T=20 -> 2+0=2
A=1
R=18 -> 1+8=9
E=5

Then, add up the values of each =  10+2+1+9+5 = 27

Therefore, ACTIVE would be 24.

Decode ACTIVE to 24

Q8.) If BREAD is coded as CQFZE in a certain language, then which word would be coded as TVJOF?

Answer: Every alphabet at odd places in the word is one step behind, and the alphabets at even places are one step ahead of the corresponding alphabet in the code.

       BREAD is coded as CQFZE

Decode TVJOF to SWIPE

Q9.) If 256 means “you are good”, 637 means “you are bad”, and 358 means “good and bad” in a certain code, then which number represents “and” in that code?

Options: 3, 10, 8, 4

Answer: The common digit in the first and third statements is 5, and the common word in both these statements is “good”. This implies that 5 means “good”.  

The common digit in the second and third statements is 3, and the common word is “bad”, meaning that 3 is for “bad”. Therefore, 8 means “and” in the third statement.


Q10.) In a certain code, if “lee iff nop” means “what are you”, and “kim lee nop” means “how are you”, then what is the code for “how”?

Answer: The common code in the first and second sentences is “lee” and “nop”, and the common words are “are” and “you”. So in the second sentence, the remaining code is “kim”, which is the code for “how”.

Frequently Asked Questions

What is the difference between coding and decoding?

Coding means encrypting words or numbers in a code, while decoding refers to decrypting the patterns into the original words or the original form of the code.

What are the main kinds of coding questions?

Coding-decoding questions usually have the following types: Letter coding, number coding, substitution coding and mixed coding.

What is substitution coding?

Substitution coding is the kind of coding where particular words are assigned to words or phrases. The given phrase could have a substituted name that needs to be decoded.

Are the exam questions on coding and decoding easy?

The questions on this topic are often asked for 4-6 marks and, despite seeming time-consuming, are easy to answer.

How many kinds of coding-decoding questions are there?

There can be many types of questions in this section, including number pattern coding, letter pattern coding, symbol coding, substitution coding and deciphering questions.

Conclusion

In this article, we covered the concepts of coding, decoding and their types. We also looked at some of the sample questions for practice.

If you would like to learn more similar to this topic, check out our related articles on aptitude preparation-

Refer to our guided paths on Coding Ninjas Studio to learn more about DSA, JavaScript, System Design, DBMS, Java, etc. Enroll in our courses and refer to the mock test and problems available. Take a look at the interview experiences and interview bundle for placement preparations. 

Happy Coding, Ninja!🥷✨

Previous article
Embedded Images
Next article
Mixture And Alligation
Live masterclass