SlideShare a Scribd company logo
1 of 21
DESCRIPTIONOF ITC MATLAB CODES
GROUP MEMBERS:
K BASAMMA-1DA21EC065
K GURUBASAVARAJ-1DA21EC066
KASHVI V-1DA21EC067
KAUSHIK REDDY S -1DA21EC068
KEERTHANA D – 1DA21EC069
KEERTHANA K – 1DA21EC070
KISHAN S P-1DA21EC72
KRISHNA B CHAVDA-1DA21EC073
KSHAMA R-1DA21EC074
LIKITH T S-1DA21EC075
HUFFMAN CODING
Huffman Code: is a way to encode information using
variable length string characters to represent the data
depending on how frequently they appear.
Huffman coding is a method of data compression which
works by looking at the data stream that makes up the file to
be compressed without losing any data. The data bytes that
occur most often are assigned a small code to represent
them. There are mainly two major parts in Huffman
Coding:
1. Build a Huffman Tree from input characters.
2. Traverse the Huffman Tree and assign codes to
characters.
In the Huffman tree an auxiliary
array is maintained. While
moving to the left ,we write 0 to
the array. While moving to the
right, we write 1 to the array. Next
we print the code in a top-bottom
approach.
Applications of Huffman Coding
1. They are used by conventional compression formats
like PKZIP, GZIP, etc.
2. They are used for transmitting fax and text.
3. Multimedia codes like JPEG, PNG, and MP3 use
Huffman encoding.
4. It is useful in cases where there is a series of frequently
occurring characters.
Algorithm of Huffman Coding
1. Start
2. Input the total number of possibilities
3. Arrange the messages in descending order of
probabilities.
4. Add the last two probabilities, and assign 0 and 1 bits to
them and sort out the total probabilities
5. If the addition is equal to the other probability, then put it
on the top
6. Repeat these steps until the addition is 1
7. To find a code for a particular symbol write the path of
the probability and its code ion a reverse approach
8. Find out its entropy, average code length and efficiency
9. Stop
PROGRAM 5a
Program 5b
HAMMING CODE
Hamming code is a set of error-correction codes that can
be used to detect and correct the errors that can occur
when the data is moved or stored from the sender to the
receiver. It encodes 4 bits of data into a 7 bit code word,
adding 3 parity bits for error detection and correction.
The parity bits are positioned at specific locations to
enable identification and correction of single bit errors.
Redundant bits:
Redundant bits are extra binary bits that are generated
and added to the information-carrying bits of data
transfer to ensure that no bits were lost during the data
transfer.
Parity bits:
A parity bit is a bit appended to a
data of binary bits to ensure that
the total number of 1’s in the
data is even or odd. Parity bits
are used for error detection.
Even parity bit: The number of 1’s are counted. If that
count is odd, the parity bit value is set to 1, making the total
count of occurrences of 1’s an even number. If the total
number of 1’s in a given set of bits is already even, the parity
bit’s value is 0.
Odd Parity bit: Here the number of 1’s are counted. If that
count is even, the parity bit value is set to 1, making the total
count of occurrences of 1’s an odd number. If the total
number of 1’s in a given set of bits is already odd, the parity
bit’s value is 0.
Features of Hamming Code
1. Error Detection and Correction
2. Redundancy
3. Efficiency
4. Widely Used
5. Single Error Correction
6. Limited Multiple Error Correction
Algorithm of Hamming code
1.Intialize the environment
2. Encode the data using Hamming (7,4) encoding
3. Simulate transmission errors by flipping bits in the
received data
4.Decode the received data using Hamming(7,4)
decoding
5.Display the original and the encoded data
6. Display the received data with the errors
7. Display the decoded data
8.End
MATLAB Program
Write a MATLAB program for encode binary data using a (7,4)
Hamming code and decode it.
data=[1 0 1 1;0 1 0 0;1 1 1 0;0 0 0 1];
Encoded_data=encode(data,7,4,'hamming/binary');
received_data=encoded_data;
received_data(1,3)=~received_data(1,3);
received_data(3,5)=~received_data(3,5);
decoded_data=decode(received_data,7,4,'hamming/binary');
disp('original data');
disp(data);
disp('encoded data');
disp(encoded_data);
disp('received_data');
disp(received_data);
disp('decoded data');
disp(decoded_data);

More Related Content

Similar to Digital Communication GRP1 (1).pptx

Paper id 24201469
Paper id 24201469Paper id 24201469
Paper id 24201469
IJRAT
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
Helan4
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
Sisir Ghosh
 

Similar to Digital Communication GRP1 (1).pptx (20)

Hamming code system
Hamming code systemHamming code system
Hamming code system
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...
 
crc_checksum.pdf
crc_checksum.pdfcrc_checksum.pdf
crc_checksum.pdf
 
Error detection & correctoin
Error detection    & correctoinError detection    & correctoin
Error detection & correctoin
 
Error detection correction (CRC)
Error detection correction  (CRC)Error detection correction  (CRC)
Error detection correction (CRC)
 
07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf
 
Error detection & correction codes
Error detection & correction codesError detection & correction codes
Error detection & correction codes
 
