Introduction
The cyclic redundancy check (CRC) is a type of error-detection method widely used in modern computer networks. It is a checksum procedureIt is a procedure we use to detect errors during data transmission and storage. that we use to identify data inconsistencies, such as bit errors during data transmission. The data is accompanied by a checksum that CRC calculates to help us identify such problems.
Calculation
We carry out the CRC calculation in two steps:
- Generating the CRC on the sender side
- Verifying the CRC on the receiver side
In this answer, we discuss the second one.
Note: To learn how to generate the CRC on the sender side, we can refer here.
Verifying CRC on the receiver side
We send the CRC value, or the remainder, to the receiver with the input data. The receiver has two options for validating the data received:
- It can compute the CRC via binary division, and compare the calculated and received CRC values.
- It can directly append the CRC value to the data. The receiver then calculates the CRC using the entire input. This option is more frequently employed.
If the remainder is 0, there is no transmission bit error. However, if it is non-zero, there is an error during data transmission. So, the data bits are retransmitted.
Example
Given the divisor=G=1101 and dividend=100010101 with CRC=101, let's verify that the data transmission is error-free.
The following slides depict the detailed verification of the CRC bits.