LOGIC & PUZZLES / ERROR CHECKING

Checksums catch mistakes.
They are not magic.

Redundant information can reveal corruption, but a check has specific blind spots.

A check value is useful only against errors it can detect.

A checksum or check digit summarizes a message, file, or number so a receiver can detect some changes. A simple example is parity: append a bit so the total number of ones is even or odd. If exactly one bit flips, the parity changes and an error is detected. If two bits flip, the parity may return to its original value, so the same check can miss the corruption. Decimal identification numbers may use a weighted check digit that catches many transcription errors, such as a single mistyped digit or a transposition, but the exact coverage depends on the formula. File checksums can be useful for checking that a download matches an expected digest, assuming the expected digest itself came from a trustworthy source. A cryptographic hash is designed to make it computationally difficult to find a different file with the same digest, while a non-cryptographic checksum is optimized for error detection, not resistance to a malicious attacker. Neither proves that the content is harmless or authored by a particular person; that requires other verification such as authenticated signatures and secure key handling. A check value is not encryption: it does not hide the content. When designing a simple toy checksum, list the errors you care about and construct test cases that should trigger detection. Changing one digit, swapping two adjacent digits, or adding a burst of flipped bits reveals whether the algorithm catches the likely faults. A checksum may catch an accidental transmission error yet miss a systematic mistake made before the checksum was generated. If a document is wrong in its source, faithfully computing its digest does not make it true. Strong systems combine appropriate redundancy, cryptographic authentication, error correction, and operational controls according to their threat model. A printed check digit makes long numbers easier to enter, but its advertised guarantee should be read from the official specification rather than assumed. Treat any “validated” form field as a typo filter, not an identity check. Likewise, browser warnings and hash matches have precise meanings; read the source, algorithm, and verification channel. The general lesson extends beyond computing: one independent check can spot certain mistakes, but diverse checks and a clear model provide better assurance. Understanding what a checksum cannot detect is as important as knowing how to calculate it.

Test a parity check's blind spots.

Write eight bits and add an even-parity bit. Flip one bit and verify that the total parity changes. Then flip a second bit and notice that the simple check can no longer tell an even number of errors occurred.

← Weighted routesAll puzzle guidesParadoxes and definitions →