6,529 views
Following $7$ bit single error correcting hamming coded message is received.
$$\overset{7\qquad 6\qquad 5 \qquad 4\qquad 3 \qquad 2 \qquad 1}{\boxed{1 \qquad 0\qquad 0 \qquad 0 \qquad 1 \qquad 1 \qquad 0}} \qquad \overset{\textbf{bit No.}}{\boxed{X}}$$
Determine if the message is correct (assuming that at most $1$ bit could be corrupted). If the message contains an error find the bit which is erroneous and gives correct message.

Answer: Bit 5 has the error. It should be 1.

Here, parity bits are 1,2,4 (power of 2).

Hamming code based on data bits received = 110
Bit 1 = Bit 3 $\oplus$ Bit 5 = 1 $\oplus$ 0 = 1. (XOR of all bits having the least significant digit as 1)
Bit 2 = Bit 3 $\oplus$ Bit 6 = 1 $\oplus$ 0 = 1. (XOR of all bits having the second least significant digit as 1)
Bit 7 = Bit 4 $\oplus$ Bit 5 $\oplus$ Bit 6 = 0 $\oplus$ 0 $\oplus$ 0 = 0. (XOR of all bits having the third least significant digit as 1)

But the received message has Bit 1 = 0, Bit 2 = 1, Bit 7 = 1 (Actual hamming code)

Bit error = Hamming code based on data bits received $\oplus$ Actual hamming code = 110 $\oplus$ 011 = 101 (i.e. Bit 5 has the error)

is it correct?
yes it is

Superb way to solve! @Sudipta Paul By this we can get the answer in just one go.

Thank u !

1 vote