L4 Error Detection and Correction
L4 Error Detection and Correction
• Types of Errors
• Detection
• Correction
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.
Sources of errors
– a)Electromagnetic distortion of signal:
“noise” on the line.
– b)Error in sampling pulse relative to
neighbor pulse: “inter-symbol
interference”
– c)Energy coupling due to nearby links:
“cross-talk”.
– d)The storage of information on the
magnetic devices is prone to errors due to
uneven magnetic surface, dust etc.
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.
10.13
Example
10.14
Hamming Distance and Error
D C B A P D C B A P D C B A
0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 0 0 1 1 0 0 0 1 0 0 0 0 1
0 0 1 0 1 0 0 1 0 0 0 0 1 0
0 0 1 1 0 0 0 1 1 1 0 0 1 1
0 1 0 0 1 0 1 0 0 0 0 1 0 0
0 1 0 1 0 0 1 0 1 1 0 1 0 1
0 1 1 0 0 0 1 1 0 1 0 1 1 0
0 1 1 1 1 0 1 1 1 0 0 1 1 1
0 0 0 0 1 1 0 0 0 0 1 0 0 0
0 0 1 0 0 1 0 0 1 1 1 0 0 1
Error detection: Parity
Vertical Redundancy Check
VRC
Performance
from the example about the resulting bit pattern when R is added to D' is D'' =
10101010100100
Then divide G into D''.
If you computed the correct R then the resulting remainder will be 0. This is shown
CHECKSUM METHOD
The PARITY METHOD will not work when even no. of changes occur
because the even error will not change the oddness & evenness of the
total no. of 1's in the code.
HAMMING CODE :
A hamming code 0110001 is being received. Find the correct code which is being transmitted.
Checksum Bits:
C1 = 0
C2 = 1
C3 = 1
In reverse order, 110.
Therefore, error has occurred at position 6.
Hence, the exact code transmitted is: 0110011.
ERROR DETECTING & ERROR CORRECTING
CODES
(Conclusion)
1.These codes help us to trace out the errors in the digital data and to correct that
error.
2. There are many types of codes for error detection and correction e.g. parity bit
is a kind of error detection code that can find only one bit error
in the data.
4.These codes are used in detecting and correcting error in the transmitted
digital data and it helps in the error free transmission of the data.
Hamming Code
Hamming Code
Example of Hamming Code
Excercise
• Generate the hamming code for data
111011001 with even parity ?