0% found this document useful (0 votes)
2 views

Lab 4

The document outlines a lab assignment to implement Cyclic Redundancy Check (CRC) for error detection in data transmission. It includes tasks such as computing the CRC checksum through Modulo-2 division, appending it to the message, and simulating the reception of messages to check for errors. Key concepts covered include binary messages, generator polynomials, and the process of error detection using CRC.

Uploaded by

swetaku7091
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)
2 views

Lab 4

The document outlines a lab assignment to implement Cyclic Redundancy Check (CRC) for error detection in data transmission. It includes tasks such as computing the CRC checksum through Modulo-2 division, appending it to the message, and simulating the reception of messages to check for errors. Key concepts covered include binary messages, generator polynomials, and the process of error detection using CRC.

Uploaded by

swetaku7091
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
You are on page 1/ 2

LAB 4

ASSIGNMENT: Write a program to implement Cyclic Redundancy Check (CRC)


for Error Detection.

OBJECTIVE: The goal of this lab is to understand and implement Cyclic Redundancy Check
(CRC), a popular error-detection technique used in communication systems, using a programming
language. It will help to understand and learn, how CRC is computed and how it helps in detecting
errors in transmitted messages.

Task:
1. Write a program that takes an input binary message and a generator (binary string).

2. Compute the CRC checksum by performing Modulo-2 division.


3. Append the CRC to the message to form the encoded data.

4. Simulate receiving a message with and without errors.

5. Use CRC to check for errors in the received data.

Background:
Cyclic Redundancy Check (CRC) is a technique used to detect errors in data transmission. It
involves dividing the input data by a known generator, then appending the remainder (CRC code)
to the message. At the receiving end, the same polynomial is used to check if the message is error-
free.

Key concepts:

• Message: The binary data to be transmitted.


• Generator Polynomial: A known polynomial used for the CRC calculation.

• Modulo-2 Division: The process of dividing the data by the generator to compute the
remainder (CRC code).
• Remainder: The computed CRC, which is appended to the original data.
Lab Steps:
Step 1: Input Data and Polynomial

• Prompt the user to enter a binary message (data) and a generator.

• The generator may be a polynomial or a binary string (e.g., 10011).

Step 2: Implement XOR and Modulo-2 Division

• Implement an XOR operation between two binary strings. This will be used in the
division process.

• Perform Modulo-2 Division to compute the CRC code (remainder). The steps are similar
to long division, but operations are performed modulo 2 (without carry).

Step 3: Encode the Message

• After computing the CRC code, append it to the original message. This encoded data will
be transmitted to the receiver.

Step 4: Simulate Transmission and Reception

• Simulate a scenario where the receiver gets the transmitted message, and perform the
division again to check for errors.

• If the remainder is all zeros, the message is error-free. If not, an error has been detected.

Step 5: Error Detection


• Introduce a deliberate error in the transmitted message (e.g., flip a bit) and demonstrate
that the CRC detects the error.

You might also like