Error Correction and Detection
Error Correction and Detection
2
Types of Errors
Single-bit error
Burst error
3
Single-bit Errors
Only one bit is changed: 0 changed to 1, or a 1 to a 0
Least likely type of error since noise usually lasts longer
than the time to send one bit
More likely in parallel transmission
4
Burst Errors
Two or more bits in data unit are in error, not necessarily
consecutive in order
Most likely in serial transmission
Number of bits affected depend on data rate and noise
duration
5
Detection
6
Redundancy
7
Detection Methods
Parity Check
Cyclical Redundancy Check (CRC)
Checksum
Parity and CRC are performed by data link layer;
checksum performed by higher-layer protocols
8
Parity Check
9
Even-parity Check
10
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
11
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.
12
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.
13
Simple Parity Performance
14
Two-Dimensional Parity Check
15
Two-Dimensional Parity
16
Two-Dimensional Parity Performance
Increases likelihood of detecting burst errors
18
CRC Steps
On sender’s end, data unit is divided by a
predetermined divisor; remainder is the CRC
When appended to the data unit, it should be
exactly divisible by a second predetermined
binary number
At receiver’s end, data stream is divided by same
number
If no remainder, data unit is assumed to be error-
free
19
Deriving the CRC
20
CRC Generator and Checker
21
CRC Generator
Uses modulo-2 division
Resulting remainder is the
CRC
22
CRC Checker
Performed by receiver
Data is appended with
CRC
Same modulo-2 division
If remainder is 0, data are
accepted
Otherwise, an error has
occurred
23
Polynomials
Used to represent CRC generator
Cost effective method for performing calculations quickly
24
CRC Performance
25
Checksum
26
Checksum Generator
27
Checksum
28
Checksum Checker
29
Performance
30
10.3 Error Correction
31
Redundancy Bits
32
Example Hamming Code
r1: bits 1, 3, 5, 7, 9, 11
r2: bits 2, 3, 6, 7, 10, 11
r3: bits 4, 5, 6, 7
r4: bits 8, 9, 10, 11
33
Example Hamming Code
34
Error Detection using Hamming Code
35
Burst Error Correction
36
Burst Error Correction Example
37
Coming Up… Chapter 11
Data Link Control and Protocols
Flow Control
Error Control
Protocols
38
Credits
39