Error Detection and Correction in Communication Systems Project
Error Detection and Correction in Communication Systems Project
CORRECTION IN
COMMUNICATION SYSTEMS
NAME : SALEBA ABU KHADER
MOHAMMED ATIYAT
ID : 202120315
201811677
INTRODUCTION TO ERROR DETECTION AND
CORRECTION
• 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.
• 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: The receiver detects errors and requests the sender to
retransmit the data. The process continues until error-free data is
received.
#include <string>
std::string parity_bit(const
std::string& type)
if (type == "even") {
if (count % 2 == 0) {
}
• 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 :
• https://www.geeksforgeeks.org/error-detection-in-computer-networks/
• https://www.scaler.com/topics/error-detection-and-correction-in-computer-
networks/