Error Detection and Correction
Error Detection and Correction
and
Correction
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Note
Data can be corrupted
during transmission.
Types of Errors
Redundancy
Detection Versus Correction
Forward Error Correction Versus Retransmission
Coding
Modular Arithmetic
Note
In a single-bit error, only 1 bit in the data unit has changed.
Figure 10.1 Single-bit error
Note
A burst error means that 2 or more bits in the data unit have changed.
Figure 10.2 Burst error of length 8
Note
To detect or correct errors, we need to send extra (redundant) bits with data.
Figure 10.3 The structure of encoder and decoder
Note
In this book, we concentrate on block codes; we leave convolution codes
to advanced texts.
Note
In modulo-N arithmetic, we use only the integers in the range 0 to N −1,
inclusive.
Figure 10.4 XORing of two single bits or two words
10-2 BLOCK CODING
Error Detection
Error Correction
Hamming Distance
Minimum Hamming Distance
Figure 10.5 Datawords and codewords in block coding
Example 10.1
Solution
We first find all the Hamming distances.
Solution
This code guarantees the detection of up to three errors (s
= 3), but it can correct up to one error. In other words, if
this code is used for error correction, part of its capability
is wasted. Error correction codes need to have an odd
minimum distance (3, 5, 7, . . . ).
Table 10.4 Hamming code C(7, 4)
Figure 10.12 The structure of the encoder and decoder for a Hamming code
Table 10.5 Logical decision made by the correction logic analyzer
Example 10.13
Idea
One’s Complement
Internet Checksum
Example 10.18
Solution
The number 21 in binary is 10101 (it needs five bits). We
can wrap the leftmost bit and add it to the four rightmost
bits. We have (0101 + 1) = 0110 or 6.
Example 10.21
Solution
In one’s complement arithmetic, the negative or
complement of a number is found by inverting all bits.
Positive 6 is 0110; negative 6 is 1001. If we consider only
unsigned numbers, this is 9. In other words, the
complement of 6 is 9. Another way to find the complement
of a number in one’s complement arithmetic is to subtract
the number from 2n − 1 (16 − 1 in this case).
Example 10.22