An Hamming code is the set of binary vectors of dimension n satisfying the condition...

(1)

... where...

is a n bit word

(2)

... is the m x n 'parity matrix' of the code...

is the m bit nul word...

An Hamming code allows You to detect 2 errors or correct 1 error in a received n bit word. Each word has length and is composed by n-m 'information bits' and m 'redundancy bits'. Given the 'information bits' the 'redundancy bits' are computed sao that the relation (1) is satisfied, and the the n bits word is trasmitted. Because the transmission channel is 'noisy' , each received word will be...

(2)

At this point we compute...

(3)

If we can 'hope' that no trasmission errors have occurred and we can recovery the [uncurrupted] 'information bits'. If that some errors have occurred and we have two possibilities...

a) to require the retransmission of the corrupted word...

b) try to correct the transmission error...

Under the hypothesis than no more then 1 error has occured, the 'position' of the error can be detected... it corresponds to the column vector of H equal to . An example will be useful...

Let’s have an Hamming 4-7 code with parity matrix…

(4)

... and suppose to have to trasmit the 'information bits' . Using (1) we construct as...

(5)

Let's suppose now to receive...

(6)

... that has been corrupted in position 2. Using (3) we compute...

(7)

... that is the 'column vector' in position 2, where the error occurred...

Kind regards