190 likes | 343 Views
Chapter 2. Error-Detecting Codes. Outline. 2.1 Why Error-Detecting Codes? 2.2 Simple Parity Checks 2.3 Error-Detecting Codes 2.4 Independent Errors: White Noise 2.5 Retransmission of Message 2.6 Simple Burst Error-Detecting Codes 2.7 Weighted Codes 2.8 Review of Modular Arithmetic
E N D
Chapter 2 Error-Detecting Codes
Outline • 2.1 Why Error-Detecting Codes? • 2.2 Simple Parity Checks • 2.3 Error-Detecting Codes • 2.4 Independent Errors: White Noise • 2.5 Retransmission of Message • 2.6 Simple Burst Error-Detecting Codes • 2.7 Weighted Codes • 2.8 Review of Modular Arithmetic • 2.9 ISBN Book Numbers
2.1 Why Error-Detecting Codes? write read • We require very reliable transmission through the channel, whether it be through space when signaling from here to there (transmission), or through time when signaling from now to then (storage). • Experience shows that it is not easy to build equipment that is highly reliable. sender receiver channel memory (channel)
If repetition is possible, then it is frequently sufficient merely to detect the presence of an error. • It is possible to catch error only if there are some restrictions on what is a proper message. • The problem is to keep these restrictions on the possible messages down to ones that are simple. Encode Decode (only detected) feedback
2.2 Simple Parity Checks • (n-1) message + nth parity-check position m1m2...mn-1p even-parity check: decide p to make the number of 1’s in the message even odd-parity check: decide p to make the number of 1’s in the message odd • A single error or odd number of errors can be detected. • A double error cannot be detected. Nor can any even number of errors be detected.
Assumption • (1)The probability of an error in any one binary position is a definite number p. • (2)Error in different positions are independent. • Then • The probability of a single error is • The probability of a double error is • Optimal length of message to be checked depends on both the reliability desired.
Parity count circuit 0 Even Odd 1 0 1 1 0
2.3 Error-Detecting Codes • a long message is n -1 digits + 1 digit n digits • Redundancy: the number of binary digits actually used divided by the minimum necessary. • The excess redundancy is 1 / (n - 1). • For low redundancy use long message. • For high reliability use short messages
2.4 Independent Errors: White Noise • White Noise • (1) an equal probability p of an error in each position. • (2) an independence of error in different positions. • Burst error • Errors occur in successive position.
For white noise: no error : (1 – p)n 1 error : np(1 - p) n -1 2 error : even number of errors: The probability of no errors is the first term (m=0)of the series.
2.6 Simple Burst Error-Detecting Codes • Assumed that any burst length k was. (0 ≤ k ≤ L) k L
2.7 Weighted Codes • People have a tendency to interchange adjacent digits of number; for example, 67 becomes 76 or 667 becomes 677. • How to overcome these human errors, and we can detect easily. • A rather frequent situation is to have an alphabet, plus space, plus the 10 decimal digits as the complete set of symbols to be used. This amounts to 26+1+10=37 symbols in the sending message.
We weight the symbols with weights 1, 2, 3, . . . beginning with the check digit of the message. m1m2m3. . w1=1 w2=2 w3=3 . .. • We reduce the sum modulo 37 so that a check symbol can selected that will make the sum 0 modulo 37.
If there are interchanged digits, their sums will different from original sums. • If the interchanged digits are the kth and (k+1)st
2.9 ISBN Book Numbers 0 – 1321 – 2571 – 4 W = 10 9 8 7 6 5 4 3 2 1 Choose mod m = 11 (It can not be 10, because it is not prime. Below is reason.)