check sum
TRANSCRIPT
PRESENTATION ON CHECKSUM
NAME : POOJA JAISWAL
CHECK SUM Error-detecting technique Applied to a message of any length Mostly used at network and transport layer rather
data-link layer.
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
Fig : Checksum
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.
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.
….Previous ex-
Internet Checksum
Flow diagram of procedure of checksum
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.