100% found this document useful (1 vote)
8K views

Hamming Code With Solved Problems

This document provides an example of how to detect and correct an error in a transmitted Hamming code. It gives the original code "111001101" and received code "110001101". By constructing a bit location table and checking the parity bits, it determines the error is in the data bit D4. The value of D4 should be changed from 0 to 1, making the corrected code "111001101".

Uploaded by

Anshita Varshney
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
8K views

Hamming Code With Solved Problems

This document provides an example of how to detect and correct an error in a transmitted Hamming code. It gives the original code "111001101" and received code "110001101". By constructing a bit location table and checking the parity bits, it determines the error is in the data bit D4. The value of D4 should be changed from 0 to 1, making the corrected code "111001101".

Uploaded by

Anshita Varshney
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

10/9/21, 10:40 AM Hamming code with solved problems

Example problem 2
Let us assume the even parity hamming code from the above example (111001101)
is transmitted and the received code is (110001101). Now from the received code,
let us detect and correct the error.

To detect the error, let us construct the bit location table.

Bit Location 9 8 7 6 5 4 3 2 1
Bit designation D5 P4 D4 D3 D2 P3 D1 P2 P1
Binary representation 1001 1000 0111 0110 0101 0100 0011 0010 0001
Received code 1 1 0 0 0 1 1 0 1

Checking the parity bits

For P1 : Check the locations 1, 3, 5, 7, 9. There is three 1s in this group, which is wrong for even
parity. Hence the bit value for P1 is 1.

For P2 : Check the locations 2, 3, 6, 7. There is one 1 in this group, which is wrong for even
parity. Hence the bit value for P2 is 1.

For P3 : Check the locations 3, 5, 6, 7. There is one 1 in this group, which is wrong for even
parity. Hence the bit value for P3 is 1.

For P4 : Check the locations 8, 9. There are two 1s in this group, which is correct for even parity.
Hence the bit value for P4 is 0.

The resultant binary word is 0111. It corresponds to the bit location 7 in the above table. The
error is detected in the data bit D4. The error is 0 and it should be changed to 1.  Thus the
corrected code is 111001101.

https://www.electrically4u.com/hamming-code-with-a-solved-problem/ 1/1

You might also like