# Cyclic Redundancy Check

Learn what is cyclic redundancy check (CRC), how it is calculated and calculate it on a simulation

142 Participants 30 Minutes

In this lab, we explore the significance of CRC in error detection within digital data transmission. We cover different CRC widths, explaining how they affect error detection capability. Our focus is understanding the calculation process of CRC, involving polynomial division. We demonstrate CRC-8 calculation for a sample data set and verify it using simulation tools, showcasing the practical application of CRC. Through this exercise, participants gain insights into CRC's role in ensuring data integrity and learn to design reliable error detection mechanisms for digital communication systems.

## What is CRC(Cyclic Redundancy Check)

CRC (Cyclic Redundancy Check) is a robust error-detecting technique employed in data transmission. It utilizes polynomial division to generate a checksum, which is appended to the data and verified by the receiver. The choice of polynomial defines the CRC algorithm, and both the sender and receiver must agree on it for accurate calculation. CRC is highly effective in detecting common errors during data transmission, ensuring data integrity in various communication protocols.

Lookup Table: It is a data structure storing precomputed CRC values for rapid retrieval during checksum calculation, reducing computational overhead.

## CRC Width / Bit length

It refers to the size of the checksum produced by the CRC algorithm. It indicates the number of bits in the resulting CRC checksum.

For example:

• CRC-8 produces an 8-bit checksum.

• CRC-16 produces a 16-bit checksum.

• CRC-32 produces a 32-bit checksum.

• CRC-64 produces a 64-bit checksum.

Wider CRC widths, larger the checksum which offer increased error detection capabilities but demand more computational resources

## CRC Algorithms

Different types of CRC algorithms vary primarily in the selection of the polynomial used for error detection. Here are some common CRC algorithms:

• CRC-8: This algorithm uses an 8-bit polynomial for error detection. It generates a checksum of 8 bits, making it suitable for applications requiring a compact checksum.

• CRC-16: CRC-16 employs a 16-bit polynomial, resulting in a checksum of 16 bits. It offers higher error detection capability compared to CRC-8 and is commonly used in protocols like Modbus, USB, and Ethernet.

• CRC-32: Utilizing a 32-bit polynomial, CRC-32 generates a checksum of 32 bits. It provides even stronger error detection capabilities and is extensively used in protocols like ZIP, Ethernet, and others requiring robust error checking.

• CRC-CCITT: This variant uses polynomials defined by the Consultative Committee for International Telephony and Telegraphy (CCITT). It's commonly used in telecommunications applications.

• CRC-IEEE 802.3: Also known as CRC-32C, this variant is used in Ethernet frames and implements a polynomial defined by the IEEE 802.3 standard.

Each CRC algorithm is tailored to specific applications, offering varying levels of error detection capability and efficiency. The choice of algorithm depends on factors such as the required level of error detection, available computational resources, and compatibility with existing protocols.

## How it works

Here's how CRC works:

• Dataword and CRC Generation: The sender takes the original dataword (the information to be transmitted) and applies a CRC algorithm. This involves performing polynomial division on the dataword by a predetermined polynomial, resulting in a CRC value, also known as the codeword.

• Combining Dataword and CRC: The CRC value is then appended to the original dataword, creating a new bit sequence that includes both the dataword and the CRC value. This combined sequence is often referred to as the codeword.

• Transmission to Receiver: The codeword is transmitted to the receiver through the communication channel.

• Receiver Verification: Upon receiving the codeword, the receiver performs the same CRC calculation on the received dataword portion using the agreed-upon polynomial.

• Error Detection: The receiver compares the calculated CRC value from the received dataword with the CRC value appended to the received codeword. If the calculated CRC matches the CRC value transmitted along with the dataword, it indicates that the data is likely intact. However, if there's a mismatch, it implies that errors might have occurred during transmission.

• Acceptance or Rejection: Based on the CRC match result, the receiver either accepts the received data as error-free or rejects it due to detected errors.

This process of appending a CRC value to the data for transmission and subsequently verifying it at the receiver's end ensures data integrity and aids in detecting transmission errors efficiently.

## Conclusion

In conclusion, CRC (Cyclic Redundancy Check) stands as a cornerstone in ensuring data integrity during transmission, offering a robust method for error detection. By utilizing polynomial division to generate checksums, CRC algorithms provide varying levels of error detection capabilities, as indicated by their bit lengths. From CRC-8 to CRC-64, each algorithm caters to specific applications, balancing error detection efficiency with computational resources. Through a systematic process of appending CRC values to datawords and subsequent verification at the receiver's end, CRC ensures reliable communication across various protocols. Moreover, the implementation of lookup tables and the understanding of CRC widths further enhance its practical utility. Ultimately, CRC remains a vital component in modern communication systems, safeguarding data integrity and facilitating seamless transmission in diverse environments.

### Cyclic Redundancy Check

#### Support

Have a doubt? Got stuck somewhere?

## Related Labs

### Bus vs Hybrid Topology

#### Computer Networking

• 30 m
• Beginner
• 132
Learn and compare Bus and Hybrid networking topology.

### ARP Basics

#### Computer Networking

• 30 m
• Beginner
• 116
Learn what is ARP and how it works in Packet Tracer exercise

### DNS Basics with nslookup

#### Computer Networking

• 30 m
• Beginner
• 31
Learn DNS basics by exploring different types of records (i.e. A, AAAA, CNAME, TXT)

### DNS Basics (Packet Tracer)

#### Computer Networking

• 30 m
• Beginner
• 297
Learn how DNS queries work when a new website is opened on pre-built Packet Tracer setup