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

error detection in data communication network

Uploaded by

Maanav Singala
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

error detection in data communication network

Uploaded by

Maanav Singala
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Error Detection in Computer Networks



Error is a condition when the receiver’s information does not


match the sender’s. Digital signals suffer from noise during
transmission that can introduce errors in the binary bits traveling
from sender to receiver. That means a 0 bit may change to 1 or a
1 bit may change to 0.
Data may get scrambled by noise or get corrupted whenever a
message is transmitted. To prevent such errors, error-detection
codes are added as extra data to digital messages. This helps in
detecting any errors that may have occurred during message
transmission.
Types of Errors
Single-Bit Error
A single-bit error refers to a type of data transmission error that
occurs when one bit (i.e., a single binary digit) of a transmitted
data unit is altered during transmission, resulting in an incorrect
or corrupted data unit.

Single-Bit Error

Multiple-Bit Error
A multiple-bit error is an error type that arises when more than
one bit in a data transmission is affected. Although multiple-bit
errors are relatively rare when compared to single-bit errors, they
can still occur, particularly in high-noise or high-interference
digital environments.
Multiple-Bit Error

Burst Error
When several consecutive bits are flipped mistakenly in digital
transmission, it creates a burst error. This error causes a
sequence of consecutive incorrect values.

Burst Error

Error Detection Methods


To detect errors, a common technique is to introduce redundancy
bits that provide additional information. Various techniques for
error detection include:
 Simple Parity Check
 Two-Dimensional Parity Check
 Checksum
 Cyclic Redundancy Check (CRC)
Simple Parity Check
Simple-bit parity is a simple error detection method that involves
adding an extra bit to a data transmission. It works as:
 1 is added to the block if it contains an odd number of 1’s, and
 0 is added if it contains an even number of 1’s
This scheme makes the total number of 1’s even, that is why it is
called even parity checking.

Advantages of Simple Parity Check

 Simple parity check can detect all single bit error.


 Implementation: Simple Parity Check is easy to implement in
both hardware and software.
 Minimal Extra Data: Only one additional bit (the parity bit) is
added per data unit (e.g., per byte).
 Fast Error Detection: The process of calculating and
checking the parity bit is quick, which allows for rapid error
detection without significant delay in data processing or
communication.
 Single-Bit Error Detection: It can effectively detect single-bit
errors within a data unit, providing a basic level of error
detection for relatively low-error environments.
Disadvantages of Simple Parity Check

 Single Parity check is not able to detect even no. of bit error.
 For example, the Data to be transmitted is 101010.
Codeword transmitted to the receiver is 1010101 (we have
used even parity).
Let’s assume that during transmission, two of the bits of code
word flipped to 1111101.
On receiving the code word, the receiver finds the no. of ones
to be even and hence no error, which is a wrong assumption.

Two-Dimensional Parity Check

Two-dimensional Parity check bits are calculated for each row,


which is equivalent to a simple parity check bit. Parity check bits
are also calculated for all columns, then both are sent along with
the data. At the receiving end, these are compared with the parity
bits calculated on the received data.

Advantages of Two-Dimensional Parity Check

 Two-Dimensional Parity Check can detect and correct all single


bit error.
 Two-Dimensional Parity Check can detect two or three bit error
that occur any where in the matrix.

Disadvantages of Two-Dimensional Parity Check


 Two-Dimensional Parity Check can not correct two or three bit
error. It can only detect two or three bit error.
 If we have a error in the parity bit then this scheme will not
work.

Checksum

Checksum error detection is a method used to identify errors in


transmitted data. The process involves dividing the data into
equally sized segments and using a 1’s complement to calculate
the sum of these segments. The calculated sum is then sent along
with the data to the receiver. At the receiver’s end, the same
process is repeated and if all zeroes are obtained in the sum, it
means that the data is correct.

Checksum – Operation at Sender’s Side


 Firstly, the data is divided into k segments each of m bits.
 On the sender’s end, the segments are added using 1’s
complement arithmetic to get the sum. The sum is
complemented to get the checksum.
 The checksum segment is sent along with the data segments.

