CN - W07 - Error Detection and Correction (Block Codes)
CN - W07 - Error Detection and Correction (Block Codes)
Course Instructor:
Dr. Fawad Salam Khan
Assistant Professor
Email:
fawad.salam@mail.au.edu.pk
Chapter 10
Error Detection
and
Correction
10.2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Note
10.3
10-1 INTRODUCTION
10.4
Note
10.5
Figure 10.1 Single-bit error
10.6
Note
10.7
Figure 10.2 Burst error of length 8
10.8
Note
10.9
Figure 10.3 The structure of encoder and decoder
10.10
Note
10.11
Figure 10.4 XORing of two single bits or two words
10.12
10-2 BLOCK CODING
10.13
Figure 10.5 Datawords and codewords in block coding
10.14
Error Detection
10.15
Figure 10.6 Process of error detection in block coding
10.16
Example 10.2
10.17
Example 10.2 (continued)
10.18
Table 10.1 A code for error detection (Example 10.2)
10.19
Note
10.20
Figure 10.7 Structure of encoder and decoder in error correction
10.21
Example 10.3
10.22
Example 10.3 (continued)
1. Comparing the received codeword with the first
codeword in the table (01001 versus 00000), the
receiver decides that the first codeword is not the one
that was sent because there are two different bits.
10.24
Note
10.
Example 10.4
10.
Note
10.
Example 10.5
10.
Example 10.6
Solution
We first find all the Hamming distances.
10.
Note
10.
Example 10.7
10.
Example 10.8
10.
Note
10.
Example 10.9
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, . . . ).
10.
10-3 LINEAR BLOCK CODES
10.
Note
10.
Example 10.10
10.
Note
10.
Table 10.3 Simple parity-check code C(5, 4)
10.
Figure 10.10 Encoder and decoder for simple parity-check code
10.
Example 10.12
10.
Note
10.
Figure 10.11 Two-dimensional parity-check code
10.
Figure 10.11 Two-dimensional parity-check code
10.
Figure 10.11 Two-dimensional parity-check code
10.
Table 10.4 Hamming code C(7, 4) - n=7, k = 4
10.
Calculating the parity bits at the transmitter
:
Modulo 2 arithmetic:
r0 = a2 + a1 + a0
r1 = a3 + a2 + a1
r2 = a1 + a0 + a3
Calculating the syndrome at the receiver:
s0 = b2 + b1 + b0
s1 = b3 + b2 + b1
s2 = b1 + b0 + b3
10.
Figure 10.12 The structure of the encoder and decoder for a Hamming code
10.
Table 10.5 Logical decision made by the correction logic analyzer
10.
Example 10.13
10.
Burst Errors
◼ Burst errors are very common, in particular in
wireless environments where a fade will
affect a group of bits in transit. The length of
the burst is dependent on the duration of the
fade.
◼ One way to counter burst errors, is to break
up a transmission into shorter words and
create a block (one word per row), then have
a parity check per word.
◼ The words are then sent column by column.
When a burst error occurs, it will affect 1 bit
in several words as the transmission is read
back into the block format and each word is
checked individually.
Figure 10.13 Burst error correction using Hamming code
10.
Readings