P8 P4 P2 P1 m
0 0 0 0 | 0
0 0 0 1 | 1
0 0 1 0 | 2
0 0 1 1 | 3
0 1 0 0 | 4
0 1 0 1 | 5
0 1 1 0 | 6
0 1 1 1 | 7
1 0 0 0 | 8
1 0 0 1 | 9
1 0 1 0 | 10
1 0 1 1 | 11
1 1 0 0 | 12
1 1 0 1 | 13
1 1 1 0 | 14
1 1 1 1 | 15
Start counting from 0 to 15 skip (0,1,4,8)as 1 is P1 and 2 is P2 4 is P4 and 8 is P8 in hamming code generation
P1 = XOR of all the minterm whose P1 is 1 (3, 5, 7, 9, 11)
P2 = XOR of all the minterm whose P2 is 1 ( 3, 5, 7, 10, 11)
P2 = XOR of all the minterm whose P4 is 1 ( 5, 6, 7, 12)
P8 = XOR of all the minterm whose P8 is 1 (9, 10, 11, 12)
hence for sequence 11000100
P1 = XOR of bits (3, 5, 7, 9, 11) = 1 ⊕ 1 ⊕ 0 ⊕ 0 ⊕ 0 = 0
P2 = XOR of bits (3, 5, 7, 10, 11) = 1 ⊕ 0 ⊕ 0 ⊕ 1 ⊕ 0 = 0
P4 = XOR of bits (5, 6, 7, 12) = 1 ⊕ 0 ⊕ 0 ⊕ 0 = 1
P8 = XOR of bits (9, 10, 11, 12) = 0 ⊕ 1 ⊕ 0 ⊕ 0 = 1