I am trying to understand hamming codes for single bit error correction. I understood all the things like hamming distance , k bit error detection and all basics for hamming codes. Also, I know the algorithm for error correction using hamming codes. I have read many answers from different stackexchange sites and also I fear that this question may be marked as duplicated. But I am not satisfied, I just know a procedure and don’t know the intuition behind the idea.
Let’s say we need to send a 4-bit message for which three parity bits will be used. Now the sequence will be
p1 p2 m3 p4 m5 m6 m7 and my instructor is saying that
p1 will be responsible for
( 1 , 3 , 5 , 7 ) ,
p2 will be responsible for
( 2 , 3 , 6 , 7 ) and
p4 will be responsible for
( 4 , 5 , 6 , 7 ). Why is it so?
Why only $2^n$ position bits are selected for parity? How to visualize its working?