Interactive end-of-chapter exercises


Computing an Internet checksum

Consider the two 16-bit words (shown in binary) below. Recall that to compute the Internet checksum of a set of 16-bit words, we compute the one's complement sum [1] of the two words. That is, we add the two numbers together, making sure that any carry into the 17th bit of this initial sum is added back into the 1's place of the resulting sum); we then take the one's complement of the result. Compute the Internet checksum value for these two 16-bit words:


   10100111   10000101      this binary number is 42885 decimal (base 10)

   01011001   10011010      this binary number is 22938 decimal (base 10)



Question List


1. What is the sum of these two 16 bit numbers? Don't put any spaces in your answer

2. Using the sum from question 1, what is the checksum? Don't put any spaces in your answer




Solution


1. The sum of 10100111 10000101 and 01011001 10011010 = 00000001   00100000

2. The internet checksum is the one's complement of the sum: 00000001   00100000 = 11111110   11011111



That's incorrect

That's correct

The answer was: 00000001   00100000

Question 1 of 2

The answer was: 11111110   11011111

Question 2 of 2

Try Another Problem

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site.

Copyright © 2010-2022 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu