Scott Dattalo wrote: > I'm not exactly sure how you're wanting to use bit 7, James, but > perhaps a slight improvement over the Hamming (4,7) algorithm is > a "Hamming (4,8)" algorithm, which AFAIK does not exist. It's been a few decades since I last delved into this for the design of ECC-based memory systems, but one thing I do remember is that you can always convert a single-error-correcting Hamming code into a SECDED code (single error correcting, double error detecting) by adding a parity bit. The theory is this: All valid code words are (a minimum of) Hamming distance 3 apart. Any single-bit error is distance one from a valid word, and the correction algorithm converts the received word to the nearest valid one. If a double error occurs, the parity of the word is not affected, but the correction algorithm still corrects the received word, which is distance two from the original valid word, but distance one from some other valid (but wrong) word. It does this by flipping one bit, which may or may not be one of the erroneous bits. Now the word has either one or three bits flipped, and the original double error is now detected by the parity checker. Note that this works even when the parity bit itself is involved in a single-bit or double-bit error. It isn't hard to work out all the combinations. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist