I'm a bit confused about computing Hamming code. In Wikipedia article it is written:
Parity bit 1 covers all bit positions which have the least significant bit set: bit 1 (the parity bit itself), 3, 5, 7, 9, etc.
How does that possible to get parity of bits that include that value?
Do I understand it right, that according to the article above the first parity bit should be calculated as:
parity_bit_1 = parity_bit_1 xor data_1 xor data_2 xor data_4 xor data_5 xor data_7 ...
However in some other sources (like joel.neely's answer to this question) it is said to be calculated like this:
parity_bit_1 = data_1 xor data_3 xor data_5 xor data_7 xor data_9 ...
So, how should that be done?