You are on page 1of 17

CSE 461: Introduction to Computer

Communications Networks
Autumn 2010
Module 2.
!it Encodin" and Errors
I#a$la %ermend&ie#a
i#a'cs.was(in"ton.edu
Some material borrowed from slides by Jeremy Elson and
Ben Greenstein. Thanks!
CSE461 10au
This Module's Topics

Bit Encodin
!"#

!"#$
Manchester
%B&'B

Error (etection
)arity
$nternet *hecksums
*"*s

Error *orrection
+ammin (istance
CSE461 10au
Bit Encodin

,ant to send messaes- not


.ust bits

So break up bit stream into


discrete chunks /frames0

Synchroni1e both end points on


frame boundaries 2 how3

Transmit clock on a separate


channel 2 4ery e5pensi4e

$nterate clock in data stream


CSE461 10au
!"#

Simplest form of bit encodin

Sinal is hih to encode a '6'

Sinal is low to encode a '7'

,hat is a problem with this encodin3


Image source: Wikipedia
CSE461 10au
!"#$

!"# has a problem8 difficult to distinuish


stream of consecuti4e 7's or 6's

!"#$ attempts to alle4iate this

9 sinal chane /i.e. hih to low0encodes a '6'

!o chane in sinal encodes a '7'

This fi5es the problem of sendin consecuti4e 6's


but not consecuti4e 7's
Image source: Wikipedia
CSE461 10au
Manchester

Sinal *hane on e4ery bit

:ow;to;hih encodes a '7'

+ih;to;low encodes a '6'

Manchester unambiuously interates clock and


data. ,hat is the downside3
Image source: Wikipedia
CSE461 10au
%B&'B

So far- the schemes we ha4e looked at ha4e had


shortcomins8

!"# and !"#$ run the risk of holdin the sinal


steady when transmittin consecuti4e bits

Manchester reduces efficiency of link

,ant a scheme which toles the sinal often


enouh- without sinificant efficiency o4erhead

%B&'B encodin assins a mappin between % bit


data and ';bit code words

There is a ' bit code for each possible % bit


se<uence

Some ' bit codes are in4alid


CSE461 10au
%B&'B
CSE461 10au
Encodin E5ercise
Show the NRZ, Manchester and NRZI encodings for the above
pattern !ssume NRZI signa" starts out "ow
CSE461 10au
Error (etection and *orrection

+ow can we know if the frames we recei4ed ha4e


not been corrupted in transit3

9dd additional information to frames

Sender computes some property of data and


sends it alon with the data

"ecei4er computes same property and


compares

=arious methods for determinin frame interity

)arity

$nternet *hecksum

*yclic "edundancy *heck


CSE461 10au
)arity

Start with n bits and add another bit so that the


total number of '6's is e4en /e4en parity0

i.e. 7667767 76677676

Easy to compute as >?" of all input bits

,ill detect an odd number of bit errors

But not an e4en number

(oes not correct any errors

?4erhead of parity is proportional to data lenth


/i.e. 6 parity bit for e4ery @A bits of data0
CSE461 10au
A( )airity

9dd pairity row&column to


array of bits

+ow many simultaneous bit


errors can it detect3

,hich errors can it correct3

,hat is an e5ample of a %;bit


error that would not be detected
by a two;dimensional parity3
CSE461 10au
*hecksums

Bsed in $nternet )rotocols /$)- $*M)- T*)- B()0

Basic $dea8 9dd up the data and send it alon with


sum

9lorithm8

9dd 6C bit chunks usin 6s complement

Take ones complement of the result

Di5ed o4erhead- independent of lenth of data



CSE461 10au
*yclic "edundancy *heck /*"*0

Stroner protection than checksums

Bsed widely in practice /i.e. Ethernet *"*;@A0

$mplemented in hardware />?"s and shifts0

Di5ed o4erhead /independent of data si1e0

9lorithm8 Gi4en n bits of data- enerate a k bit


check se<uence that i4es a combined n E k bits
that are di4isible by a chosen di4isor */50

Based on mathematics of finite fields

FnumbersG correspond to polynomials- use


modulo arithmetic

i.e. interpret 67766767 as 5


H
E 5
%
E 5
@
E 5
6
CSE461 10au
*"* E5ample

E5tend messae with k


7Is- when usin a k;
deree enerator

(i4ide messae by
enerator />?"0

(iscard result

Subtract remainder
from oriinal messae

?n reception- check
that messae is
di4isible by enerator
CSE461 10au
*"* E5ample
Suppose we want to transmit the messae 66776776
and protect it from errors usin the *"* polynomial
5
@
E 6. (etermine the messae that should be
transmitted
CSE461 10au
+ammin (istance

Errors must not turn one 4alid codeword into another


4alid codeword- or we cannot detect&correct them.
+ammin distance of a code is the smallest number of
bit differences that turn any one codeword into
another
e.- code 777 for 7- 666 for 6- +ammin distance is
@
Dor code with distance dE68

d errors can be detected- e.- 776- 767- 667- 676-


766
Dor code with distance AdE68
d errors can be corrected- e..- 776 777

You might also like