Bug 35: SECDED Wounded But Not Dead: Checksum
- This is a "single error correction, double error detection" (SECDED) extended Hamming code checksum.
- Each gigabyte of non-ECC DRAM flips a bit every few hours on average. We want to protect against such flips.
- This function generates a checksum consisting of two parts: (1) an index sum, and (2) an overall parity bit.
- The data bits are numbered 3+(2*i): 3, 5, 7, 9, ... so that each data bit gets an index having two or more 1-bits.
- The index numbers for all the 1-bits in the data bytes are XOR'ed together to produce the index sum.
- The bits of the finished index sum and all the data bits are XOR'ed together to produce the overall parity bit.
Fix The Tiny Bug In This Go Code: