Fletcher's Checksum - Example Calculation of The Fletcher Checksum

Example Calculation of The Fletcher Checksum

As an example, the checksum shall be calculated and verified for a byte stream of 0x01 0x02.

  • C0_initial = 0
  • C1_initial = 0
Byte C0 = C0prev + B C1 = C1prev + C0
0x01 0x01 0x01
0x02 0x03 0x04
−(C0 + C1) = 0xF9 0x03 + 0xF9 = 0xFC 0x04 + 0xFC = 0x00
−(C0 + C1) = 0x04 0xFC + 0x04 = 0x00 0x00 + 0x00 = 0x00

The checksum bytes are 0xF9 0x04. The transmitted byte stream is 0x01 0x02 0xF9 0x04. The receiver runs the checksum on all four bytes and calculates a passing checksum of 0x00 0x00.

Read more about this topic:  Fletcher's Checksum

Famous quotes containing the words calculation and/or fletcher:

    Common sense is the measure of the possible; it is composed of experience and prevision; it is calculation appled to life.
    Henri-Frédéric Amiel (1821–1881)

    Hear, ye ladies that despise,
    What the mighty Love has done;
    Fear examples, and be wise:
    —John Fletcher (1579–1625)