Cyclic Redundancy Check (CRC) Explained
Advertisement
This page provides an overview of CRC, or Cyclic Redundancy Check. It primarily covers CRC32 and CRC16, commonly utilized in WLAN and WiMAX IEEE Standards.
Two prevalent error detection techniques are parity checks and Cyclic Redundancy Checks (CRCs). These methods help determine if a received packet arrived correctly (without errors) or with errors.
Let’s say we need to transmit k
bytes. In CRC, a few extra bytes are appended to these k
bytes, resulting in a total of n
bytes. These n
bytes are then transmitted. At the receiver, a CRC is calculated based on the received data and compared with the transmitted CRC value. This comparison allows the receiver to make a decision about whether errors are present.
There are several ways to implement CRC, including:
- Modulo 2 arithmetic operations
- Polynomial method
- Digital logic method
In the modulo 2 method, the modulo 2 sum of the k
bytes is calculated and appended as a checksum. At the receiver, this checksum is compared against the checksum calculated from the received bytes.
The polynomial method is the most popular CRC technique used in modern wireless technologies. Various CRC polynomials exist, such as CRC32 and CRC16. They are used in wireless communication systems like Mobile WiMAX (OFDMA) and Fixed WiMAX (OFDM) implementations, as well as in networking protocols.
Here are examples of CRC polynomials:
- CRC16 = X^16 + X^15 + X^2 + 1
- CRC32 = X^32 + X^26 + X^23 + X^22 + X^16 + X^12 + X^11 + X^10 + X^8 + X^7 + X^5 + X^4 + X^2 + X + 1
Example:
Message K = 40 40 1A 06 C4 5A BC F6 57 21 E7 55 36 C8 27 A8 D7 1B 43 2C A5 48
CRC32 for these bytes = 1B D1 BA 21
CRC8 and CRC32 MATLAB CODE
- CRC8
- CRC32