Datasheet
Data Sheet AD7176-2
Rev. A | Page 39 of 68
CRC CALCULATION
Polynomial
The checksum, which is 8-bits wide, is generated using the polynomial
x
8
+ x
2
+ x + 1
To generate the checksum, the data is left shifted by eight bits to create a number ending in eight Logic 0s. The polynomial is aligned so that
its MSB is adjacent to the leftmost Logic 1 of the data. An XOR (exclusive OR) function is applied to the data to produce a new, shorter
number. The polynomial is again aligned so that its MSB is adjacent to the leftmost Logic 1 of the new result, and the procedure is repeated. This
process is repeated until the original data is reduced to a value less than the polynomial. This is the 8-bit checksum.
Example of a Polynomial CRC Calculation—24-Bit Word: 0x654321 (Eight Command Bits and 16-Bit Data)
An example of generating the 8-bit checksum using the polynomial based checksum is as follows:
Initial value 011001010100001100100001
01100101010000110010000100000000 left shifted eight bits
x
8
+ x
2
+ x + 1 = 100000111 polynomial
100100100000110010000100000000 XOR result
100000111 polynomial
100011000110010000100000000 XOR result
100000111 polynomial
11111110010000100000000 XOR result
100000111 polynomial value
1111101110000100000000 XOR result
100000111 polynomial value
111100000000100000000 XOR result
100000111 polynomial value
11100111000100000000 XOR result
100000111 polynomial value
1100100100100000000 XOR result
100000111 polynomial value
100101010100000000 XOR result
100000111 polynomial value
101101100000000 XOR result
100000111 polynomial value
1101011000000 XOR result
100000111 polynomial value
101010110000 XOR result
100000111 polynomial value
1010001000 XOR result
100000111 polynomial value
10000110 checksum = 0x86.