Chapter 3 Error Detection and Correction
Chapter 3 Error Detection and Correction
and Correction
10 Error Detection and Correction
1 Types of Errors
2 Detection
3 Error Correction
Error Detection and Correction
Data can be corrupted during transmission. For reliable
communication, error must be detected and corrected
Example 1
Suppose the sender wants to send the word world. In
ASCII the five characters are coded as
1110111 1101111 1110010 1101100 1100100
The following shows the actual bits sent
11101110 11011110 11100100 11011000 11001001
Detection – examples
Example 2
Now suppose the word world in Example 1 is received by the
receiver without being corrupted in transmission.
11101110 11011110 11100100 11011000 11001001
The receiver counts the 1s in each character and comes up
with even numbers (6, 6, 4, 4, 4). The data are accepted.
Detection – examples
Example 3
Now suppose the word world in Example 1 is corrupted
during transmission.
11111110 11011110 11101100 11011000
11001001
The receiver counts the 1s in each character and comes up
with even and odd numbers (7, 6, 5, 4, 4). The receiver
knows that the data are corrupted, discards them, and asks
for retransmission.
Two –Dimensional Parity Check
Detection - example
Example 4
Suppose the following block is sent:
10101001 00111001 11011101 11100111 10101010
When the receiver checks the parity bits, some of the bits do
not follow the even-parity rule and the whole block is
discarded.
VRC and LRC
Four types of redundancy checks are used
in data communications
VERTICAL REDUNDANCY CHECK
VRC
Performance of VRC
It can detect single bit error
To check the error, perform the Modulo division again and check
whether the remainder is 0 or not,
Binary Division
in a
CRC Generator
CRC Decoder (Reciver Side)
Binary Division
in a
CRC Checker
Home Work
Message:1 1 0 1 0 1 1 0 1 1
Devisor: 1 0 0 1 1
Remainder:1 1 1 0
Transmitted msg:
1101011011 1110
Checksum
Checksum
Step-01:
Step-02:
The data along with the checksum value is transmitted to the receiver.
Step-03:
All the m bit segments are added along with the checksum value. The
value so obtained is complemented and the result is checked.
Receiver assumes that error occurred in the data during the transmission.
Receiver discards the data and asks the sender for retransmission.
Checksum-Example
At the sender
10101001
00111001
--------------
11100010 Sum
00011101 Checksum
10101001
00111001
00011101
---------------
11111111 Sum
00000000 Complement
Performance
The checksum detects all errors involving an odd
number of bits.
Step-01:
Now, all the segments are added and the result is obtained as-
10011001 + 11100010 + 00100100 + 10000100 = 1000100011
Since the result consists of 10 bits, so extra 2 bits are wrapped around.
00100011 + 10 = 00100101 (8 bits)
The data along with the checksum value is transmitted to the receiver.
Step-03:
At receiver side, The received data unit is divided into segments of 8
bits.
All the segments along with the checksum value are added.
Hamming Code
~ developed by R.W.Hamming
r1 = bits 1, 3, 5, 7, 9, 11
r2 = bits 2, 3, 6, 7, 10, 11
r4 = bits 4, 5, 6, 7
r8 = bits 8, 9, 10, 11
Error Correction(cont’d)
Redundancy bits
calculation(cont’d)
Error Correction(cont’d)
Redundancy bits calculation
Error Correction(cont’d)
Calculating the r values (Sender Side)