Skip to content

Checksums

Published On:
Apr 15, 2012
Last Updated:
Apr 28, 2026

Fletcher’s Checksum

Fletcher’s checksum is a simple checksum algorithm that is used to detect errors in data transmission. It was developed by John G. Fletcher at Lawrence Livermore Labs in the late 1970s.1 It was aimed to be an improvement over simple add-and-modulo checksums which are insensitive to block reordering. The key idea is that rather than have a single checksum value, a second value is added and sent along with the data. This value is the sum of the running totals of the first sum. This makes it sensitive to block reordering, as once a block is applied it is then reapplied to the second sum on every block thereafter.

Fletcher-16

Fletcher-16 is where the data is divided into 8-bit blocks (bytes). The sums are calculated modulo 255. Two 8-bit sums are calculated which are combined into a 16-bit Fletcher checksum. The second sum is usually the one that shifted by 8 bits (i.e. multiplied by 256) and added to the first sum.

Sometimes a further step is taken in where a second checksum is calculated which is chosen so that the global checksum (the checksum over all bytes including the checksum itself) is zero. If this is desired, the second checksum can be calculated as:

CB0=255((C0+C1)mod255)CB1=255((C0+CB0)mod255)\begin{aligned} C_{B0} = 255 - ((C_0 + C_1) \bmod 255) C_{B1} = 255 - ((C_0 + C_{B0}) \bmod 255) \end{aligned}

All 1’s or All 0’s Checksum

One limitation of Fletcher’s checksum is that it cannot detect the difference between a data block that is all 1’s and a data block that is all 0’s. The checksum will be the same for both cases.

Footnotes

  1. Wikipedia (2025, Aug 4). Fletcher’s checksum [wiki]. Retrieved 2026-04-28, from https://en.wikipedia.org/wiki/Fletcher%27s_checksum.

  2. J. G. Fletcher (1982, Jan). An Arithmetic Checksum for Serial Transmissions. IEEE Transactions on Communications. Retrieved 2026-04-28, from https://ieeexplore.ieee.org/document/1095369/.

  3. Anastase Nakassis (1988, Oct). Fletcher’s error detection algorithm: how to implement it efficiently and how to avoid the most common pitfalls [pdf]. ACM SIGCOMM Computer Communication Review. Retrieved 2026-04-28, from https://dl.acm.org/doi/pdf/10.1145/53644.53648. 2