0% found this document useful (0 votes)
75 views2 pages

Hamming Code Detailed Explanation

The document explains the Hamming code (12,8) technique for error detection and correction, detailing the placement of data and parity bits. It outlines the steps for calculating parity bits, detecting an error in the transmitted codeword, and correcting the error by flipping the affected bit. The conclusion emphasizes the effectiveness of Hamming code in ensuring data integrity in digital communication and memory storage.

Uploaded by

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

Hamming Code Detailed Explanation

The document explains the Hamming code (12,8) technique for error detection and correction, detailing the placement of data and parity bits. It outlines the steps for calculating parity bits, detecting an error in the transmitted codeword, and correcting the error by flipping the affected bit. The conclusion emphasizes the effectiveness of Hamming code in ensuring data integrity in digital communication and memory storage.

Uploaded by

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

Hamming Code (12,8) Error Detection and Correction

Question:
The Hamming code technique is used for error detection and correction. Suppose during

transmission, LSB is in error for the original 8-bit data word 11000100. How will you detect and

correct this single-bit error using Hamming code?

Step 1: Data and Parity Bit Placement


In Hamming(12,8) code, 8 data bits and 4 parity bits are used. The parity bits are placed at positions

1, 2, 4, and 8, and the data bits are placed at remaining positions.

Position 12 11 10 9 8 7 6 5 4 3 2 1

Bit D12 D11 D10 D9 P8 D7 D6 D5 P4 D3 P2 P1

Value 1 1 0 0 P8 0 0 1 P4 1 P2 P1

Step 2: Parity Bit Calculation


The parity bits are calculated using even parity. Each parity bit covers specific positions to ensure

that the total number of 1s in its group is even.

P1 covers bits: 1, 3, 5, 7, 9, 11

P1 = Parity(D3, D5, D7, D9, D11) = Parity(1, 1, 0, 0, 1) = 1

P2 covers bits: 2, 3, 6, 7, 10, 11

P2 = Parity(D3, D6, D7, D10, D11) = Parity(1, 0, 0, 0, 1) = 0

P4 covers bits: 4, 5, 6, 7, 12

P4 = Parity(D5, D6, D7, D12) = Parity(1, 0, 0, 1) = 0

P8 covers bits: 8, 9, 10, 11, 12

P8 = Parity(D9, D10, D11, D12) = Parity(0, 0, 1, 1) = 0

Final Hamming Codeword


The final Hamming codeword with parity bits is: 110001000101
Step 3: Error Detection
If an error occurs at bit position 1, the received codeword becomes 110001000100. To detect the

error, we recalculate the syndrome bits.

Syndrome Calculation:

S = P8 P4 P2 P1

If S = 0000, then there is no error.

If S is not 0000, then the error position is given by the decimal value of S.

Recalculating parity bits gives S = 0001 (decimal 1), meaning the error is in bit position 1.

Step 4: Error Correction


Since the error is in bit 1, we flip it from 0 to 1. This corrects the codeword back to 110001000101,

restoring the original data word 11000100.

Conclusion
The Hamming code successfully detects and corrects the single-bit error in the transmitted data

word. It is an efficient error correction technique used in digital communication and memory storage.

You might also like