Code360 powered by Coding Ninjas X Code360 powered by Coding Ninjas X
Table of contents
Claude Shannon-father of Information theory,
Information Theory by Claude Shannon
Shannon’s Cipher
Functions in Shannon’s Cipher
Perfect security and one-time pads
Frequently asked questions
Who coined the word ‘bit’?
Who invented the logic gates?
Why did Claude Shannon choose chess as a measure to test computers?
Why was the Shannon Cipher considered unbreakable?
What is a one-time pad?
Last Updated: Mar 27, 2024

What is the theory introduced by Claude Shannon?

Master Python: Predicting weather forecasts
Ashwin Goyal
Product Manager @


Hello Ninjas! this blog will explain the information theory introduced by Clause Shannon, one of the greatest minds of the 20th century.

The information theory aims to transfer information through noise-ridden mediums efficiently and protected. 

Claude Shannon introduced a unique code that was unbreakable and could only be decrypted by a one-time key that was shared before the transfer of the message.

Shannon theory

Claude Shannon-father of Information theory,

Claude Shannon

Claude Shannon wasn’t a renowned personality or a noble laureate. Yet, his research work in information theory is considered the most groundbreaking and astounding.

Claude Shannon was the first person to use the word ‘bit’ for ‘binary unit’ and laid the groundwork for most communication in modern technology.

As astonishing as it may sound, Claude Shannon was the one who founded the logic gates while doing his Master's at MIT. Shannon worked at a time when there were only a handful of computers majorly designed to do mathematical calculations. 

Shannon worked on making a computer that could compete with players in the game of Chess. As chess requires critical thinking, it would be an excellent test to challenge the intelligence of computers. 

Shannon majorly worked on designing relay signals and electronic filters for communication. He wanted to advance the communication between computers as if they were humans. 

Claude Shannon laid the foundation of Machine Learning as designed for the future. His work has and continues to inspire multiple careers in this field.

Now let’s learn about the information theory introduced by Claude Shannon.

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

Information Theory by Claude Shannon

The information theory aims to calculate the parameters required for smooth communication and error-free transfer of information through a noise-ridden medium.

Information theory

The information theory proposed by Claude Shannon has the following elements.

  • The message source is the information source that relays the information. It is the initial source of the message. 
  • The encoder is the entity that converts and encrypts the message that can be transferred without being interpreted or altered by noise. Typically, in a telephone line, the message is converted into signals and waves that are transferred through the telephone lines.
  • The channel is the medium through which the information gets relayed. A channel has noise that can alter the intended message. ‘
  • The decoder is the entity that decrypts the transferred messages into everyday speech, which the receiver can understand.
  • The message receiver is the person or animal that receives the decrypted message.

Shannon’s Cipher

Claude Shannon invented the Shannon Cipher.  

A Shannon Cipher is an unbreakable code that can only be decrypted using a secret key given to the receiver at the time of message or information transfer.

The Shannon Cipher was perhaps the first genuinely unbreakable code that could be transmitted without being cracked or stolen. The only way to crack the code was to steal the key at the time of transfer from the receiver. This problem was later solved using modern electromagnetic signals for transfer. Shannon’s paper was also the first to use the term bit for the binary unit.

Functions in Shannon’s Cipher

A Shannon’s Cipher consists of an encryption and a decryption function. 

The functions had the key of the same binary length, which is always less than the minimum number of bits per second used to represent the information. 

The Encryption function (E) is mathematically represented as 


Here, c is the ciphertext that is the encrypted message produced by the message(m) and key (k).


The decryption function(D) is mathematically represented as 


Here, m is the decoded message and is the same as m in the above equation. It is decoded from the ciphertext(c) using the key(k).

shannon cipher

Perfect security and one-time pads


The key to decrypting Shannon’s Cipher is the one-time-pad (OTP).  

Even today,  a one-time-pad (OTP) encrypts essential data transfers, such as money transfers, customer verification, and whatnot. 

Modern-day technology is heavily dependent on OTP/s for sensitive data transfer.

The encrypted message can only be decrypted using the one-time-pad (OTP), which is only generated at the transfer time and cannot be regenerated.

Henceforth, the initial message cannot be understood or cracked without the initial key generated before transfer. This provides Perfect Secrecy to the information.

Frequently asked questions

Who coined the word ‘bit’?

The research paper by Claude Shannon was the first to use the term ‘bit’ for ‘binary unit.’

Who invented the logic gates?

Claude Shannon invented logic gates while doing his masters at MIT.

Why did Claude Shannon choose chess as a measure to test computers?

Claude Shannon believed that Chess required ‘critical thinking and could be the best test for the computers of that age.

Why was the Shannon Cipher considered unbreakable?

The Shannon Cipher could only be interpreted using a key generated at the time of encryption. Hence, it was practically impossible to break his code

What is a one-time pad?

One-time-pad(OTP) is a randomly generated key that is essential to decrypt the message. It is generated at the time of encryption and cannot be regenerated.


We hope this blog successfully helped you understand the information theory by Claude Shannon.

If you found this blog interesting and insightful, refer to similar blogs:

Introduction to Elementary Probability

Refer to the Basics of C++ with Data StructureDBMS, and Operating System by Coding Ninjas, and keep practising on our platform Coding Ninjas Studio. You can check out the mock test series on code studio.

You can also refer to our Guided Path on Coding Ninjas Studio to upskill yourself in domains like Data Structures and AlgorithmsCompetitive ProgrammingAptitude, and many more! Refer to the interview bundle if you want to prepare for placement interviews. Check out interview experiences to understand various company's interview questions.

Give your career an edge over others by considering our premium courses!

Happy Learning!

Thankyou image



Next article
Introduction to Elementary probability theory
Live masterclass