Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
Detection
And
Correction
Outline
1INTRODUCTION
2CHECKSUM
INTRODUCTION
Let us first discuss some issues related, directly
or indirectly, to error detection and correction.
1. Types of Errors
Whenever bits flow from one point to another,
they are subject to unpredictable changes because
of interference.
This interference can change the shape of the
signal. The term single-bit error means that only 1
bit of a given data unit (such as a byte, character,
or packet) is changed from 1 to 0 or from 0 to 10.
The term burst error means that 2 or more bits
in the data unit have changed from 1 to 0 or from
0 to 10.
2 Redundancy
The central concept in detecting or correcting
errors is redundancy.
To be able to detect or correct errors, we need to
send some extra bits with our data.
These redundant bits are added by the sender
and removed by the receiver.
Their presence allows the receiver to detect or
correct corrupted bits.
4. Coding
Redundancy is achieved through various coding
schemes.
The sender adds redundant bits through a process
that creates a relationship between the redundant
bits and the actual data bits.
The receiver checks the relationships between the
two sets of bits to detect errors.
The ratio of redundant bits to data bits and the
robustness of the process are important factors in
any coding scheme.
2.CHECKSUM
Checksum is an error-detecting technique
that can be applied to a message of any length.
In the Internet, the checksum technique is
mostly used at the network and transport layer
rather than the data-link layer.
Figure: Checksum
Concept
The idea of the traditional checksum is simple. We
show this using a simple example.
Example 1
Suppose the message is a list of five 4-bit numbers that we
want to send to a destination. In addition to sending these
numbers, we send the sum of the numbers. For example, if
the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12, 0,
6, 36), where 36 is the sum of the original numbers. The
receiver adds the five numbers and compares the result with
the sum. If the two are the same, the receiver assumes no
error, accepts the five numbers, and discards the sum.
Otherwise, there is an error somewhere and the message not
accepted.
Example 2
In the previous example, the decimal number 36 in binary is
(100100)2. To change it to a 4-bit number we add the extra
leftmost bit to the right four bits as shown below.
Example 3
Let us use the idea of the checksum in Example 2. The
sender adds all five numbers in ones complement to get the
sum = 6. The sender then complements the result to get the
checksum = 9, which is 15 6. Note that 6 = (0110)2 and
9 = (1001)2; they are complements of each other. The sender
sends the five data numbers and the checksum (7, 11, 12, 0,
6, 9). If there is no corruption in transmission, the receiver
receives (7, 11, 12, 0, 6, 9) and adds them in ones
complement to get 15 (See Figure below).
Figure : Example 3