For a 4-bit code there are 3 parity bits p1, p2 and p3 at location 1, 2 and 4 resp.
So, the code will be: “p1 p2 n1 p3 n2 n3 n4” where, n1, n2, n3, n4 are bits of the code and p1,p2 and p3 are parity bits to be calculated
Therefore, the code for even parity is calculated as below:
Therefore the even parity hamming code is: 1011010.
Consider that the same calculated code is sent , but it is received with an error in one particular bit, say bit7. S the code word received is: 1011011.
Hence, to identify the error and correct it the receiver follows the procedure as below: