0% found this document useful (0 votes)
15 views10 pages

Hamming Code

Hamming code is an error detection and correction technique that adds extra parity bits to the original data to create a codeword. The codeword is transmitted and the parity bits are used at the receiver to detect and correct any single-bit errors introduced during transmission. It works by encoding the data into a codeword via functions that calculate the parity bits and insert them into the data, and decoding the received codeword by calculating syndromes to detect errors and correcting any single-bit errors found. While it can reliably detect and correct single-bit errors, it has limitations such as only correcting single errors and requiring overhead from the added parity bits.

Uploaded by

bharathsindhe03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views10 pages

Hamming Code

Hamming code is an error detection and correction technique that adds extra parity bits to the original data to create a codeword. The codeword is transmitted and the parity bits are used at the receiver to detect and correct any single-bit errors introduced during transmission. It works by encoding the data into a codeword via functions that calculate the parity bits and insert them into the data, and decoding the received codeword by calculating syndromes to detect errors and correcting any single-bit errors found. While it can reliably detect and correct single-bit errors, it has limitations such as only correcting single errors and requiring overhead from the added parity bits.

Uploaded by

bharathsindhe03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

HAMMING CODE

WHY DO WE NEED HAMMING CODE


?
The Hamming Code method is one of the most effective ways to detect single-data bit errors in
the original data at the receiver end
INTRODUCTION TO ERROR
DETECTION AND CORRECTION
• Error detection and correction techniques are essential in data transmission to ensure the
accuracy and reliability of the transmitted data.
• Errors can occur during the transmission process due to various factors such as noise,
interference, and channel distortion.
• Detecting and correcting these errors is crucial to prevent data corruption and ensure the
integrity of the transmitted information.
HOW DOES HAMMING CODE
WORK?
Hamming Code is an error detection and correction technique used in digital communication
systems. It adds extra bits to the original data to create a code word. These extra bits, known as
parity bits, are calculated based on the position of the data bits. The code word is then
transmitted along with the original data. At the receiving end, the parity bits are checked to
detect and correct any errors that may have occurred during transmission.
hamming_encode(data):
•Input: data
•Output: codeword
•Description: This function takes a 4-bit data sequence as
input and calculates three parity bits (“p1”,” p2”, and ”
p3”) based on the data bits. It constructs the codeword by
inserting these parity bits at specific positions and returns
the resulting codeword.
hamming_decode(codeword):
•Input: codeword
•Output: data
•Description: This function takes a received codeword as
input, calculates the syndrome bits (“s1”, “s2”, and “s3”)
based on the received codeword, and determines if there's any
single-bit error. If an error is detected, it corrects the error by
flipping the bit at the detected position. Finally, it extracts the
original data from the corrected codeword and returns it.
This function serves as the entry point of the program. It
initializes a 4-bit data sequence, encodes it using
“hamming_encode(), ”prints the encoded codeword, then
decodes the received codeword using “hamming_decode()
”and prints the decoded data.
Advantages Limitations
 Error Detection: Hamming Code can  Limited Error Correction: Hamming
detect and correct single-bit errors, making Code can only correct single-bit errors. It is
it highly reliable for data transmission. unable to detect or correct multiple-bit
 errors or burst errors.
Efficient: Hamming Code achieves error
detection and correction with minimal  Overhead: Hamming Code requires
overhead, requiring only a few extra bits. additional bits to be added to the original
 data, increasing the overall data size.
Simple Implementation: The algorithm
for encoding and decoding Hamming Code  Complexity: While the basic
is straightforward and can be easily implementation of Hamming Code is
implemented in hardware or software simple, more advanced variations can be
systems. complex and require additional
computational resources.
APPLICATIONS
• Communication Systems
• Storage Systems
• Memory Systems
• Satellite and Space Communication
• Digital Broadcasting
• Deep Space Communication
• Data Compression
THANK YOU

You might also like