In the course of creating, transmitting, receiving, and deciphering the secret messages throughout this text, you have no doubt committed errors. Particularly when working “by hand” such errors are unavoidable. But even when codes are read by computers, an error can occur.
Wouldn’t it be great if there were some way to receive a message and know immediately that it had been transmitted incorrectly, tampered with, or misinterpreted? It may not come as a surprise to know that there is such a system. Codes that reveal or even correct errors have many applications in everyday life. We discuss a few of them here.
A puzzle about hats that is secretly about parity.
A way to measure how far apart two code words are, and what that says about the errors a code can catch.
Codes that repeat a message so errors can be fixed.
Check digits, including the ones on the back of every book.
A code that corrects any single error using only three extra bits.
These codes don’t keep anything secret. They protect messages from accidents, not from attackers. Protecting a message from someone who changes it on purpose takes cryptography, such as digital signatures.