The CRC is based on a checksum of modulo 2 operations.
N=k+r.
n is the length of the CRC code, K is the number of bits of the information code, and R is the number of bits of the checksum code.
2 R-Square >=k+r+1 (correct).
4 Useful information (1100) as a cyclic encoding, choose to generate a polynomial g (X) = 1011.
1. Move the information bit to the left r bit, i.e. add R 0 after the information bit.
Get 1100000.
2. Use 1100000 pairs of G (X) for modulo 2 to divide.
Get the remainder 010.
3. Modulo 2 Plus with remainder and 1100000.
Get 1100010.
Name |
Generating a polynomial |
Précis-Writers type * |
Application examples |
CRC-4 |
X4+x+1 |
3 |
ITU g.704 |
CRC-8 |
X8+x5+x4+1 |
31 |
Ds18b20 |
CRC-12 |
X12+x11+x3+x+1 |
5E |
|
CRC-16 |
X16+x15+x2+1 |
8005 |
IBM SDLC |
crc-itu** |
X16+x12+x5+1 |
1021 |
ISO HDLC, ITU x. v.34/v.41/v.42, Ppp-fcs |
CRC-32 |
X32+x26+x23+...+x2+x+1 |
04c11db7 |
ZIP, RAR, IEEE 802 lan/fddi, IEEE 1394, Ppp-fcs |
crc-32c |
X32+x28+x27+...+x8+x6+1 |
1edc6f41 |
Sctp |
crc--Cyclic redundancy Check code