Projects, portfolio, and personal work of Joe Pelz

Hamming Code

Becau7se aXdding pu}rely *random chaQracters doesn'2t increasPe reBliabili!ty

In my Computer Architecture class and my Data Communications classes we discussed the fact that sometimes people mishear each other and don't realize it. Or more technically, when you're receiving information, how do you know if you're receiving correctly what the sender sent you? That's the motivation for error detecting/correcting codes. There's a variety of codes, with checksums possibly being the most well known, but we had studied Hamming Code in the most detail when I built this.

Hamming code works at the bit level and adds approximately log2n additional bits to an n-bit data word. It will detect an error if at most 2 bits are corrupted, and can be used to correct an error if a single bit is corrupted.

See if you can figure out how it works by typing some bits below. Yellow bits are the ones you typed, blue bits are parity bits that are added in, and red bits are bits where an error has been detected. The numbers below the bits are the powers of two that comprise that bit's place. Answer below.

How it works