Chapter 10. Error Detection in addition to Correction INTRODUCTION BLOCK CODING LINEAR BLOCK CODES CYCLIC CODES

Chapter 10. Error Detection in addition to Correction INTRODUCTION BLOCK CODING LINEAR BLOCK CODES CYCLIC CODES www.phwiki.com

Chapter 10. Error Detection in addition to Correction INTRODUCTION BLOCK CODING LINEAR BLOCK CODES CYCLIC CODES

Standfield, Pisani, Midday Host has reference to this Academic Journal, PHwiki organized this Journal Chapter 10. Error Detection in addition to Correction Stephen Kim (dskim@iupui.edu) 10. Notes Data can be corrupted during transmission. Some applications (acutally most of applications) require that errors be detected in addition to corrected. 10. INTRODUCTION Let us first discuss some issues related, directly or indirectly, to error detection in addition to correction. 10.

Universit de Pau et des Pays de l'Adour FR www.phwiki.com

This Particular University is Related to this Particular Journal

Type of Errors Single-bit error Only 1 bit in the data unit (packet, frame, cell) has changed. Either 1 to 0, or 1 to 0. Burst error 2 or more bits in the data unit have changed. More likely to occur than the single-bit error because the duration of noise is normally longer than the duration of 1 bit. 10. Redundancy To detect or correct errors, we need to send extra (redundant) bits with data. The receiver will be able to detect or correct the error using the extra in as long as mation. Detection Looking at the existence of any error, as YES or NO. Retransmission if yes. (ARQ) Correction Looking at both the number of errors in addition to the location of the errors in a message. Forward error correction. (FEC) 10. Coding Encoder vs. decoder Both encoder in addition to decoder have agreed on a detection/correct method in priori. 10.

Modulo Arithmetic In modulo-N arithmetic, we use only the integers in the range 0 to N1, inclusive. Calculation If a number is greater than N1, it is divided by N in addition to the remainder is the result. If it is negative, as many N’s as needed are added to make it positive. Example in Modulo-12 1512 = 312 -312 = 912 10. Modulo-2 Arithmetic Possible numbers are {0, 1} Arithmetic Addition 0+0=0, 0+1=1, 1+0= 1, 1+1=2=0 Subtraction 0-0=0, 0-1=-1=1, 1-0=1, 1-1=0 Surprisingly, the addition in addition to subtraction give the same result. XOR (exclusively OR) can replace both addition in addition to subtraction. 10. BLOCK CODING In block coding, we divide our message into blocks, each of k bits, called datawords. We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called codewords. 10.

Datawords in addition to codewords in block coding 10. Example 10.1 The 4B/5B block coding discussed in Chapter 4 is a good example of this type of coding. In this coding scheme, k = 4 in addition to n = 5. As we saw, we have 2k = 16 datawords in addition to 2n = 32 codewords. We saw that 16 out of 32 codewords are used as long as message transfer in addition to the rest are either used as long as other purposes or unused. 10. Error Detection A receiver can detect a change if the original codeword if The receiver has a list of valid codewords, in addition to The original codeword has changed to an invalid one. 10.

Example 10.2 Let us assume that k = 2 in addition to n = 3, in addition to assume the following table. Assume the sender encodes the dataword 01 as 011 in addition to sends it to the receiver. Consider the following cases: The receiver receives 011. It is a valid codeword. The receiver extracts the dataword 01 from it. The codeword is corrupted during transmission, in addition to 111 is received. This is not a valid codeword in addition to is discarded. The codeword is corrupted during transmission, in addition to 000 is received. This is a valid codeword. The receiver incorrectly extracts the dataword 00. Two corrupted bits have made the error undetectable. 10. Note An error-detecting code can detect only the types of errors as long as which it is designed; other types of errors may remain undetected. The previous example Is designed as long as detecting 1-bit error, Cannot detect 2-bit error, in addition to Cannot find the location of the 1-bit error. 10. Error Correction The receiver needs to find (or guess) the original codeword sent. Need more redundancy than as long as error detection. 10.

