How is the CRC generated at the sender side

Introduction

Cyclic redundancy check (CRC) is a type of error-detection method that is widely used in modern computer networks. A checksum procedureIt is a procedure used for the purpose of error detection during data transmission and storage. called CRC is used to identify data inconsistenciesSame data but in different formats, such as bit errorsThere are two types of bit errors single bit error and burst error. during data transmission. The data is accompanied by a checksum that CRC has calculated to aid the receiver in identifying such problems.

Key points

Some critical points regarding CRC's calculation procedure are as follows:

  • The actual input data is represented as a single, long binary bit stream (dividend), also defined as (D+R)(D+R) that is divided by a second binary integer (divisor) known as GG. Here,DD represents data bits, RR is CRC bits, and GG is known as a generator. The most significant bit of the GG must be 11.

The binary numbers (dividend and divisor) are regarded as binary polynomials. For example, the binary of the given polynomial is obtained as:

Expand the polynomial based on the highest power term included. Add 11 with terms that are present and 00 with remaining terms.

In this fashion, we get the binary of the polynomial.

  • The checksum value is the remainder obtained by dividend/divisordividend / divisor.
  • The division is the foundation of CRC. The polynomial division is different from the integer division. The CRC calculation's underlying arithmetic is based on the XOR.

Calculation

CRC calculation is carried out in two steps as follows:

  • CRC generation at the sender side
  • CRC verification on the receiver side

For this answer, we'll only discuss step 1.

CRC generation at the sender side

While generating CRC at the sender side, we must keep the following points in mind:

  • Find the length of the divisor LL.
  • Adjoin L1L-1 times 0 bit to the original message to get the (D+R)(D+R) format of the dividend.
  • Perform binary division.
  • The remainder is equal to CRC.

Example

Given the polynomial G=x3+x2+1 G = x^3+x^2+1and D=x5+x1 D = x^5+x^1. Calculate CRC.

The binary of the polynomial x3+x2+1x^3+x^2+1 is as:

The binary of the other polynomial x5+x1+1x^5+x^1+1 is:

Append 41=34-1=3 bits with 00to the dividend.

The following slides depict the calculation of CRC in detail:

Binary division
1 of 8

The calculated CRC is equal to 101101 .

Note: CRC is equal to L1L-1 least significant bits.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved