A few questions about CRC basics

I am an electronic engineer and do not consider it important to consider CRC from a purely mathematical point of view. However, I have the following questions:

  • Why do we add n zeros to the message when calculating the CRC, were the n - degrees of the generator polynomial? I saw this in the long division modulo-2, as well as in the hardware implementation of CRC

  • Why do we want the generator polynomial divided by (x + 1)?

  • Why do we want the generator polynomial not to divide by x?

+7
crc modulo checksum polynomials
source share
1 answer
  • We add n zeros when calculating n -bit CRC, because by adding CRC to the message and sending the integer (common practice in telecommunications):
    • This allows the receiving side to process the CRC bits in the same way as the rest of the message, resulting in a known remainder for any error-free transmission. This is especially useful when at the end of the message something is indicated that follows the CRC (common practice); on the receiving side, it stores a buffer of bit n , and on the transmission side it practically does not add complexity (additional members x(n) reduced before the logical element AND makes the message bits equal to zero during CRC transmission, and n additional recovery steps are performed by least CRC).
      The mathematically sent CRC is (M(x) * x^n) mod P(x) = R(x) (possibly within a certain constant and / and, possibly, with some prescribed bits added at the beginning of M(x) , corresponding to the initialization of the CRC register) and the CRC calculated on the receiving side is above the concatenation of M(x) and R(x) , i.e. (M(x) * x^n + R(x)) mod P(x) , which is equal to zero (or the specified constant).
    • This ensures that the burst of errors affecting both the end of the message and the continuous CRC depends on the full level of protection provided by the choice of the polynomial. In particular, if we compute C(x) as M(x) mod P(x) by flipping the last bit of M(x) and the last bit of C(x) will disappear when most of the polynomials used to detect errors guarantee detection of any two-bit error up to some large message size.
  • It is common practice to use CRC polynomials to determine errors divisible by x+1 , since it provides detection of any error that affects an odd number of bits. However, this practice is not universal and sometimes prevents the selection of the best polynomial for some useful definitions better, including maximizing the message length, so that errors m always detected (in the absence of synchronization losses), for some combinations of m and n . In particular, if we want to be able to detect any 2-bit error for the longest message (which should be 2 n -1 bits, including n bit CRC), we need this polynomial to be primitive, therefore irreducible in this way (for n > 1) is not divisible by x+1 .
  • It is a universal practice to have CRC polynomials used to detect errors that are not divisible by x , since otherwise the last bit of the generated CRC would be constant and would not help detect errors in the rest of the + CRC message.
+6
source share

All Articles