Error Detection
Error Detection
UNIT 3
Prepared By: Dr. Krishan kumar, Professor,
LPU
LPU
Unit III
4
Basic concepts
Networks must be able to transfer data from one
device to another with complete accuracy.
Data can be corrupted during transmission.
For reliable communication, errors must be detected
and corrected.
Error detection and correction are
implemented either at the data link layer or
the transport layer of the OSI model.
PLACEMENT—Interview Question
Q.1. What are the type of error control methods
Answer
Generally, the error control methods are of two types :
Error detection with retransmission
Forward acting error correction
• In case of first method, when an error is detected, the
retransmission request (ARQ) is sent back to the
transmitter.
• In the second method, the errors are detected and corrected
by proper coding techniques at the receiver end. Whenever
a single source transmits data to a number of receivers, the
forward acting error correction is used. This is due to the
fact that the retransmission is impossible in these cases.
6
Types of Errors
Single-bit error
Single bit errors are the least likely type of errors
in serial data transmission because the noise must
have a very short duration which is very rare.
However this kind of errors can happen in parallel
transmission.
Example:
If data is sent at 1Mbps then each bit lasts only
1/1,000,000 sec. or 1 μs.
For a single-bit error to occur, the noise must have a
duration of only 1 μs, which is very rare.
Burst error
The term burst error means that two or more bits in
the data unit have changed from 1 to 0 or from 0 to
1.
Suppose P=2
The above equation implies 4 not greater than or equal to 7. So let’s choose another value of P=3.
23
Example
Encode a binary word 11001 into the even parity
hamming code.
Answer-
Given, number of data bits, n =5.To find the number of
redundant bits, Let us try P=4.
The equation is satisfied and so 4 redundant bits are selected. Total code bit = n+P = 9
The redundant bits are placed at bit positions 1, 2, 4 and 8.
D5 P4 D4 D3 D2 P3 D1 P2 P1
1 1 0 0 1
To determine the parity bits
For P1: Bit locations 3, 5, 7 and 9 have three 1s. To have even parity, P1
must be 1.
For P2: Bit locations 3, 6, 7 have two 1s. To have even parity, P2 must be 0.
For P3: Bit locations 5, 6, 7 have one 1s. To have even parity, P3 must be 1.
For P4: Bit locations 8, 9 have one 1s. To have even parity, P2 must be 1.
Thus the encoded 9-bit hamming code is 111001101. Now detect and correct the error
Let us assume the even parity hamming code from
the above example (111001101) is transmitted and the
received code is (110001101).
Now from the received code, detect and correct the error.
26
for the given CRC generator, the corresponding binary pattern is 11011011.
Properties Of CRC Generator-
The algebraic polynomial chosen as a CRC generator should have at least the following
properties-
Rule-01:
It should not be divisible by x.
Rule-02:
It should be divisible by x+1.
Important Notes-
If the CRC generator is chosen according to the above rules, then-
CRC can detect all single-bit errors
CRC can detect all double-bit errors provided the divisor contains at least
three logic 1’s.
CRC can detect any odd number of errors provided the divisor is a factor of
x+1.CRC can detect all burst error of length less than the degree of the
polynomial.CRC can detect most of the larger burst errors with a high
probability.
27
EXAMPLE
29
Cyclic Redundancy Check
CRC
Example
Standard Polynomials
Checksums
This is a block code method where a checksum is created based
on the data values in the data blocks to be transmitted using
some algorithm and appended to the data.
When the receiver gets this data, a new checksum is calculated
and compared with the existing checksum. A non-match indicates
an error.
Error Detection by Checksums
For error detection by checksums, data is divided into fixed sized
frames or segments.
•Sender’s End − The sender adds the segments using 1’s
complement arithmetic to get the sum. It then complements the
sum to get the checksum and sends it along with the data frames.
•Receiver’s End − The receiver adds the incoming segments
along with the checksum using 1’s complement arithmetic to get
the sum and then complements it.
Example
Suppose that the sender wants to send 4 frames each of 8 bits,
where the frames are
11001100, 10101010, 11110000 and 11000011.
The sender adds the bits using 1s complement arithmetic.
While adding two numbers using 1s complement
arithmetic, if there is a carry over, it is added to the sum.
After adding all the 4 frames, the sender complements the
sum to get the checksum, 11010011, and sends it along
with the data frames.
The receiver performs 1s complement arithmetic sum of
all the frames including the checksum. The result is
complemented and found to be 0. Hence, the receiver
assumes that no error has occurred.
Questions/Answers
THANKS