+ All Categories
Home > Documents > Chapter 2 Error-Detecting Codes. Outline 2.1 Why Error-Detecting Codes? 2.2 Simple Parity Checks 2.3...

Chapter 2 Error-Detecting Codes. Outline 2.1 Why Error-Detecting Codes? 2.2 Simple Parity Checks 2.3...

Date post: 21-Dec-2015
Category:
View: 228 times
Download: 0 times
Share this document with a friend
19
Chapter 2 Error-Detecting Codes
Transcript

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?

sender receiverchannel

memory(channel)

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.

• 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

feedback (only detected)

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.

1)1( npnp

22 )1(2

)1( nppnn

• Parity count circuit

Even Odd0 1

0

0

1

1

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

1

11

1

nn

n

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.

22 )1(2

)1( nppnn

]2/[

0

22

0

0

)1()2,(2

)21(1

)1(),()1(])1[(

)1(),(])1[(1

n

m

mnmn

n

k

knkk

n

k

knkn

ppmnCp

ppknCnpp

ppknCpp

2.5 Retransmission of Message

2.6 Simple Burst Error-Detecting Codes

• Assumed that any burst length k was.

(0 ≤ k ≤ L)

lmmm 21

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.

m1 m2 m3 . .

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

kkkk

kk

kk

SSSS

KSSk

SKKS

11

1

1

otherwise,0)2()1(

)2()1(

)1()1(

• How to compute the weighted sums

2.8 Review of Modular Arithmetic

XOR AND

011

101

110

100

111

001

010

000

mbaba

mbb

maa

mod''

mod'

mod'

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.)

410mod64

410mod14


Recommended