Chapter 9 232
Chapter 9 232
Chapter 9
Error Detection
and Correction
• Types of Errors
• Detection
• Correction
1
5/15/2024
Errors
Single-bit Burst
2
5/15/2024
«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.
3
5/15/2024
âIf data is sent at rate = 1Kbps then a noise of 1/100 sec can affect 10 bits.
(1/100)*1000=10
âIf same data is sent at rate = 1Mbps then a noise of 1/100 sec can affect
10,000 bits.(1/100)*106
Detection 1/21
Error detection means to decide whether the received data is
correct or not without having a copy of the original message.
Error detection uses the concept of redundancy, which means
adding extra bits for detecting errors at the destination.
• Redundancy
4
5/15/2024
Detection 2/21
• There are four types of redundancy checks used in data
communications
Detection 3/21
5
5/15/2024
Detection 4/21
• VRC (Vertical Redundancy Check)
Even-parity circuit
d0
d1
d2
d3 VRC
d4
d5
d6
1
1
0 1
1
0 1
0 1
0
0
1
1
Detection 5/21
• VRC ( vertical redundancy check)
Parity checking
VRC
circuit
d0
d1
d2
E
d3
d4
1
R1
d5 R
d6
1
12
0
1 0
D1
0 LED
0 0
0
0 1 0
2
E
0
0
1
1 R1
R
1
12
D1
LED
2
6
5/15/2024
Detection 6/21
P (for even) = 1
• VRC P (for odd) = 0
7 data Checking R = k/n / 7/8
( Vertical Redundancy bits bit
Check)
P (for P (for
even) odd)
Detection 7/21
7
5/15/2024
Detection 8/21
Detection 9/21
• LRC (longitudinal redundancy check)
LRC Checking
8
5/15/2024
Detection 10/21
• LRC (longitudinal redundancy check)
LRC Checking
Detection 11/21
• LRC (longitudinal redundancy check)
LRC Checking
9
5/15/2024
Detection 12/21
• LRC (longitudinal redundancy check)
LRC Checking
Detection 13/21
• LRC (longitudinal redundancy check)
- LRC increases the likelihood of detecting burst errors
- However, if two bits in one data unit are damaged and two bits in
exactly the same positions, the LRC checker will not detect an error
10
5/15/2024
Detection 14/21
11
5/15/2024
Detection 15/21
• CRC (cyclic redundancy check)
- Step to find CRC
+ Step 1: Append n 0s bit to the data unit. The number n is one less
than the (n+1) bits of the divisor.
+ Step 2: This new data unit is divided by the divisor using binary
division. The remainder is the CRC.
+ Step 3: Replace n 0s bit by CRC (from step 2). Note that the CRC
may consist of all 0s.
Binary Division
12
5/15/2024
Detection 16/21
• CRC (cyclic redundancy check)
- CRC Generator
Detection 17/21
• CRC (cyclic redundancy check)
- CRC Checker
13
5/15/2024
• M(x)=1101011011
1100001010
• C(x)=10011;
--------------
• k=4 10011 /11010110110000
10011
-----
10011
10011
-----
10110
10011
-----
10100
10011
-----
1110
• P(x) = 1101011011 1110
27
Detection 18/21
• CRC (cyclic redundancy check)
- Standard polynomials used in CRC divisor
14
5/15/2024
29
15
5/15/2024
Detection 19/21
• Checksum
Checksum Generator
- The checksum generator subdivides the
data unit into equal segments of n bits
(usually 8, 16)
- These segments are added together.
- C o m p l e m e n t t h e r e s u l t . ( o n e ’s
complement)
- That total is then appended to the end of
the original data unit
16
5/15/2024
Detection 20/21
• Checksum
Checksum Checker
- The receiver subdivides the data unit into
equal segments of n bits (same as the
generator) and adds all segments together
and complements the result.
- These segments are added together.
- Complement the result.
- If the result is 0s, the data is accepted,
otherwise, they are rejected
Detection 21/21
• Checksum
Checksum detects all errors involving an odd number of bits,
as well as most errors involving an even number of bits.
However, if one or more of bits of a segment are damaged
and the corresponding bit or bits of opposite value in a second
segment are also damaged, the sums of those columns will not
change and the receiver will not detect a problem.
17
5/15/2024
18
5/15/2024
2r m r 1
19
5/15/2024
20
5/15/2024
Single-bit error
21
5/15/2024
Error
Detection
22