Hamming code

Hamming codes are a well-known family of error correcting codes. A data stream is divided into blocks, and each block has a certain number of extra bits inserted into it. Within any block, all one-bit errors can be detected and corrected, and all two-bit errors can be detected.

Resources

 * Wikipedia article