If I have uint64 data, I can bitwise-AND it with:
0xFFFF_FFFF_FFFF_FFFF0xFFFF_FFFF_0000_00000xFFFF_0000_FFFF_00000xFF00_FF00_FF00_FF000xF0F0_F0F0_F0F0_F0F00xCCCC_CCCC_CCCC_CCCC0xAAAA_AAAA_AAAA_AAAA
If I calculate the parity of those seven results, I am left with seven bits.
Assuming zero or one bit-flips in the data, these seven bits can be used to find:
- whether no bits have flipped, or
- which single bit has flipped (which can then be corrected).
What is the name of this error-correcting code?