Hamming code
Note: A Hamming code satisfies the relation 2m ≥ n+1, where n is the total number of bits in the block, k is the number of information bits in the block, and m is the number of check bits in the block, where m = n- k .
Hamming codes in action
Let us examine the Hamming (7, 4) code.We write a matrix
Writing out the multiplication, we end up with
- a=d0+d1+d3,
- b=d0+d2+d3
- c=d1+d2+d3
On decoding, assume one error has occurred in the received codeword r. (this Hamming code cannot detect when more than one error has occurred).
If no error has occurred, we have constructed the codeword to be sent so Hc=0 so we can check this. Say an error has occurred in the ith place, so
- r=c+ei
Then
- Hr=Hc+Hei
- Hr=0+Hei=Hei
Source: from Federal Standard 1037C
See also: Hamming distance


