check sum

10
PRESENTATION ON CHECKSUM NAME : POOJA JAISWAL

Upload: kittu-sahani

Post on 12-Feb-2017

39 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Check sum

PRESENTATION ON CHECKSUM

NAME : POOJA JAISWAL

Page 2: Check sum

CHECK SUM Error-detecting technique Applied to a message of any length Mostly used at network and transport layer rather

data-link layer.

Page 3: Check sum

1. At the source, the message is first divided into m-bits units

2. The generator then creates the checksum i.e. an extra m-bits unit

3. At the destination, the checker creates a new cheksum from the combination of the message and sent checksum

4. If checksum is all 0s(zeroes),Message is accepted Otherwise,Message is discarded

Page 4: Check sum

Fig : Checksum

Page 5: Check sum

Method 1. Example-4-bit numbers are: 7, 11, 12, 0, 6Message to be sent:7,11,12,0,6,36 [7+11+12+0+6=36]Receiver adds actual nos. and compares with the sum(36)If the two are the same

receiver assumes no error, nos. accepted and sum discarded.Else

an error somewhere and data are not accepted.

Page 6: Check sum

Method 2. (one’s complement)

Unsigned numbers between 0 and pow((2,m)-1) are represented using only m bits

If number has > m bitsextra leftmost bits needed to be added to the

m rightmost bits(wrapping) Ex- number is 21.

21 in binary is 10101(five bits)wrapping extra leftmost bit(s) i.e. one bitwe have (0101+1)=0110(in decimal, 6).6, in one’s complement is 1001 which is 9(in

decimal) so, complement of 6 is 9.

Page 7: Check sum

….Previous ex-

Page 8: Check sum

Internet Checksum

Page 9: Check sum

Flow diagram of procedure of checksum

Page 10: Check sum

Performance (Checksum)

•Traditional checksum uses a small number of bits (16) to detect errors in a message of any size (sometimes thousands of bits). •However, it is not as strong as the CRC in error-checking capability. •For example: if the value of one word is incremented and the value of another word is decremented by the same amount, the two errors cannot be detected because the sum and checksum remain the same. •Also, if the values of several words are incremented but the sum and the checksum do not change, the errors are not detected. •Fletcher and Adler have proposed some weighted checksums that eliminate the first problem. •However, the tendency in the Internet, particularly in designing new protocols, is to replace the checksum with a CRC.