Error correcting codes- Hamming
To see which check bits the data bit in position k contributes to, rewrite k as a sum of powers of 2. k = 15 = 1 + 2 + 4 + 8 or k = 29 = 1 + 4 + 8 = 16.
A bit is checked by only those check bits occurring in its power of two expansion.
On codeword receipt, receiver initializes counter to 0. It checks each check bit (k = 1, 2, 4, 8, …) to see if it has the correct parity (even or odd). If not, it adds k to the counter.