50% found this document useful (2 votes)
191 views

Error Detection and Correction in Communication Systems Project

This document discusses various techniques for error detection and correction in communication systems. It describes cyclic redundancy check (CRC), Hamming codes, parity checks, automatic repeat request (ARQ), forward error correction (FEC), and checksums. These techniques are used to identify and sometimes fix errors that occur during data transmission. The document also includes C++ code examples to generate a parity bit and check for errors.
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
50% found this document useful (2 votes)
191 views

Error Detection and Correction in Communication Systems Project

This document discusses various techniques for error detection and correction in communication systems. It describes cyclic redundancy check (CRC), Hamming codes, parity checks, automatic repeat request (ARQ), forward error correction (FEC), and checksums. These techniques are used to identify and sometimes fix errors that occur during data transmission. The document also includes C++ code examples to generate a parity bit and check for errors.
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/ 16

ERROR DETECTION AND

CORRECTION IN
COMMUNICATION SYSTEMS
NAME : SALEBA ABU KHADER
MOHAMMED ATIYAT
ID : 202120315
201811677
INTRODUCTION TO ERROR DETECTION AND
CORRECTION

• Error detection and correction techniques are crucial in


computer networks to ensure the accurate and reliable
transmission of data. These techniques help identify and, in
some cases, correct errors that may occur during data
transmission due to noise, interference, or other issues.
SOME KEY CONCEPTS RELATED TO ERROR
DETECTION AND CORRECTION
• Cyclic Redundancy Check (CRC)
• Hamming Code
• Parity Check
• Automatic Repeat request (ARQ)
• Forward Error Correction (FEC)
• Checksums
• Reed-Solomon Code

Further into that:


CYCLIC REDUNDANCY CHECK (CRC)
• Purpose: CRC is a widely used error detection technique.

• How it Works: A polynomial code is generated from the data at the sender's end,
and the receiver uses the same polynomial to check for errors. If the received data
does not match the CRC value, an error is detected.

• Usage: Commonly used in network communication, including Ethernet networks.


HAMMING CODE:

• Purpose: Hamming codes are error-correcting codes used for both error
detection and correction.

• How it Works: Extra parity bits are added to the data to create a code word
with specific properties. The receiver uses these parity bits to identify and
correct errors.

• Usage: Often used in RAM (Random Access Memory) to detect and correct
errors in data storage.
PARITY CHECK
• Purpose: Parity is a simple error detection technique.

• How it Works: An additional parity bit is added to each byte or


group of bits. The total number of set bits (either 0 or 1) is made
even (even parity) or odd (odd parity). The receiver checks the
parity to detect errors.

• Usage: Commonly used in serial communication and memory


systems.
AUTOMATIC REPEAT REQUEST (ARQ)
• Purpose: ARQ is a protocol for error control in data transmission.

• How it Works: The receiver detects errors and requests the sender to
retransmit the data. The process continues until error-free data is
received.

• Usage: Used in various communication protocols, including TCP


(Transmission Control Protocol).
FORWARD ERROR CORRECTION (FEC)
• Purpose: FEC is a method for error correction without the need for
retransmission.

• How it Works: Redundant information is added to the transmitted


data. The receiver can use this redundant information to correct
errors without requesting retransmission.

• Usage: Common in satellite communication and digital television


broadcasting.
CHECKSUMS
• Purpose: Checksums are used for error detection.
• How it Works: A checksum is a value calculated from the
transmitted data. The receiver calculates its own checksum and
compares it with the transmitted checksum. If they do not match, an
error is detected.
• Usage: Commonly used in network protocols like UDP (User
Datagram Protocol).
REED-SOLOMON CODE
• Purpose: Reed-Solomon codes are widely used for error
correction, especially in data storage and transmission.

• How it Works: These codes use algebraic techniques to create a


set of code words with built-in error correction capabilities.

• Usage: Commonly used in CDs, DVDs, QR codes, and some wireless


communication systems.
CODE IMPLEMENTED IN C++
#include <iostream>

#include <string>

std::string parity_bit(const

std::string& data, const

std::string& type)

{ int count = 0; for (char bit : data) { if (bit == '1') { count += 1; }

if (type == "even") {

if (count % 2 == 0) {

return data + "0"; }

else { return data + "1"; }

else if (type == "odd") {

if (count % 2 == 0) { return data + "1"; }

else { return data + "0"; }

else { return "Invalid parity type"; }

}
• std::string parity_check(const std::string& data, const std::string& type)
• { int count = 0;
• for (char bit : data) { if (bit == '1') { count += 1; }
• }
• if (type == "even") {
• if (count % 2 == 0) { return "No error detected"; }
• else { return "Single bit error detected"; }
• }
• else if (type == "odd") {
• if (count % 2 == 1) { return "No error detected"; }
• else { return "Single bit error detected"; }
• }
• else { return "Invalid parity type"; }
• }
• int main()
• {
• std::string data = "10101010";
• std::string type = "even";
• std::cout << "Original data: " << data << std::endl;
• std::cout << "Parity type: " << type << std::endl;
• std::string data_with_parity = parity_bit(data, type);
• std::cout << "Data with parity bit: " << data_with_parity << std::endl;
• return 0;
•}
• Result of the c++ code :

• Original data: 10101010


• Parity type: even Data with parity bit: 101010100
CONCLUSION:

• These techniques can be used individually or in combination,


depending on the specific requirements of the communication
system. The choice of error detection and correction method
depends on factors such as the desired level of reliability, the
nature of the communication channel, and the resources available.
REFERENCES
• https://www.tutorialspoint.com/data_communication_computer_network/netw
ork_addressing.htm

• https://www.geeksforgeeks.org/error-detection-in-computer-networks/

• https://www.scaler.com/topics/error-detection-and-correction-in-computer-
networks/

You might also like