Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+15 votes

a) The sender sends two 8 bit words, 1001 0011 and 1100 0101. Calculate the UDP checksum.

b) The receiver gets two 8 bit words, 1001 0111 and 1100 0001. Is this message correct and would the checksum catch the error if there is one?

asked in CSC335_Spring2019 by (1 point)
+2

Can you also do the computations in hex?

1 Answer

+10 votes
 
Best answer

a) 1010 0110
b) I don't think the checksum would catch it because there was more than one error in the data

answered by (1 point)
selected by
+5

Well, for part b, the question is not whether there was more than one error, but rather whether the checksum comes out the same. In this case, it happens to come out the same (because the same position bits were flipped in both 8-bit words), so the error is not detected, but if different bits had been flipped, the checksum would have detected the error. (It's more likely that the checksum would notice a 2-bit error than not, but it's not guaranteed to detect 2-bit errors!)

...