Error Detection. Data can be corrupted during transmission. Some applications require that errors be...
-
Upload
magdalen-brooks -
Category
Documents
-
view
249 -
download
4
Transcript of Error Detection. Data can be corrupted during transmission. Some applications require that errors be...
Error Detection
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:
Single-bit error
In a single-bit error, only 1 bit in the data unit has changed.
Burst error of length 8
A burst error means that 2 or more bits in the data unit have changed.
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
To detect or correct errors, we need to send extra (redundant) bits with data.
Using XOR logic of two single bits or two words
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:
Figure 10.5 Datawords and codewords in block coding
Process of error detection in block coding
A code for error detection; k =2, n=3
A code for error correction; k=2, n=5
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
The minimum Hamming distance dmin is the smallest Hamming distance
between all possible pairs in a set of codewords.
dmin = 2
dmin = 3
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)
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
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.
Encoder and decoder for simple parity-check code
An example of block code using Hamming code C(7, 4)
The structure of the encoder and decoder for a Hamming code
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:
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
CRC encoder and decoder
Division in CRC encoder
Figure 10.16 Division in the CRC decoder for two cases
Figure 10.19 The CRC encoder design using shift registers
Divisor = 1011
Simulation and implementation CRC encoder using shift register
General design of encoder and decoder of a CRC code
Figure 10.21 A polynomial to represent a binary word
Figure 10.22 CRC division using polynomials
Divisor = 1011
Augmented Dataword = 1001000
CRC Codeword = 1001110