Instruction Manual

A-15
6 Calculating Checksums
Appendices
Calculating Checksums
will serve as an example in calculating checksums.
The characters are converted to ASCII code and converted into 8 bit binary numbers as shown
below.
Each bit of each character is then fed to an Exclusive Or function.
The 2-digit hexadecimal result of this calculation is the checksum.
So cc = 51 (35h 31h)
gives a cc = 08
gives a cc = 08
Exclusive Or calculation
Exclusive Or calculations are carried out as follows.
0 0=0
0 1=1
1 0=1
1 1=0 * Exclusive Or operator
Converting from hexadecimal to binary
Refer to the following chart for converting ASCII code to binary.
ASCII code Bit
%
25h
0010 0101
P
50h
0101 0000
0
30h
0011 0000
1
31h
0011 0001
-
2Dh
0010 1101
0
30h
0011 0000
0
30h
0011 0000
0
30h
0011 0000
8
38h
0011 1000
A
41h
0100 0001
B
42h
0100 0010
1
31h
0011 0001
2
32h
0011 0010
0101 0001
51h
Hexadecimal
01234567
Binary
0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal
89ABCDEF
Binary
1000 1001 1010 1011 1100 1101 1110 1111
P mm -Header % Delimitercc0008 AB12
+
Example
P 01 -Header ERROR% DelimiterccERROR DelimiterccERRORERROR0009
Header AB12 Delimitercc0004
Reference
+
+
+
+
+