Fletcher Checksum; Calculation - Honeywell IPT User Manual

Table of Contents

Advertisement

6 Fletcher Checksum

6.1 Calculation

The Fletcher checksum calculation results in two sums:
SUM1[R-1] = D[0] + D[1] + ...D[R-1]
SUM2[R-1] = SUM1[0] + SUM1[1] + ...SUM1[R-1]
where R = number of bytes in the EEPROM storage area from 00 through B5 (182d), including the
check bytes, and where all additions are modulo 256.
If no errors are found, SUM1[R-1] = SUM2[R-1] = 0
Example: 4 bytes of data, 2 check bytes, no errors
Data
Data
Data
Data
Check Byte #1
Check Byte #2
Example with single-bit error
Data
Data
Data
Data
Check Byte #1
Check Byte #2
Example with two single-bit errors
Data
Data
Data
Data
Check Byte #1
Check Byte #2
Example with multiple errors
Data
Data
Data
Data
Check Byte #1
Check Byte #2
Hex
Binary
Decimal
C0
11000000
192
E7
11100111
231
E5
11100101
229
04
00000100
4
ED
11101101
237
83
10000011
131
Hex
Binary
Decimal
C0
11000000
192
E7
11100111
231
C5
11000101
197
04
00000100
4
ED
11101101
237
83
10000011
131
Hex
Binary
Decimal
C2
11000010
194
E5
11100101
229
E5
11100101
229
04
00000100
4
ED
11101101
237
83
10000011
131
Hex
Binary
Decimal
64
01100100
100
E7
11100111
231
E5
11100101
229
BC
10111100
188
ED
11101101
237
83
10000011
131
SUM1
SUM2
192
192
167
103
140
243
144
131
125
0
0
0
SUM1
SUM2
192
192
167
103
108
211
112
67
93
160
224
128
SUM1
SUM2
194
194
167
105
140
245
144
133
125
2
0
2
SUM1
SUM2
100
100
75
175
48
223
236
203
217
164
92
0
21

Advertisement

Table of Contents
loading

Table of Contents