In CRC (Cyclic Redundancy Check), the size of the remainder is determined by the size of the divisor. The divisor is usually represented as a polynomial. The number of zeros needed to be added to the dataword depends on the degree of the polynomial.
Let's assume that the dataword is 5 bits and the codeword is 8 bits. To find the number of zeros needed:
-
The number of bits needed to represent the CRC polynomial (divisor) is calculated by subtracting the size of the dataword from the size of the codeword:
Number of zeros=Size of codeword−Size of datawordNumber of zeros=Size of codeword−Size of dataword Number of zeros=8−5=3Number of zeros=8−5=3
So, you would need to add 3 zeros to the dataword to form the dividend.
-
The size of the remainder is the same as the size of the divisor. In this case, if the divisor is represented as an 8-bit polynomial, the remainder will also be 8 bits.
-
The size of the divisor is determined by the degree of the polynomial. If the polynomial has a degree of n, then the size of the divisor is n+1. If the polynomial is represented as an 8-bit sequence, it means the divisor has a degree of 7.
SO,
- Number of zeros to be added to the dataword: 3
- Size of the remainder: 8 bits
- Size of the divisor: 8 bits