Error Detection
Error Detection
Error Detection
FINAL PROJECT
Group 5|Error Detection
ERROR DETECTION
Error control mechanism may involve two possible ways:
- Error detection
- Error correction
Error Detection
- Data is transmitted in the network.
- The data can be corrupted during transmission
- Transmission Error
- For Reliable Communication, error must be detected and corrected
- Error detection and correction are implemented either at the data link layer or transport layer of
the OSI model.
Error Detection means it’s the job of the receiver to detect the error, if it is there, it will discard it
otherwise it will accept it. Error detection is very simple, just accept or reject.
Types of Error
1. Bit Error
2. Burst Error
Bit Error
In a bit error, only one bit is going to be changed so it is also known as single bit error. In a single bit
error, only 1 bit in the data unit has been changed.
Burst Error
In burst error, 2 or more bits in the data unit have changed.
How to detect the errors?
- Error detection means to decide whether the received data is correct or not without having a copy
of the original message.
● The receiver normally will not be having a copy of the original message because the
original message itself has been corrupted by transmission error.
● Now how to detect these errors? When we send only the original message, it’s very
difficult for the receiver to understand or to know whether there’s an error or not. So,
with the message some additional information has to be sent by the sender. So, this
additional information will help the receiver to understand or to find out whether there is
an error or not in the data that is being transmitted.
- To detect or correct errors, we need to send some extra bits with the data.
● The extra bits are called redundant bits.
Redundancy
- In a redundancy check, the sender gives the data to the generating function or algorithm and this
algorithm generates a code which is called the redundant code or redundant bits, or redundancy
check. And this information is appended with the message that has to be sent.
- Redundancy check or the redundancy bits are added with the message. Added means just
appended. And the whole information is now sent to the receiver.
- The message going into the receiver has two parts in the message, one is the original message and
the other one is redundant bits. Message sent to the receiver will go through a checking function
if it is matched to the original data bits it will accept the message if it is not it will reject.
- Checking function is also an algorithm that calculates redundant bits, it compares the redundant
bits with the redundant bits that was sent by the receiver again if both are matching and the
receiver understands that there are no errors in data transmission. So, it accepts it otherwise the
receiver will reject it.
Errors in the received frames are detected by means of Parity Check and Cyclic Redundancy Check
(CRC). In both cases, a few extra bits are sent along with actual data to confirm that bits received at the
other end are the same as they were sent. If the counter-check at receiver’ end fails, the bits are
considered corrupted.
Even Parity
The receiver simply counts the number of 1s in a frame. If the count of 1s is even and even parity is used,
the frame is considered to be not-corrupted and is accepted. If the count of 1s is odd and odd parity is
used, the frame is still not corrupted.
If a single bit flips in transit, the receiver can detect it by counting the number of 1s. But when more than
one bit is erro neous, then it is very hard for the receiver to detect the error.
Parity Check
One extra bit is sent along with the original bits to make a number of 1s either even in case of even parity,
or odd in case of odd parity.
The sender while creating a frame counts the number of 1s in it. For example, if parity is used and
number of 1s is even then one bit with value 0 is added. This way the number of 1s remains even. If the
number of 1s is odd, to make it even a bit with value 1 is added.
Performance of VRC
It can detect single bit errors and it can detect burst only if the number of errors is odd.
3. Check Sum
- Checksums are similar to parity bits except, the number of bits in the sums is larger than parity
and the result is always constrained to be zero. That means if the checksum is zero, an error is
detected. A checksum of a message is an arithmetic sum of code words of a certain length. The
sum is stated by means of 1’s complement and stored or transferred as a code extension of the
actual code word. At the receiver a new checksum is calculated by receiving the bit sequence
from the transmitter.
The checksum method includes parity bits, check digits and longitudinal redundancy check
(LRC). For example, if we have to transfer and detect errors for a long data sequence (also called as Data
string) then we divide that into shorter words and we can store the data with a word of same width. For
each incoming bit we will add them to the already stored data. At every instance, the newly added word is
called “Checksum”.
At the receiver side, the received bits checksum is the same as that of the transmitter's, there is no
error found.
We can also find the checksum by adding all data bits. For example, if we have 4 bytes of data as
25h, 62h, 3fh, 52h.
Example:
As of now we discussed the error detection codes. But to receive the exact and perfect data
sequence without any errors, is not done enough only by detecting the errors occurred in the data. But
also, we need to correct the data by eliminating the presence of errors, if any. To do this we use some
other codes.
At the other end, the receiver performs division operation on codewords using the same CRC
divisor. If the remainder contains all zeros the data bits are accepted, otherwise it is considered as
there some data corruption occurred in transit.
References:
Neso Academy. https://www.youtube.com/watch?v=1A_NcXxdoCc
Electronics Hub. https://www.electronicshub.org/error-correction-and-detection-codes/?
fbclid=IwAR1Qn1UHnO8wk-kkA8lkl2qh5UkpxnAc_uxPvMVkW7X3dtuz7LqBfkDNBUk
Tutorials point. https://www.tutorialspoint.com/data_communication_computer_network/
error_detection_and_correction.htm