0% found this document useful (0 votes)
59 views3 pages

Implementing Cyclic Redundancy Check

The document outlines an experiment focused on implementing the Cyclic Redundancy Check (CRC) technique for error detection in transmitted data. It explains the process of generating CRC bits at the sender's side and verifying data integrity at the receiver's side, including specific rules and performance characteristics of CRC. The objective is to learn about error correction techniques and apply CRC to ensure data accuracy.

Uploaded by

1032230538
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views3 pages

Implementing Cyclic Redundancy Check

The document outlines an experiment focused on implementing the Cyclic Redundancy Check (CRC) technique for error detection in transmitted data. It explains the process of generating CRC bits at the sender's side and verifying data integrity at the receiver's side, including specific rules and performance characteristics of CRC. The objective is to learn about error correction techniques and apply CRC to ensure data accuracy.

Uploaded by

1032230538
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Experiment:-4

AIM:- Implementation of Cyclic Redundancy Check technique


Software Requirement: Any programming platform
Objective:
 Learn about the different types error correction and detection codes
 Learn the cyclic redundancy Check technique for a given data bits
Theory :
Cyclic Redundancy Check (CRC) is another error detection technique to detect errors in data
that has been transmitted on a communications link. A sending device applies a 16 or 32 bit
polynomial to a block of data that is to be transmitted and appends the resulting cyclic
redundancy check (CRC) to the block. The receiving end applies the same polynomial to the
data and compares its result with the result appended by the sender. If they agree, the data has
been received successfully. If not, the sender can be notified to resend the block of data. CRC
Generation techniques are as follows:

At Sender Side:

Sender has a generator G(x) polynomial.

Sender appends (n-1) zero bits to the data.


Where n= no of bits in generator

Dividend appends the data with generator G(x) using modulo 2 division (arithmetic).

Remainder of (n-1) bits will be CRC.

Codeword: It is combined form of Data bits and CRC bits i.e. Codeword = Data bits + CRC
bits

Example

Assume that –
(a) data is 10110.
(b) code generator is 1101. (Code generator can also be mentioned in polynomial :
(x^3+x^2+1 )

Calculate CRC Bits:

Now, we will see how to calculate CRC bits using above data.

While calculating the CRC bits, we pad (n-1) 0’s to the message bits, where ‘n’ = no of bits in
the code generator
In the above code, code generator is 1101. So, there is total 4 bits. So, we will append 000
with the data.

Finally, Cyclic Redundancy check will be generated as shown below –

CRC calculation by sender

Cyclic redundancy check is 101. Thus, the sender sends 10110101 to the receiver.

At Receiver Side

a) Receiver has same generator G(x).


b) Receiver divides received data (data + CRC) with generator.
c) If remainder is zero, data is correctly received.
d) Else, there is error.

Assume the received message is 10110110.

Calculate CRC Bits:

It does not add any padding bits, rather calculates from the entire received code word.
CRC calculation by receiver

The CRC bits are calculated to be different. Thus, there is an error detected.

CRC Rules:

1. CRC generator should not contain ‘x’.


2. If (x+1) is generator, it can detect odd no of error.
3. If generator is xn, then last n bit errors can be detected.

Performance of Cyclic Redundancy Check

1. CRC is a very effective error detection method. If the divisor is chosen according to
the above mentioned rules,
2. CRC can detect all burst errors that affect an odd number of bits.
3. CRC can detect all burst errors of length less than or equal to the degree of the
polynomial.
4. CRC can detect with a very high probability, burst errors of length greater than the
degree of the polynomial.

Course Outcome :

a) Understand the different types of Error correction and detection techniques


b) Implement CRC to correct the error in given data

Common questions

Powered by AI

CRC achieves high probability in detecting errors by utilizing a generator polynomial to create a checksum for data transmission. Even with a polynomial of limited degree, CRC can detect all burst errors of length less than or equal to the polynomial degree and can also detect longer bursts with high probability due to the mathematical properties of polynomials and their unique contributions to the division remainder. The high detection probability is due to the even distribution of error detection capabilities across various error patterns, especially for short bursts .

While CRC is efficient and highly effective for detecting burst errors, it cannot correct errors but only signals for retransmission. Its detection capacity is limited by the degree of the polynomial used; errors that align to the specific multiple of the generator polynomial may go undetected. Also, CRC is designed for binary data and might not be suitable for non-binary transmissions without modification. Furthermore, its performance is reliant on data patterns and the chosen polynomial's ability to detect anticipated error occurrences .

The choice of polynomial in a CRC directly influences its ability to detect errors. A well-chosen polynomial can maximize the error detection capability of CRC by ensuring that all burst errors affecting an odd number of bits can be detected. Additionally, it can effectively detect all burst errors that are shorter in length than the degree of the polynomial, and with high probability, those longer than the polynomial degree. Specific CRC rules outline that the generator should not include 'x' in its representation and using (x+1) can ensure detection of an odd number of errors .

At the sender's side, the process involves appending n-1 zero bits to the data, where n is the number of bits in the chosen generator polynomial. The sender then performs modulo 2 division of the data with the generator polynomial, obtaining a remainder as the CRC bits, which are appended to the data block forming the codeword. The receiver repeats the division with the received data and generator polynomial; if the remainder is zero, the data is considered error-free. Otherwise, an error is detected .

The implementation of any programming platform is pivotal for CRC due to the need for precise execution of polynomial division and bit operations, which are non-trivial in manual operation. Programming platforms provide the environment to automate CRC calculation and checking processes, ensure accuracy, replicate the operations consistently, and integrate CRC into broader data communication systems effectively. Additionally, using a programming platform enables customization and optimization to meet specific system requirements .

CRC performance is influenced by the choice of polynomial, the method of polynomial division, and the nature of the data being transmitted. A polynomial well-suited to the data pattern of expected errors will result in higher detection rates. Furthermore, the efficiency of the division process and how the CRC is appended and interpreted also play roles. Other factors include the length of the data blocks and the types of errors anticipated, as CRC is more effective against burst errors .

CRC is primarily an error detection technique rather than correction. It identifies inconsistencies in data transmission by calculating check values but does not provide a means to automatically fix these errors. Upon detection, it typically signals a retransmission request to the sender for corrective action. The inability to correct errors directly stems from its design, which focuses on detecting deviations rather than having a mechanism for identifying and applying error corrections like in some error correction codes (e.g., Hamming code).

The receiver uses the same polynomial as the sender to perform modulo 2 division on the entire received data block, which includes both the original data and the appended CRC bits. If the division results in a remainder of zero, the data block is deemed error-free as it indicates that the data and appended CRC bits matched. If there is any remainder other than zero, an error is detected, signaling that the data was altered during transmission .

Cyclic Redundancy Check (CRC) operates on the principle of polynomial division. At the sender's side, a block of data is treated as a binary number which is divided by a predetermined polynomial (also represented as a binary number), generating a remainder that becomes the CRC code. This CRC code is appended to the data block. When the data is received, the receiving device performs the same polynomial division and checks if the remainder matches the appended CRC code. If they agree, it's assumed there were no transmission errors; otherwise, an error is present .

In CRC, CRC bits are calculated via polynomial division and appended to the data block without redundancy aimed at error correction, which focuses purely on detection. Conversely, error correction techniques like Hamming code involve adding redundant bits that allow the identification and correction of errors within specific limits. Hamming code includes specific bit positions for parity checks, designed for single error correction, unlike CRC's sole detection intention .

You might also like