Answer(D) Bits.
Explanation
The checksum is used in the Internet by several protocols although not at the data link layer. Suppose our data 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, 12, 0, 6), we send (7, 11, 12, 0, 6, 36), where 36 is the sum of the original numbers. The receiver adds the five numbers and compares the result with the sum. If the two are the same, the receiver assumes no error, accepts the five numbers, and discards the sum. Otherwise, there is an error somewhere and the data are not accepted. We can make the job of the receiver easier if we send the negative (complement) of the sum, called the checksum. In this case, we send (7, 11, 12, 0, 6, −36). The receiver can add all the numbers received (including the checksum). If the result is 0, it assumes no error; otherwise, there is an error.Example , can we represent the number 21 in one’s complement arithmetic using only four bits?The number 21 in binary is 10101 (it needs five bits). We can wrap the leftmost bit and add it to the four rightmost bits. We have (0101 + 1) = 0110 or 6. Another way to find the complement of a number in one’s complement arithmetic is to subtract the number from 2n − 1 (16 − 1 in this case).so in our case 6 is substracted with 15 hence complement of a number in ones complement is 9. Sender digit sum of (7,11,12,0,6), 36 cannot be fixed in to 4 bits hence it is wrapped by removing leading two digits and adding and sum is found out as 6. I’s complement is found out by substacting with 15. Hence checksum is 9. Now packet (7,11,12,0,6,9) is send to receiver. Receiver find the sum as 45. Binary is (101101) again wrapped to four digits and adding the curtailed digits at the end. Wrapped sum is (1111)as 15. For I’s complement substract from 15. Hence it comes to 0 and receiver is assured that packet is without error.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.