error detection and correction.ppt

Upload: samyuktaadepu

Post on 01-Jun-2018

267 views

Category:

Documents


3 download

TRANSCRIPT

  • 8/9/2019 Error detection and correction.ppt

    1/16

     Error

     Detection

     And

    Correction

  • 8/9/2019 Error detection and correction.ppt

    2/16

     Outline

      11  INTRODUCTION  INTRODUCTION 

     2 2 CHECKSUM CHECKSUM 

  • 8/9/2019 Error detection and correction.ppt

    3/16

     INTRODUCTION  INTRODUCTION 

     Let us first discuss some issues related, directly

    or indirectly, to error detection and correction.

  • 8/9/2019 Error detection and correction.ppt

    4/16

     1. Types of Errors1. Types of Errors

      Whenever bits flow from one point to another,they are subject to unpredictable changes because

    of interference.

    This interference can change the shape of thesignal. The term single-bit error means that only 1

    bit of a given data unit (such as a byte, character,

    or packet is changed from 1 to ! or from ! to 1!.

     The term burst error means that " or more bits

    in the data unit have changed from 1 to ! or from

    ! to 1!.

  • 8/9/2019 Error detection and correction.ppt

    5/16

    Figure : Single-bit and burst error 

  • 8/9/2019 Error detection and correction.ppt

    6/16

    2 Redundancy2 Redundancy

      The central concept in detecting or correctingerrors is redundancy.

     To be able to detect or correct errors, we need to

    send some e#tra bits with our data.

      These redundant bits are added by the sender

    and removed by the receiver.

    Their presence allows the receiver to detect or

    correct corrupted bits.

  • 8/9/2019 Error detection and correction.ppt

    7/16

    . Detection !ersus Correction . Detection !ersus Correction

     T"e correction of errors is more difficult t"an t"e

    detection.   In error detection, #e are only loo$in% to see if

    any error "as occurred. T"e ans#er is a simple yes

    or no. &e are not e!en interested in t"e num'er ofcorrupted 'its.

      ( sin%le)'it error is t"e same for us as a 'urst

    error.  In error correction, #e need to $no# t"e e*act

    num'er of 'its t"at are corrupted and, more

    importantly, t"eir location in t"e messa%e.

  • 8/9/2019 Error detection and correction.ppt

    8/16

    +. Codin% +. Codin% 

      Redundancy is ac"ie!ed t"rou%" !arious codin%

    sc"emes.

     T"e sender adds redundant 'its t"rou%" a process

    t"at creates a relations"ip 'et#een t"e redundant

    'its and t"e actual data 'its.

     T"e recei!er c"ec$s t"e relations"ips 'et#een t"e

    t#o sets of 'its to detect errors.

      T"e ratio of redundant 'its to data 'its and t"e

    ro'ustness of t"e process are important factors in

    any codin% sc"eme.

  • 8/9/2019 Error detection and correction.ppt

    9/16

     2.CHECKSUM  2.CHECKSUM 

      C"ec$sum is an error)detectin% tec"niue

    t"at can 'e applied to a messa%e of any len%t".

      In t"e Internet, t"e c"ec$sum tec"niue is

    mostly used at t"e net#or$ and transport layer

    rat"er t"an t"e data)lin$ layer.

  • 8/9/2019 Error detection and correction.ppt

    10/16

    Figure: Checksum

  • 8/9/2019 Error detection and correction.ppt

    11/16

    Concept Concept 

    T"e idea of t"e traditional c"ec$sum is simple. &es"o# t"is usin% a simple e*ample.

  • 8/9/2019 Error detection and correction.ppt

    12/16

    Suppose the message is a list of five 4-bit numbers that we

    want to send to a destination. In addition to sending these

    numbers, we send the sum of the numbers. For example, if

    the set of numbers is (7, 11, 1, !, "#, we send (7, 11, 1, !,

    ", $%#, where $%  is the sum of the original numbers. $he

    re%eiver adds the five numbers and %ompares the result withthe sum. If the two are the same, the re%eiver assumes no

    error, a%%epts the five numbers, and dis%ards the sum.

    &therwise, there is an error somewhere and the message not

    a%%epted.

    Example 1

  • 8/9/2019 Error detection and correction.ppt

    13/16

    In the previous example, the de%imal number '" in binar is

    (1!!1!!#. $o %hange it to a 4-bit number we add the extra

    leftmost bit to the right four bits as shown below.

    Example 2

    Instead of sending '" as the sum, we %an send " as the sum

    (7, 11, 1, !, ", "#. $he re%eiver %an add the first five

    numbers in one)s %omplement arithmeti%. If the result is ",the numbers are a%%epted* otherwise, the are re+e%ted.

  • 8/9/2019 Error detection and correction.ppt

    14/16

    et us use the idea of the %he%sum in xample . $he

    sender adds all five numbers in one)s %omplement to get the

    sum / ". $he sender then %omplements the result to get the

    %he%sum / &, whi%h is 10 ". 2ote that " / (!11!# and

    & / (1!!1#* the are %omplements of ea%h other. $he sender

    sends the five data numbers and the %he%sum (7, 11, 1, !,", . If there is no %orruption in transmission, the re%eiver

    re%eives (7, 11, 1, !, ", and adds them in one)s

    %omplement to get 10 (See Figure below#.

    Example 3

  • 8/9/2019 Error detection and correction.ppt

    15/16

    Figure : Example 3

  • 8/9/2019 Error detection and correction.ppt

    16/16

     

    Procedure to calculate the traditional checksum