error detection. data can be corrupted during transmission. some applications require that errors be...
TRANSCRIPT
![Page 1: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/1.jpg)
Error Detection
![Page 2: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/2.jpg)
Data can be corrupted during transmission.
Some applications require that errors be detected and corrected.
An error-detecting code can detect only the types of errors for which it is designed;
other types of errors may remain undetected.
Types of ErrorsRedundancyDetection Versus CorrectionForward Error Correction Versus RetransmissionCoding
Topics discussed in this section:Topics discussed in this section:
![Page 3: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/3.jpg)
Single-bit error
In a single-bit error, only 1 bit in the data unit has changed.
![Page 4: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/4.jpg)
Burst error of length 8
A burst error means that 2 or more bits in the data unit have changed.
![Page 5: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/5.jpg)
Error Detection• Two main methods of Error Correction
– Forward Error Correction (FEC) – adding redundancy bits– Retransmission – resending of data
• FEC is used when the potential error is small.• Redundancy in FEC is achieved by means of Coding,
means adding control bits to data.• Block codes and Convolutional Codes. Only simple
Block code will be discussed• The ability to detect an error and the ability to correct
an error is two different thing.• Determined by the min Hamming Distance, dmin
![Page 6: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/6.jpg)
To detect or correct errors, we need to send extra (redundant) bits with data.
![Page 7: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/7.jpg)
Using XOR logic of two single bits or two words
![Page 8: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/8.jpg)
BLOCK CODINGBLOCK CODING
In block coding, we divide our message into blocks, In block coding, we divide our message into blocks, each of k bits, called each of k bits, called datawordsdatawords. We add r redundant . We add r redundant bits to each block to make the length n = k + r. The bits to each block to make the length n = k + r. The resulting n-bit blocks are called resulting n-bit blocks are called codewordscodewords..
Error DetectionError CorrectionHamming DistanceMinimum Hamming Distance
Topics discussed in this section:Topics discussed in this section:
![Page 9: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/9.jpg)
Figure 10.5 Datawords and codewords in block coding
![Page 10: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/10.jpg)
Process of error detection in block coding
![Page 11: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/11.jpg)
A code for error detection; k =2, n=3
A code for error correction; k=2, n=5
![Page 12: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/12.jpg)
The Hamming distance d between two words is the number of differences
between corresponding bits.
• Find the Hamming distance between two pairs of words.
1. The Hamming distance d(000, 011) is 2 because
2. The Hamming distance d(10101, 11110) is 3 because
![Page 13: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/13.jpg)
The minimum Hamming distance dmin is the smallest Hamming distance
between all possible pairs in a set of codewords.
dmin = 2
dmin = 3
![Page 14: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/14.jpg)
To guarantee the detection of up to s errors in all cases, the minimum
Hamming distance in a block code must be dmin = s + 1.
s is the number of detectable error
If dmin = 2, then s = 1
If dmin = 3, then s = 2
Detectable Error (s)
![Page 15: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/15.jpg)
To guarantee correction of up to t errors in all cases, the minimum Hamming distance in a block code must be
dmin = 2t + 1.
t is the number of correctable error
Correctable Error (t)
If dmin = 2, then s = 1, but t = ½ ~ 0means able to detect upto 1 error but cannot correct any
If dmin = 3, then s = 2, but t = 1means able to detect upto 2 errors but can only correct 1
![Page 16: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/16.jpg)
Another example of block code using Simple parity-check code C(5, 4)
A simple parity-check code can detect an odd number of errors.
![Page 17: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/17.jpg)
Encoder and decoder for simple parity-check code
![Page 18: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/18.jpg)
An example of block code using Hamming code C(7, 4)
![Page 19: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/19.jpg)
The structure of the encoder and decoder for a Hamming code
![Page 20: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/20.jpg)
10-4 CYCLIC CODES10-4 CYCLIC CODES
Cyclic codesCyclic codes are special linear block codes with one are special linear block codes with one extra property. In a cyclic code, if a codeword is extra property. In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another cyclically shifted (rotated), the result is another codeword.codeword.
Cyclic Redundancy CheckHardware ImplementationPolynomialsCyclic Code AnalysisAdvantages of Cyclic CodesOther Cyclic Codes
Topics discussed in this section:Topics discussed in this section:
![Page 21: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/21.jpg)
Table 10.6 A CRC code with C(7, 4)
Divisor determine the outcome of the codeword, which is pre-agreed between sender and receiver
![Page 22: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/22.jpg)
CRC encoder and decoder
![Page 23: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/23.jpg)
Division in CRC encoder
![Page 24: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/24.jpg)
Figure 10.16 Division in the CRC decoder for two cases
![Page 25: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/25.jpg)
Figure 10.19 The CRC encoder design using shift registers
Divisor = 1011
![Page 26: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/26.jpg)
Simulation and implementation CRC encoder using shift register
![Page 27: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/27.jpg)
General design of encoder and decoder of a CRC code
![Page 28: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/28.jpg)
Figure 10.21 A polynomial to represent a binary word
![Page 29: Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can](https://reader036.vdocument.in/reader036/viewer/2022081723/5697bfec1a28abf838cb88c1/html5/thumbnails/29.jpg)
Figure 10.22 CRC division using polynomials
Divisor = 1011
Augmented Dataword = 1001000
CRC Codeword = 1001110