CRC

<< Click to Display Table of Contents >>

Navigation:  Glossary / Terms Used >

CRC

Cyclic Redundancy Code. A CRC is a method to detect whether a received sequence/message has been corrupted, e.g. by transmission errors. This is done by constructing an additional checksum value that is a function of the message data, and then appending this value to the original message. The receiver calculates the checksum from the received data and compares it to the transmitted CRC value to see if the message is unmodified. CRCs are commonly used because they allow the detection of typical transmission errors (bit errors, burst errors) with a very high accuracy.

 

CRC algorithms are based on polynomial arithmetic, and come in many different versions. Common algorithms are CRC-CCITT, CRC-16 and CRC-32. An example of an application protocol that uses a CRC is MODBUS over Serial Line.

 

A very popular article about CRCs is "Easier said than done (Michael Barr) - A guide to CRC calculation": http://www.netrino.com/Connecting/2000-01/

 

Docklight Scripting's CRC functionality (DL.CalcChecksum) was inspired by the above article and the proposed Boost CRC library:

http://www.boost.org/libs/crc/index.html

 

Last not least, if you are truly fascinated by CRC alchemy, you will, sooner or later, run into the following article:

"A Painless Guide to CRC Error Detection Algorithms" by Ross N. Williams

http://www.ross.net/crc/