Checksum – Operation at Receiver’s Side


 At the receiver’s end, all received segments are added using
1’s complement arithmetic to get the sum. The sum is
complemented.
 If the result is zero, the received data is accepted; otherwise
discarded.
Cyclic Redundancy Check (CRC)

 Unlike the checksum scheme, which is based on addition, CRC


is based on binary division.
 In CRC, a sequence of redundant bits, called cyclic redundancy
check bits, are appended to the end of the data unit so that the
resulting data unit becomes exactly divisible by a second,
predetermined binary number.
 At the destination, the incoming data unit is divided by the
same number. If at this step there is no remainder, the data
unit is assumed to be correct and is therefore accepted.
 A remainder indicates that the data unit has been damaged in
transit and therefore must be rejected.
CRC
Working
We have given dataword of length n and divisor of length k.
Step 1: Append (k-1) zero’s to the original message
Step 2: Perform modulo 2 division
Step 3: Remainder of division = CRC
Step 4: Code word = Data with append k-1 zero’s + CRC
Note:
 CRC must be k-1 bits
 Length of Code word = n+k-1 bits
Example: Let’s data to be send is 1010000 and divisor in the form
of polynomial is x3+1. CRC method discussed below.

Long division examples:


 Example 1: Evaluate 1001011210010112 ÷ 112112 using the
long-division method.

Solution:

Here, Dividend = 1001011210010112, Divisor = 112112. Let us use


the long-division method as follows:
Answer: Quotient = 110012110012, Remainder = 0.
 Example 2: Evaluate 100102100102 ÷ 112112 using the long-
division method.

Solution:

Here, Dividend = 100102100102, Divisor = 112112. Let us use the


long-division method to solve this:
Answer: Quotient = 11021102, Remainder = 0
Example: Previous year GATE questions based on error
detection: GATE CS 2009 Question 48 GATE CS 2007 Question 68.
Advantages of Error Detection
 Increased Data Reliability: Error detection ensures that the
data transmitted over the network is reliable, accurate, and
free from errors. This ensures that the recipient receives the
same data that was transmitted by the sender.
 Improved Network Performance: Error detection
mechanisms can help to identify and isolate network issues
that are causing errors. This can help to improve the overall
performance of the network and reduce downtime.
 Enhanced Data Security: Error detection can also help to
ensure that the data transmitted over the network is secure
and has not been tampered with.
Disadvantages of Error Detection
 Overhead: Error detection requires additional resources and
processing power, which can lead to increased overhead on the
network. This can result in slower network performance and
increased latency.
 False Positives: Error detection mechanisms can sometimes
generate false positives, which can result in unnecessary
retransmission of data. This can further increase the overhead
on the network.
 Limited Error Correction: Error detection can only identify
errors but cannot correct them. This means that the recipient
must rely on the sender to retransmit the data, which can lead
to further delays and increased network overhead.
Conclusion
In conclusion, error detection in computer networks is crucial for
ensuring data is transmitted accurately and reliably. By using
various techniques, like checksums, parity bits, and cyclic
redundancy checks, networks can identify and correct errors that
occur during data transmission. These methods help maintain the
integrity of the data, prevent communication problems, and
ensure that information is delivered correctly from one device to
another. This reliability is essential for the smooth operation of all
digital communications and applications that rely on network
connectivity.
Frequently Asked Questions on Error
Detection – FAQs
How many types of error detection are there?
There are several types of error detection methods commonly
used in computer networks. Some common error detection
methods are:
 Simple Parity Check
 Two-Dimensional Parity Check
 Checksum
 Cyclic Redundancy Check (CRC)

Which is the best method of error detection?


Cyclic Redundancy Check (CRC) is often considered one of the
best and most widely used methods due to its high effectiveness
and efficiency.
How many types of computer errors are there?
There are three types of error in transferring the data. These are:
 Single bit error
 Multiple bit error
 Burst error

Lecture: Error Detection and Correction in Data Communication

