suppose you have corrupt string A=[ 1 0 1 1 1 0 1 0]; and original string B=[1 0 1 0 1 0 0 1].
step 1: check the parity of A and B: that are 1 and 0.
step 2: parity is unmatched, so divide the string A and B by half and check the parity in first half. if parity is matched on first half leave that half and take the 2nd half, where there must be unmatched parity. For our case first half parity has not matched now leave the 2nd half. Take the first half and again apply divide and conquer method until you end up with 1 bit. Now you detect the error bit. so flip the error bit in A (i.e correct).
step 3: permute the bitstrings A and B with same permutation function so that error locations are changed. now do again from step 1.
repeat the procedure , until your desired error correction numbers.
image-processing
? – Unapiedra