DCN Error Detection & Correction
DCN Error Detection & CorrectionDCN Error Detection & Correction
DCN Error Detection & Correction
 
Paper id 24201469
Paper id 24201469Paper id 24201469
Paper id 24201469
 
j001adcpresentation-2112170415 23.pdf
j001adcpresentation-2112170415      23.pdfj001adcpresentation-2112170415      23.pdf
j001adcpresentation-2112170415 23.pdf
 
Huffman Algorithm and its Application by Ekansh Agarwal
Huffman Algorithm and its Application by Ekansh AgarwalHuffman Algorithm and its Application by Ekansh Agarwal
Huffman Algorithm and its Application by Ekansh Agarwal
 
Unit 2 [autosaved]
Unit 2 [autosaved]Unit 2 [autosaved]
Unit 2 [autosaved]
 
Satellite error detection and correction presentation
Satellite error detection and correction presentationSatellite error detection and correction presentation
Satellite error detection and correction presentation
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf4_Datalink__Error_Detection_and Correction.pdf
4_Datalink__Error_Detection_and Correction.pdf
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
 
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptx
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
B041306015
B041306015B041306015
B041306015
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Digital Communication GRP1 (1).pptx

  • 1. DESCRIPTIONOF ITC MATLAB CODES GROUP MEMBERS: K BASAMMA-1DA21EC065 K GURUBASAVARAJ-1DA21EC066 KASHVI V-1DA21EC067 KAUSHIK REDDY S -1DA21EC068 KEERTHANA D – 1DA21EC069 KEERTHANA K – 1DA21EC070 KISHAN S P-1DA21EC72 KRISHNA B CHAVDA-1DA21EC073 KSHAMA R-1DA21EC074 LIKITH T S-1DA21EC075
  • 2. HUFFMAN CODING Huffman Code: is a way to encode information using variable length string characters to represent the data depending on how frequently they appear. Huffman coding is a method of data compression which works by looking at the data stream that makes up the file to be compressed without losing any data. The data bytes that occur most often are assigned a small code to represent them. There are mainly two major parts in Huffman Coding: 1. Build a Huffman Tree from input characters. 2. Traverse the Huffman Tree and assign codes to characters.
  • 3. In the Huffman tree an auxiliary array is maintained. While moving to the left ,we write 0 to the array. While moving to the right, we write 1 to the array. Next we print the code in a top-bottom approach. Applications of Huffman Coding 1. They are used by conventional compression formats like PKZIP, GZIP, etc. 2. They are used for transmitting fax and text. 3. Multimedia codes like JPEG, PNG, and MP3 use Huffman encoding. 4. It is useful in cases where there is a series of frequently occurring characters.
  • 4. Algorithm of Huffman Coding 1. Start 2. Input the total number of possibilities 3. Arrange the messages in descending order of probabilities. 4. Add the last two probabilities, and assign 0 and 1 bits to them and sort out the total probabilities 5. If the addition is equal to the other probability, then put it on the top 6. Repeat these steps until the addition is 1 7. To find a code for a particular symbol write the path of the probability and its code ion a reverse approach 8. Find out its entropy, average code length and efficiency 9. Stop
  • 6.
  • 7.
  • 8.
  • 10.
  • 11.
  • 12.
  • 13. HAMMING CODE Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can occur when the data is moved or stored from the sender to the receiver. It encodes 4 bits of data into a 7 bit code word, adding 3 parity bits for error detection and correction. The parity bits are positioned at specific locations to enable identification and correction of single bit errors. Redundant bits: Redundant bits are extra binary bits that are generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during the data transfer.
  • 14. Parity bits: A parity bit is a bit appended to a data of binary bits to ensure that the total number of 1’s in the data is even or odd. Parity bits are used for error detection. Even parity bit: The number of 1’s are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1’s an even number. If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0. Odd Parity bit: Here the number of 1’s are counted. If that count is even, the parity bit value is set to 1, making the total count of occurrences of 1’s an odd number. If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.
  • 15. Features of Hamming Code 1. Error Detection and Correction 2. Redundancy 3. Efficiency 4. Widely Used 5. Single Error Correction 6. Limited Multiple Error Correction
  • 16. Algorithm of Hamming code 1.Intialize the environment 2. Encode the data using Hamming (7,4) encoding 3. Simulate transmission errors by flipping bits in the received data 4.Decode the received data using Hamming(7,4) decoding 5.Display the original and the encoded data 6. Display the received data with the errors 7. Display the decoded data 8.End
  • 17. MATLAB Program Write a MATLAB program for encode binary data using a (7,4) Hamming code and decode it. data=[1 0 1 1;0 1 0 0;1 1 1 0;0 0 0 1]; Encoded_data=encode(data,7,4,'hamming/binary'); received_data=encoded_data; received_data(1,3)=~received_data(1,3); received_data(3,5)=~received_data(3,5); decoded_data=decode(received_data,7,4,'hamming/binary'); disp('original data'); disp(data); disp('encoded data'); disp(encoded_data);
  • 18.
  • 19.
  • 20.