Example 10.3 Add 3 redundant bits to the 2-bit dataword to make 5-bit codewords as follows: Example Assume the dataword is 01. The sender creates the codeword 01011. The codeword is corrupted during transmission, in addition to 01001 is received. The receiver Finds that the received codeword is not in the table. Assuming that there is only 1 bit corrupted, uses the following strategy to guess the correct dataword. 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. By the same reasoning, the original codeword cannot be the third or fourth one in the table. The original codeword must be the second one in the table because this is the only one that differs from the received codeword by 1 bit. The receiver replaces 01001 with 01011 in addition to consults the table to find the dataword 01. 10. Hamming Distance The Hamming distance between two words is the number of differences between corresponding bits. The Hamming distance d(000, 011) is 2 because 000 011 = 011 (two 1’s) The Hamming distance d(10101, 11110) is 3 because 10101 11110 = 01011 (three 1’s) The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words. 10. Example 10.5 Find the minimum Hamming distance of the coding scheme in Table 10.1. Solution We first find all Hamming distances. d(000,011)=2, d(000,101)=2, d(000,110)=2 d(011,101)=2, d(011,110)=2, d(101,110)=2 The dmin in this case is 2. 10.

Example 10.6 Find the minimum Hamming distance of the coding scheme in Table 10.2. Solution We first find all the Hamming distances. d(0000,01011)=3, d(00000,10101)=3, d(00000,11110)=4, d(01011,10101)=4, d(01011,11110)=3, d(10101,11110)=3 The dmin in this case is 3. 10. Hamming Distance in addition to Detection To guarantee the detection of up to s-bit errors in all cases, the minimum Hamming distance in a block code must be dmin = s + 1. 10. 10. The minimum Hamming distance as long as our first code scheme (Table 10.1) is 2. This code guarantees detection of only a single error. For example, if the third codeword (101) is sent in addition to one error occurs, the received codeword does not match any valid codeword. If two errors occur, however, the received codeword may match a valid codeword in addition to the errors are not detected. Example 10.7

10. Our second block code scheme (Table 10.2) has dmin = 3. This code can detect up to two errors. Again, we see that when any of the valid codewords is sent, two errors create a codeword which is not in the table of valid codewords. The receiver cannot be fooled. However, some combinations of three errors change a valid codeword to another valid codeword. The receiver accepts the received codeword in addition to the errors are undetected. Example 10.8 Minimum Distance in addition to Correction To guarantee correction of up to t errors in all cases, the minimum Hamming distance in a block code must be dmin = 2t + 1. 10. 10. A code scheme has a Hamming distance dmin = 4. What is the error detection in addition to correction capability of this scheme 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 as long as error correction, part of its capability is wasted. Error correction codes need to have an odd minimum distance (3, 5, 7, ). Example 10.9

Standfield, Pisani WAGG-AM Midday Host www.phwiki.com

LINEAR BLOCK CODES Almost all block codes used today belong to a subset called linear block codes. A linear block code is a code in which the exclusive OR (addition modulo-2) of two valid codewords creates another valid codeword. 10. Note In a linear block code, the exclusive OR (XOR) of any two valid codewords creates another valid codeword. 10. 10. Let us see if the two codes we defined in Table 10.1 in addition to Table 10.2 belong to the class of linear block codes. The scheme in Table 10.1 is a linear block code because the result of XORing any codeword with any other codeword is a valid codeword. For example, the XORing of the second in addition to third codewords creates the fourth one. The scheme in Table 10.2 is also a linear block code. We can create all four codewords by XORing two other codewords. Example 10.10

10. In our first code (Table 10.1), the numbers of 1s in the nonzero codewords are 2, 2, in addition to 2. So the minimum Hamming distance is dmin = 2. In our second code (Table 10.2), the numbers of 1s in the nonzero codewords are 3, 3, in addition to 4. So in this code we have dmin = 3. Example 10.11 Simple Parity-Check Code A simple parity-check code is a single-bit error-detecting code in which n = k + 1 with dmin = 2. A simple parity-check code can detect an odd number of errors. 10. Encoder in addition to decoder as long as simple parity-check code In modulo, r0 = a3+a2+a1+a0 s0 = b3+b2+b1+b0+q0 Note that the receiver addds all 5 bits. The result is called the syndrome. 10.

10. Figure 10.25 Example 10.23

Standfield, Pisani Midday Host

Standfield, Pisani is from United States and they belong to WAGG-AM and they are from  Birmingham, United States got related to this Particular Journal. and Standfield, Pisani deal with the subjects like Religion

Journal Ratings by Universit de Pau et des Pays de l’Adour

This Particular Journal got reviewed and rated by Universit de Pau et des Pays de l’Adour and short form of this particular Institution is FR and gave this Journal an Excellent Rating.