Letting m be [1010], x = mG = [1010101].
If an error occurred and x is replaced by x' = [1011101], then Hx'T = .
The fact that this is not zero shows us that an error has occurred, and that the transpose of the syndrome is the same as the fourth column of the parity check matrix tells us that the error was with the fourth digit. Therefore, by changing the fourth digit, we have the correct codeword again of [1010101]. Then we just have to remove the last three digits to know what message was sent.
To see how this works, looking at G, we knew that the first four digits of the codeword were going to be the message since the identity was being used. Then, since we are using modulo 2 arithmetic, we can see that the fifth digit is the sum of the second, third and fourth digits, the sixth digit is the sum of the first, third and fourth digits and the seventh digit is the sum of the first,
second and fourth digits. \begin{eqnarray*} x_1 &=& m_1,\\ x_2 &=& m_2,\\ x_3 &=& m_3,\\ x_4 &=& m_4,\\ x_5 &=& m_2 + m_3 + m_4,\\ x_6 &=& m_1 + m_3 + m_4,\\ x_7 &=& m_1 + m_2 + m_4. \end{eqnarray*} Then, looking at the parity check matrix, it can be seen what sums are involved in finding the syndrome: \[ s_1 = x_2 + x_3 + x_4 + x_5,
\] but \[ x_5 = m_2 + m_3 + m_4 = x_2 + x_3 + x_4, \] so \[ s_1 = 2(x_2 + x_3 + x_4) = 0. \] Similarly, \[ s_2 = x_1 + x_3 + x_4 + x_6 = 2(x_1 + x_3 + x_4) = 0, \] and \[ s_3 = x_3 + x_2 + x_4 + x_7 = 2(x_1 + x_2 + x_4) = 0. \] So if, as in our example, an error occurs in the fourth position, it is important to remember that the fifth, sixth and seventh digits were calculated using the true value
of the fourth digit. All three zeros in the syndrome rely on the fourth digit of the codeword being equal to the fourth digit that was used to calculate the extra digits so, since this is not the case, it ends up with three ones which then matches the fourth column of the parity check matrix.
Reference
http://web.syr.edu/~rrosenqu/ecc/main.htmAbout the author
I am currently in the U6 at the Perse School for Girls, Cambridge studying for A levels in maths, further maths, physics and chemistry. I hope to go on to study maths at university in 2001 (destination unknown).I wrote this article whilst working with the Millennium Mathematics Project, during the summer of 2000, arranged and funded by the Nuffield Science Bursary Scheme.