Hamming Code:
Humming code is 1-bit Error Correcting Code.
Let consider we send m bit manage transmitted to receive for error-correcting or detecting we add an extra parity bit(s).
# So, when m + p bits transmitted to the receiver how many cases will occur.
1) There is no error.
2) 1-bit error either at m bit or at p bit.
So, any one of them corrupted – m + p
No error is there – 1
Now we should able to detect each one of the cases separately using p bit(s).
Important point:
Let’s take an example:
Now, how can we handle the cases over p parity bit (s)?
According to this condition, we decide how bits require for parity bit to add at the original message (m):
Definitely more than 3 bit is also possible but we always choose as small a bit as possible as parity bit which satisfies the condition.
So, for error correction, we should add 3 bits as parity with the original message (4 bits) then 4 + 3 (bits) = 7 bits we are sending.
So, when we send 7 bits how many cases occur. So, error may present at bit number (1 or 2 or 3 or 4 or 5 or 6 or 7, 0 (no error))
So, 8 cases are possible.