0

CRC checksum can be quickly computed without using look-up tables by means of shift operations.

This wikipedia page provides the equations and code fragments for two famous CRC-16 polynomial.

Is there a source were I can found similar equations and code fragments for other 16-bit and 32-bit polynomials. Or alternatively, how is it possible to compute them?

2 Answers 2

0

The code remains the same, only the polynomials, reflections, and pre and post processing change. You can find many other common polynomials and other CRC parameters here.

1
  • The code is always the same if you are using a bit-wise function, for example the one defined here: barrgroup.com/Embedded-Systems/How-To/CRC-Calculation-C-Code. But if you use the code defined in the wiki page I linked the implementation will be different. In particular what changes is the entity of the shifts.
    – Maverik
    Feb 19, 2014 at 15:20
0

There are a few pages available where you can find used CRC polynomials for your purpose. As already mentioned in the other answers, the CRC calculations remains the same, you can change the polynomial without problems. You only have to check the number of bits used for the CRC. But this can also be tested in the online CRC calculators.

CRC calculator 1

CRC calculator 2

Polynomials1

Polynomials 2

The C++ Boost Library provides also a CRC implementation, if needed. Boost CRC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.