crcpolynomialspolynomial-mathcrc32crc64

Identifying polynomial terms of the CRC


I was looking at this page and I saw that the terms of this polynomial:

  1. 0xad0424f3 = x^32 +x^30 +x^28 +x^27 +x^25 +x^19 +x^14 +x^11 +x^8 +x^7 +x^6 +x^5 +x^2 +x +1

which seems not correct since converting the Hex:

0xad0424f3 is 10101101000001000010010011110011

It would become:

  1. x^31+ x^29+ x^27+ x^26+ x^24+ x^18+ x^13+ x^10+ x^7+ x^6+ x^5+ x^4+ x^1+ x^0

Can you help me understand which one is correct? what about 64 bit ECMA polynomial,

0xC96C5795D7870F42

I want to know the number of terms in each polynomial 0xad0424f3 and 0xC96C5795D7870F42.


Solution

  • That page is on Koopman's web site, where he has his own notation for CRC polynomials. Since all CRC polynomials have a 1 term, he drops that term, divides the polynomial by x, and represents that in binary. That's what you're looking at.

    The benefit is that with a 64-bit word, you can then represent all 64-bit and shorter CRC polynomials, with the length of the CRC denoted by the most significant 1 in the word.

    The downside is that only Koopman uses that notation, as far as I know, resulting in some confusion by others. Like yourself.

    As for your 64-bit CRC, that polynomial that you note is from the Wikipedia page is actually the reversed version, and is not in Koopman's notation. The expansion into a polynomial is shown right there, underneath the hex representation. It has 34 terms.