Hamming Code is an example of a code that can correct single errors. This code exists for many different word lengths. An example is the Hamming 7-4 Code, it consists of 7 information bits and 4 control bits, hence the code word consists of 11 bits.
So, assume that we have the following information bits:
| index | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| information word | w1 | w2 | w3 | w4 | w5 | w6 | w7 |
The code word, consisting of the above information bits and the four additional control bits, is constructed in a special way, namely:
| index | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| code word | c1 | c2 | w1 | c3 | w2 | w3 | w4 | c4 | w5 | w6 | w7 |
Further, in depth explanation of the Hamming 7-4 Code is available: