internel i -data & communications
TRANSCRIPT
-
8/3/2019 Internel I -Data & Communications
1/13
1)DefineAnalogSignalswithanexample?Thetermanalogdatareferstoinformationthatiscontinuous; Forexample,ananalogclockthathashour,minute,andsecondhandsgivesinformationinacontinuousform;the
movementsofthehandsarecontinuous.
Analogdata,suchasthesoundsmadebyahumanvoice,takeoncontinuousvalues. When
someonespeaks,ananalogwaveiscreatedintheair.Thiscanbecapturedbyamicrophone
andconvertedtoananalogsignalorsampledandconvertedtoadigitalsignal.
PeriodicandNonperiodicSignals
Aperiodicsignalcompletesapatternwithinameasurabletimeframe,calledaperiod,and
repeatsthatpatternoversubsequentidenticalperiods.Thecompletionofonefullpatternis
calledacycle.
A
non
periodic
signal
changes
without
exhibiting
apattern
or
cycle
that
repeats
overtime.
Bothanaloganddigitalsignalscanbeperiodicornonperiodic.Indatacommunications,we
commonlyuseperiodicanalogsignals(becausetheyneedlessbandwidth,andnonperiodic
digitalsignals(becausetheycanrepresentvariationindata.
Examplesofanalogtechnology:
1. photocopiers2. telephones3. audiotapes4. televisions(intensityandcolorinformationperscanline)5. VCRs(sameasTV)
-
8/3/2019 Internel I -Data & Communications
2/13
2)ExplainInterconnectionNetworks?InterconnectionofNetworks:InternetworkToday,
it
is
very
rare
to
see
aLAN,
aMAN,
or
aLAN
in
isolation;
they
are
connected
to
one
another.
Whentwoormorenetworksareconnected,theybecomeaninternetwork,orinternet.Asan
example,assumethatanorganizationhastwooffices,oneontheeastcoastandtheotheronthe
westcoast.TheestablishedofficeonthewestcoasthasabustopologyLAN;thenewlyopened
officeontheeastcoasthasastartopologyLAN.Thepresidentofthecompanylivessomewherein
themiddleandneedstohavecontroloverthecompanyfromherhorne.Tocreateabackbone
WANforconnectingthesethreeentities(twoLANsandthepresident'scomputer),aswitchedWAN
(operatedbyaserviceprovidersuchasatelecomcompany)hasbeenleased.ToconnecttheLANs
tothisswitchedWAN,however,threepointtopointWANsarerequired.Thesepointtopoint
WANscanbeahighspeedDSLlineofferedbyatelephonecompanyoracablemodernlineoffered
byacableTVproviderasshownin
Figure:AheterogeneousnetworkmadeoffourWANsandtwoLANs
-
8/3/2019 Internel I -Data & Communications
3/13
DIGITAL~TO~DIGITALCONVERSIONAsweknowthatdatacanbeeitherdigitaloranalog.Andthesignalsthatrepresentthedata
canalso
be
digital
or
analog.
Here,
we
can
represent
digital
data
by
using
digital
signals.
The
DigitalToDigitalconversioninvolvesthreetechniques:
1) Linecoding2) Blockcoding,3) Scrambling.
Linecodingisalwaysneeded~blockcodingandscramblingmayormaynotbeneeded.
LineCodingLinecodingistheprocessofconvertingdigitaldatatodigitalsignals.Weassumethatdata,in
theform
of
text,
numbers,
graphical
images,
audio,
or
video,
are
stored
in
computer
memory
as
sequencesofbits.Linecodingconvertsasequenceofbitstoadigitalsignal.Atthesender,
digitaldataareencodedintoadigitalsignal;atthereceiver,thedigitaldataarerecreatedby
decodingthedigitalsignal.
Figure:Linecodinganddecoding
LineCodingCharacteristics:SignalElementVersusDataElementLetusdistinguishbetweenadataelementandasignalelement.Indatacommunications,ourgoalistosenddataelements.Adataelementisthe
smallestentity
that
can
represent
apiece
of
information:
this
is
the
bit.
In
digital
data
communications,asignalelementcarriesdataelements.Asignalelementistheshortestunit
(timewise)ofadigitalsignal.Inotherwords,dataelementsarewhatweneedtosend;signal
elementsarewhatwecansend.Dataelementsarebeingcarried;signalelementsarethe
carriers.
Wedefinearatiorwhichisthenumberofdataelementscarriedbyeachsignalelement.
-
8/3/2019 Internel I -Data & Communications
4/13
Figure:SignalelementversusdataelementShowsseveralsituationswithdifferentvaluesofr.
DataRateVersusSignalRateThedataratedefinesthenumberofdataelements(bits)
sent
in
Is.
The
unit
is
bits
per
second
(bps).
The
signal
rate
is
the
number
of
signal
elementssentinIs.Theunitisthebaud.Thereareseveralcommonterminologies
usedintheliterature.Thedatarateissometimescalledthebitrate;thesignalrateis
sometimescalledthepulserate,themodulationrate,orthebaudrate.Wecanformulate
therelationshipbetweendatarateandsignalrateas
-
8/3/2019 Internel I -Data & Communications
5/13
LineCodingSchemes:Wecanroughlydividelinecodingschemesintofivebroadcategories,asshowninFigure
UnipolarScheme
Inaunipolarscheme,allthesignallevelsareononesideofthetimeaxis,eitheraboveor
below.NRZ(NonReturntoZero)Traditionally,aunipolarschemewasdesignedasanon
returntozero(NRZ)schemeinwhichthepositivevoltagedefinesbitIandthezerovoltage
definesbitO.ItiscalledNRZbecausethesignaldoesnotreturntozeroatthemiddleofthebit.
Figure:showaunipolarNRZscheme.
PolarSchemes
Inpolar
schemes,
the
voltages
are
on
the
both
sides
of
the
time
axis.
For
example,
the
voltagelevelfor0canbepositiveandthevoltagelevelforIcanbenegative.
NonReturntoZero(NRZ)InpolarNRZencoding,weusetwolevelsofvoltageamplitude.We
canhavetwoversionsofpolarNRZ:NRZLandNRZI,asshowninFigure:Thefigurealsoshows
thevalueofr,theaveragebaudrate,andthebandwidth.
-
8/3/2019 Internel I -Data & Communications
6/13
Inthefirstvariation,NRZL(NRZLevel),thelevelofthevoltagedeterminesthevalueofthebit.
Inthesecondvariation,NRZI(NRZInvert),thechangeorlackofchangeinthelevelofthe
voltagedeterminesthevalueofthebit.Ifthereisnochange,thebitis0;ifthereisachange,
thebitis1.
BipolarSchemes
Inbipolarencoding(sometimescalledmultilevelbinary),therearethreevoltagelevels:
positive,negative,andzero.Thevoltagelevelforonedataelementisatzero,whilethevoltage
levelfor
the
other
element
alternates
between
positive
and
negative.
MultilevelSchemes
Thedesiretoincreasethedataspeedordecreasetherequiredbandwidthhasresultedinthe
creationofmanyschemes.Thegoalistoincreasethenumberofbitsperbaudbyencodinga
patternofmdataelementsintoapatternofnsignalelements.
MultilineTransmission:MLT3
NRZIanddifferentialManchesterareclassifiedasdifferentialencodingbutusetwotransitionrules
toencodebinarydata(noinversion,inversion).Ifwehaveasignalwithmorethantwolevels,we
candesignadifferentialencodingschemewithmorethantwotransitionrules.MLT3isoneof
them.Themultilinetransmission,threelevel(MLT3)schemeusesthreelevels(+v,0,and V)andthreetransitionrulestomovebetweenthelevels.
1.Ifthenextbitis0,thereisnotransition.
2.Ifthenextbitis1andthecurrentlevelisnot0,thenextlevelis0.
3.Ifthenextbitis1andthecutTentlevelis0,thenextlevelistheoppositeofthelastnonzero
level.
-
8/3/2019 Internel I -Data & Communications
7/13
BlockCodingWeneedredundancytoensuresynchronizationandtoprovidesomekindofinherent
errordetecting.Blockcodingcangiveusthisredundancyandimprovetheperformance
oflinecoding.Ingeneral,blockcodingchangesablockofmbitsintoablockofnbits,wherenis
largerthanm.BlockcodingisreferredtoasanmB/nBencodingtechnique.
BlockcodingisnormallyreferredtoasmBlnBcoding;itreplaceseachmbitgroupwithannbitgroup.
4B/5B
Thefourbinary/fivebinary(4B/5B)codingschemewasdesignedtobeusedincombination
withNRZI.RecallthatNRZIhasagoodsignalrate,onehalfthatofthe
biphase,butithasasynchronizationproblem.
-
8/3/2019 Internel I -Data & Communications
8/13
8RI1OR
Theeightbinary/tenbinary(SBIlOB)encodingissimilarto4B/5Bencodingexcept
thatagroupof8bitsofdataisnowsubstitutedbyalObitcode.Itprovidesgreater
errordetectioncapabilitythan4B/5B.The8BIlOBblockcodingisactuallyacombination
of5B/6Band3B/4Bencoding.
Scrambling
BiphaseschemesthataresuitablefordedicatedlinksbetweenstationsinaLANarenotsuitable
forlongdistancecommunicationbecauseoftheirwidebandwidthrequirement.
ThecombinationofblockcodingandNRZlinecodingisnotsuitableforlongdistanceencoding
either,becauseoftheDCcomponent.BipolarAMIencoding,ontheotherhand,hasanarrow
bandwidthanddoesnotcreateaDCcomponent.However,alongsequenceofOsupsetsthe
synchronization.IfwecanfindawaytoavoidalongsequenceofOsintheoriginalstream,we
canuse
bipolar
AMI
for
long
distances.
We
are
looking
for
atechnique
that
does
not
increase
thenumberofbitsanddoesprovidesynchronization. Wearelookingforasolutionthat
substituteslongzerolevelpulseswithacombinationofotherlevelstoprovidesynchronization.
Onesolutioniscalledscrambling.
-
8/3/2019 Internel I -Data & Communications
9/13
R8ZS
BipolarwithSzerosubstitution(BSZS)iscommonlyusedinNorthAmerica.Inthistechnique,
eightconsecutivezerolevelvoltagesarereplacedbythesequenceOOOVBOVB.
HDB3
Highdensitybipolar3zero(HDB3)iscommonlyusedoutsideofNorthAmerica.Inthis
technique,whichismoreconservativethanB8ZS,fourconsecutivezerolevelvoltagesare
replacedwithasequenceofOOOVorBOOV.
2.ErrorDetectionandCorrectionI.INTRODUCTION
Networksmust
be
able
to
transfer
data
from
one
device
to
another
with
acceptable
accuracy.
Formostapplications,asystemmustguaranteethatthedatareceivedareidenticaltothedata
transmitted.Anytimedataaretransmittedfromonenodetothenext,theycanbecome
corruptedinpassage.Manyfactorscanalteroneormorebitsofamessage.Someapplications
requireamechanismfordetectingandcorrectingerrors.
Someapplicationscantolerateasmallleveloferror.Forexample,randomerrorsinaudioor
videotransmissionsmaybetolerable,butwhenwetransfertext,weexpectaveryhighlevelof
accuracy.
II.TypesofErrorsWheneverbitsflowfromonepointtoanother,theyaresubjecttounpredictablechanges
becauseofinterference.Thisinterferencecanchangetheshapeofthesignal.Inasinglebit
error,a0ischangedtoa1ora1toaO.Inabursterror,multiplebitsarechanged.For
example,a11100sburstofimpulsenoiseonatransmissionwithadatarateof1200bpsmight
changeallorsomeofthe12bitsofinformation.
SingleBitError
Thetermsinglebiterrormeansthatonly1bitofagivendataunit(suchasabyte,character,or
packet)ischangedfrom1to0orfrom0to1.
-
8/3/2019 Internel I -Data & Communications
10/13
BurstError
Thetermbursterrormeansthat2ormorebitsinthedataunithavechangedfrom1to0orfrom0
to1.
III. RedundancyThecentralconceptindetectingorcorrectingerrorsisredundancy.Tobeabletodetectorcorrect
errors,weneedtosendsomeextrabitswithourdata.Theseredundantbitsareaddedbythe
senderandremovedbythereceiver.Theirpresenceallowsthereceivertodetectorcorrect
corruptedbits.
IV. DetectionVersusCorrectionThecorrectionoferrorsismoredifficultthanthedetection.Inerrordetection,wearelookingonly
toseeifanyerrorhasoccurred.Theanswerisasimpleyesorno.Wearenoteveninterestedinthe
numberoferrors.Asinglebiterroristhesameforusasabursterror.
Inerrorcorrection,weneedtoknowtheexactnumberofbitsthatarecorruptedandmore
importantly,theirlocationinthemessage.Thenumberoftheerrorsandthesizeofthemessage
areimportantfactors.Ifweneedtocorrectonesingleerrorinan8bitdataunit,weneedto
considereightpossibleerrorlocations;ifweneedtocorrecttwoerrorsinadataunitofthesame
size,weneedtoconsider28possibilities.Youcanimaginethereceiver'sdifficultyinfinding10
errorsinadataunitof1000bits.
V. ForwardErrorCorrectionVersusRetransmissionTherearetwomainmethodsoferrorcorrection.Forwarderrorcorrectionistheprocessinwhich
thereceiver
tries
to
guess
the
message
by
using
redundant
bits.
This
is
possible,
as
we
see
later,
ifthenumberoferrorsissmall.Correctionbyretransmissionisatechniqueinwhichthereceiver
detectstheoccurrenceofanerrorandasksthesendertoresendthemessage.Resendingis
repeateduntilamessagearrivesthatthereceiverbelievesiserrorfree(usually,notallerrorscan
bedetected).
-
8/3/2019 Internel I -Data & Communications
11/13
VI. CodingRedundancyisachievedthroughvariouscodingschemes.Thesenderaddsredundantbitsthrougha
processthatcreatesarelationshipbetweentheredundantbitsandtheactualdatabits.The
receivercheckstherelationshipsbetweenthetwosetsofbitstodetectorcorrecttheerrors.The
ratioofredundantbitstothedatabitsandtherobustnessoftheprocessareimportantfactorsin
anycoding
scheme.
Figure
10.3
shows
the
general
idea
of
coding.
Wecandividecodingschemesintotwobroadcategories:blockcodingandconvolutioncoding.In
thisbook,weconcentrateonblockcoding;convolutioncodingismorecomplexandbeyondthe
scopeofthisbook.
VII. ModularArithmeticInmodulararithmetic,weuseonlyalimitedrangeofintegers.Wedefineanupperlimit,called
amodulusN.Wethenuseonlytheintegers0toN I,inclusive.ThisismoduloNarithmetic.For
example,ifthemodulusis12,weuseonlytheintegers0to11,inclusive.Anexampleofmoduloarithmeticisourclocksystem.Itisbasedonmodulo12arithmetic,substitutingthenumber12
forO.InamoduloNsystem,ifanumberisgreaterthanN,itisdividedbyNandtheremainderis
theresult.Ifitisnegative,asmanyNsasneededareaddedtomakeitpositive.Considerour
clocksystemagain.Ifwestartajobat11A.M.andthejobtakes5h,wecansaythatthejobisto
befinishedat16:00ifweareinthemilitary,orwecansaythatitwillbefinishedat4P.M.
(theremainderof16/12is4).
Additionandsubtractioninmoduloarithmeticaresimple.Thereisnocarrywhenyouaddtwo
digitsinacolumn.Thereisnocarrywhenyousubtractonedigitfromanotherinacolumn.
Modulo2Arithmetic
Ofparticularinterestismodulo2arithmetic.Inthisarithmetic,themodulusNis2.Wecanuse
only0and1.Operationsinthisarithmeticareverysimple.Thefollowingshowshowwecan
addorsubtract2bits.
-
8/3/2019 Internel I -Data & Communications
12/13
Noticeparticularlythatadditionandsubtractiongivethesameresults.Inthisarithmeticweuse
theXOR(exclusiveOR)operationforbothadditionandsubtraction.TheresultofanXOR
operation
is
0
if
two
bits
are
the
same;
the
result
is
I
if
two
bits
are
different.
Figure
10.4
shows
thisoperation.
OtherModuloArithmetic
Wealsouse,moduloNarithmeticthroughthebook.Theprincipleisthesame;weusenumbers
between0andN 1.Ifthemodulusisnot2,additionandsubtractionaredistinct. Ifwegeta
negativeresult,weaddenoughmultiplesofNtomakeitpositive.
FLOWANDERRORCONTROLDatacommunicationrequiresatleasttwodevicesworkingtogether,onetosendandtheother
toreceive.Evensuchabasicarrangementrequiresagreatdealofcoordinationforan
intelligibleexchangetooccur.Themostimportantresponsibilitiesofthedatalinklayerareflow
controlanderrorcontrol.Collectively,thesefunctionsareknownasdatalinkcontrol.
FlowControlFlowcontrolcoordinatestheamountofdatathatcanbesentbeforereceivingan
acknowledgmentandisoneofthemostimportantdutiesofthedatalinklayer.Inmost
protocols,flowcontrolisasetofproceduresthattellsthesenderhowmuchdataitcan
transmitbeforeitmustwaitforanacknowledgmentfromthereceiver.Theflowofdatamust
notbeallowedtooverwhelmthereceiver.Anyreceivingdevicehasalimitedspeedatwhichit
canprocessincomingdataandalimitedamountofmemoryinwhichtostoreincomingdata.
Thereceivingdevicemustbeabletoinformthesendingdevicebeforethoselimitsarereached
andtorequestthatthetransmittingdevicesendfewerframesorstoptemporarily.Incoming
datamustbecheckedandprocessedbeforetheycanbeused.Thenrateofsuchprocessingis
oftenslowerthantherateoftransmission.Forthisreason,eachreceivingdevicehasablockof
memory,calledabuffer,reservedforstoringincomingdatauntiltheyareprocessed.Ifthe
bufferbeginstofillup,thereceivermustbeabletotellthesendertohalttransmissionuntilitis
onceagainabletoreceive. Flowcontrolreferstoasetofproceduresusedtorestricttheamount
ofdatathatthesendercansendbeforewaitingforacknowledgment.
ErrorControlErrorcontrolisbotherrordetectionanderrorcorrection.Itallowsthereceivertoinformthesenderofanyframeslostordamagedintransmissionandcoordinatestheretransmissionof
thoseframesbythesender.Inthedatalinklayer,thetermerrorcontrolrefersprimarilyto
methodsoferrordetectionandretransmission.Errorcontrolinthedatalinklayerisoften
implementedsimply:Anytimeanerrorisdetectedinaexchange,specifiedframesare
retransmitted.Thisprocessiscalledautomaticrepeatrequest(ARQ). Errorcontrolinthedata
linklayerisbasedonautomatirepeatrequest,whichistheretransmissionofdata.
-
8/3/2019 Internel I -Data & Communications
13/13