ERROR
DETECTION AND
CORRECTION
ERROR DETECTION AND
CORRECTION
A network must be able to transfer data from one device to another with complete accuracy.
Any time data can get corrupted in passage during transmission from one device to another.
The ability to detect when a transmission has been changed is called error detection.
In most cases when errors are detected, the message is discarded, the sender is notified, and
the message is sent again.
Some cases, it may be fixed without second transmission. This is called error correction.
The sender never knows that the message was damaged and subsequently fixed.
For reliable communications, errors must be detected and corrected.
TYPES OF ERRORS
Two types of errors
Single bit error
Burst error
Whenever an electromagnetic signal flows from one device to another, any interference from
heat, magnetism, and other forms of electricity, can change the shape or timing of the signal
If the signal is carrying encoded binary, data, such changes can alter the meaning of data.
In single-bit error, 0 is changed to 1 or 1 is changed to 0. the term single-bit error means that
only one bit of a given data is changed from 1 to 0 or 0 to 1.
Single-bit errors are the least type of error to happen in a serial data transmission but often in
parallel transmission
Burst error means that two or more than two bits in the data unit have changed from 1 to 0 or 0
to 1.
ERROR DETECTION
We transmit data from one device to another
If the receiving device does not have an original copy of the transmitted data, it is not easy to
detect error without comparison of the receiving data and the original data.
One error detection mechanism that would satisfy these requirements would be send to every
data unit twice. The receiving device then can compare both versions of data bit by bit.
Problem is this is slow
The concept of including extra information in the transmission solely for the purpose of
comparison is a good one.
But instead of repeating the entire data stream, a shorter group of bits may be appended to the
end of each unit.
This technique is called redundancy because extra bits are redundant to the information; they
are discarded as soon as the accuracy of the transmission has been determined.
The sender sends data unit after the addition of group of bits and the receiver checks the
complete bit stream through the checking functions. Subsequently, the redundant bits are
discarded.
Four types of redundancy checks are used in data communication:
Parity check
Longitudinal redundancy check (LRC)
Cyclic Redundancy Check
Checksum
PARITY CHECK
The most common approach, which involves counting all the 1 bit in the data and adding one
more bit to make the total number of 1 bit even or odd.
The extra bit is called parity redundant bit. This method is also called Vertical Redundancy
Check (VRC)
EXAMPLE
Binary data unit 1100010 (ASCII character b)
Adding together the number of 1s gives us 3, an odd number.
Before transmitting, parity generator counts the 1s and appends the parity bit, that is, 1 to the
end
The total number of 1s now is four an even number. Now the sender transmits the entire
expanded unit, that is 11000101. when it reaches the destination, the receiver puts all eight
bits through an even-parity checking function
If the receiver sees 11000101 and counts the total number of 1s in the data unit, that is four, an
even number, the data unit passes
If the data unit has been damaged during transmission and the receiver receives 11100101 in
place of 11000101, the parity checking function counts the 1s to get 5 which is an odd number.
The receiver knows that an error has been introduced in the data somewhere and therefore
rejects the whole unit.
EXAMPLE
Suppose the sender wants to send the word “world”.
In ASCII, the five characters are represented by:
w = 1110111
o = 1101111
r = 1110010
l = 1101100
d = 1100100
What is the data to be send??