Let us calculate the calculated Hamming code as follows :
p1 p2 0 p4 0 0 1..
So we calculate the even parity as :
For p1 : Bit positions 1 , 3 , 5 and 7 to be considered ..
So p1 = 1 as bits are 0 , 0 and 1 are there at 3rd , 5th and 7th positions respectively..
For p2 : Bit positions 2 , 3 , 6 and 7 to be considered..
So p2 = 1 as well..
For p3 : Bit positions 4 , 5 , 6 and 7 to be considered
So p4 = 1 as well..
So we can see there is mismatch at p1 and p2..
So wrong bit position is found as : 1 + 2 = 3
So bit at 3 = 1 instead of 0..
Hence correct message (4 bits ) = 1 0 0 1
= 9
Hence 9 (option A) is the correct answer..