Professional Documents
Culture Documents
Adapted from lecture slides by Behrouz A. Forouzan The McGraw-Hill Companies, Inc. All rights reserved
Outline
Overview of Data Link Layer Types of errors Redundancy Correction vs. detection Coding
Error Control
Types of Errors
Single-bit errors
Burst errors
Redundancy
Coding
Block codes
Divides the data to be sent into a set of blocks Extra information attached to each block Memoryless Treats data as a series of bits, and computes a code over a continuous series The code computed for a set of bits depends on the current and previous input
Convolutional codes
XOR Operation
Main operation for computing error detection/correction codes Similar to modulo-2 addition
Block Coding
11
Notes
An error-detecting code can detect only the types of errors for which it is designed
12
Error Correction
13
k, r, n = ?
The receiver receives 01001, what is the original dataword?
14
Hamming Distance
Hamming Distance between two words is the number of differences between corresponding bits.
d(01, 00) = ? d(11, 00) = ? d(010, 100) = ? d(0011, 1000) = ? How many 8-bit words are n bits away from 10000111?
15
To guarantee the detection of up to s-bit errors, the minimum Hamming distance in a block code must be
dmin = s + 1
17
To guarantee the correction of up to t-bit errors, the minimum Hamming distance in a block code must be
dmin = 2t + 1
18
A code scheme has a Hamming distance dmin = 4. What is the error detection and correction capability of this scheme?
19
20
Parity Check
Most common, least complex Single bit is added to a block Two schemes:
21
22
23
Parity-Check: Encoding/Decoding
24
25
2D Parity Check
27
28
29
CRC Encoder/Decoder
30
CRC Generator
31
Checking CRC
32
Polynomial Representation
More common representation than binary form Easy to analyze Divisor is commonly called generator polynomial
33
34
Strength of CRC
M(x) Original message G(x) Generator polynomial of degree n R(x) Generated CRC
Strength of CRC
Received message is M(x)xn R(x) + E(x) where E(x) represents bit errors Receiver does not detect any error when E(x) is divisible by G(x), which means either:
36
Strength of CRC
If G(x) contains at least two terms, then all single-bit errors can be detected If G(x) cannot divide xt + 1 (0 t < n), then all isolated double errors can be detected
It should have at least two terms The coefficient of the term x0 should be 1 It should not divide xt + 1, for t between 2 and n 1 It should have the factor x + 1
38
All burst errors with L n will be detected All burst errors with L = n + 1 will be detected with probability 1 (1/2)n1 All burst errors with L > n + 1 will be detected with probability 1 (1/2)n
39
Which of the following polynomials guarantees that a single-bit error can be detected
(a) x+1 (b) x3 (c) 1
40
x3 x10 + x9 + x5 x6+1
41
Standard Polynomials
42
Error Correction
Two methods
43
2r k+1
But the r bits are also transmitted along with data; hence
2r k+r+1
44
1 2 3 4 5 6 7
4
4 4
9
10 11
45
Hamming Code
error-correcting bits
46
47
48
49
It can correct at most 1 bit error It can detect at most 2 bit error But not both!!! (Why?)
Achieves minimum Hamming distance of 4 Can distinguish between one bit and two bit errors
50
51