bit1=xor(i1,i2)
bit2=xor(i1,i3)
bit3=xor(i1,i4)
bit4=xor(i2,i3)
bit5=xor(i2,i4)
bit6=i2
bit7=i1
Oops, I made a mistake; I had a reversed XOR in the checks. But it doesn't matter, the check also works with the correct XOR. They operate symmetrically.
New here? I'm Roha — want a quick tour?