Introduction: In data communication, errors can occur during the transmission of data from
the sender to the receiver. These errors can arise due to various factors like noise,
interference, and signal distortion. To ensure data integrity, mechanisms for error detection
and error correction are essential.

1. Types of Errors in Data Communication

Errors can be classified into two types:

 Single-bit errors: Occur when only one bit in the transmitted data is altered.
 Burst errors: Occur when two or more consecutive bits in the transmitted data are altered.

2. Error Detection

Error detection techniques are used to determine if data has been corrupted during
transmission. Here are some commonly used error detection methods:

a. Parity Check

 Single Parity Bit: Adds an extra bit to the data to make the number of 1s either even (even
parity) or odd (odd parity).
o If the number of 1s changes due to an error, the parity bit will help detect it.
 Example:
o Original data: 1010001
o Even parity bit: 1 (because there are three 1s, so a 1 is added to make it even)
o Transmitted data: 10100011

b. Checksum

 A checksum is calculated by dividing data into equal blocks, adding the blocks together, and
appending the result (the checksum) to the data.
 The receiver recalculates the checksum from the received data and compares it with the
transmitted checksum.
 If there is a mismatch, an error is detected.
 Example:
o Blocks of data: 1101 0110 1001
o Checksum: 1100 (sum of the blocks)

c. Cyclic Redundancy Check (CRC)

 CRC uses polynomial division to detect errors. The data bits are treated as a polynomial and
divided by a predefined polynomial. The remainder (CRC code) is appended to the data.
 The receiver divides the received data (including CRC code) by the same polynomial. If the
remainder is zero, the data is error-free.
 Example:
o Data: 10111010
o Divisor: 1011 (polynomial)
o Remainder (CRC code): 010

d. Hamming Code (Used for both detection and correction)

 Hamming code introduces redundant bits to data, allowing not only error detection but also
error correction. The number of redundant bits depends on the length of the data.
 Example:
o Data: 1010
o Hamming code: Adds redundant bits to the data to allow for error detection and
correction.

3. Error Correction

Error correction techniques go beyond detecting errors—they correct them without needing
retransmission.

a. Automatic Repeat Request (ARQ)

 ARQ uses acknowledgments and timeouts to detect errors. When an error is detected, the
receiver requests the sender to resend the corrupted data.
o Types of ARQ:
 Stop-and-Wait ARQ: The sender stops and waits for an acknowledgment
(ACK) after transmitting each frame.
 Go-Back-N ARQ: The sender can send several frames before receiving an
acknowledgment but must retransmit from the erroneous frame if an error
is detected.
 Selective Repeat ARQ: Only the erroneous frames are retransmitted.

b. Forward Error Correction (FEC)

 FEC adds redundant data to the transmitted information, allowing the receiver to detect and
correct errors without the need for retransmission.
 Examples of FEC:
o Reed-Solomon Codes: Commonly used in CDs, DVDs, and QR codes.
o Convolutional Codes: Used in wireless communication systems, where the data is
encoded in a continuous stream.

4. Hybrid Techniques

Some systems use a combination of both error detection and correction methods:
 Hybrid ARQ (HARQ): Combines ARQ and FEC, where the receiver tries to correct the errors
using FEC before requesting retransmission.

5. Practical Applications

 Wireless Communication: Error detection and correction are crucial due to the noisy nature
of wireless channels.
 Data Storage Devices: Parity bits and ECC (Error Correction Code) are used to ensure data
integrity in hard drives, SSDs, and memory.
 Satellite and Space Communication: Since retransmission is costly, FEC is heavily used.
 Internet Protocols: TCP uses ARQ for reliable data transmission, while UDP sacrifices error
correction for speed, relying on application-layer checks.

6. Summary

 Error detection ensures that errors are identified during transmission, while error correction
not only identifies errors but also corrects them.
 Techniques like parity check, CRC, and checksums are commonly used for detection, while
ARQ and FEC are widely used for correction.

Conclusion: Error detection and correction are vital in ensuring reliable communication in
networks. As data transmission evolves with increasing bandwidth demands, more
sophisticated methods will continue to emerge, ensuring minimal data loss and maintaining
communication integrity.

You might also like