Hamming Code - Error correction
When
sender sends data to receiver, but if sender data and receiver data does not
match then it is called error. Error can be handled in two ways, first solution
is re-transmission of data, and second error is corrected on the receiver side.
A
receiver can use error correcting code and this code corrects data automatically.
A
single bit error can be correct using parity bit.
Multiple
bit error can be correct using hamming code.
HAMMING
CODE
Hamming
code was invented by Richard Hamming in 1950. Hamming code can detect up to
2-bit error. Hamming code uses a redundancy code, and these redundant bits is
used to correct data. If data is of m bit and redundant bit is of r bit, then
total data to be sent is m+r.
If
the total number of transmittable bit is m+r, then r must be able to represents
m+r+1 different state.
2r
>= m+r+1
If
value of m is 7 then minimum value of r is 4.
Now the question is
the position of redundant bits (r). Each redundant bit is placed on power of 2.
For example, redundant bit0 will placed on 20, redundant bit1 will
placed on 21 and so on.
The values of redundant bits is determined by combinations of data bits
r1 = bits 1,3,5,7,9,11
r2 = bits 2,3,6,7,10,11
r3 = bits 4,5,6,7
r4 = bits 8,9,10,11
r1 = bits 1,3,5,7,9,11
r2 = bits 2,3,6,7,10,11
r3 = bits 4,5,6,7
r4 = bits 8,9,10,11
0 comments:
Post a Comment