My message bit is 10011010
, so code word for this is 0110
and now the codeword is 011100101010
.
Suppose the error is in 10th bits and it becomes 011100101110
, so finding parity bits:
p1=1+3+5+7+9+11=010111=even number of 1 therefore=0
p2=2+3+6+7+10+11=110111=1
p4=4+5+6+7=1001=0
p8=8+9+10+11+12=01110=1
Comparing with the message the parity is false for 4 and 8 position ie 4+8=12, but in fact we have made errors in 10 bit. Where have I made a mistake?