CRC32 Algorithm Notes

Source: Internet
Author: User
Tags crc32

These days in the study of CRC32 calculation process, see the principle of CRC algorithm, but also see a lot of code implemented by the shift method, but the results are calculated with the calibration tool is inconsistent.

Toss for a long time, finally found a manual calculation CRC32 article, and then against the IEEE 802.3 standard CRC calculation process, only calculate the CRC32 calculation.

Here is a note of the main points of the calculation process:

1) CRC32 is a CRC algorithm, first refer to the principles and examples of CRC algorithm on the wiki to understand the basic calculation method.

2) The most common CRC32 algorithm is the one used in IEEE 802.3 to generate FCS fields:

A) The polynomial used by CRC32 is

b) IEEE 802.3 uses the least significant bit precedence (least significant bit first) when transmitting data, so it is necessary to convert to a valid Bitstream input based on the architecture of your machine. Similarly, the output stream is the same.

c) In order to effectively identify the beginning and end of the input stream 0, the beginning of the 32 bits to be reversed (complement), the last calculated remainder also to the bitwise inverse.

According to the above method calculation can get the desired CRC32 value.

CRC32 Algorithm Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.