a. Suppose you have the following 2 bytes: 01011100 and 01100101. What is the 1s complement of the sum of these 2 bytes?
b. Suppose you have the following 2 bytes: 11011010 and 01100101. What is the 1s complement of the sum of these 2 bytes?
c. For the bytes in part (a), give an example where one bit is flipped in each of the 2 bytes and yet the 1s complement doesn’t change.
(a)
Consider 2 bytes: 01011100 and 01100101
Adding the two bytes:
01011100
+ 01100101
11000001
The 1s complement of the sum of these 2 bytes:11000001
b)
Consider 2 bytes: 11011010 and 01100101
11011010
+01100101
00111111
The 1s complement of the sum of these 2 bytes: 00111111
(c)
11011100
+11100101
11000001 <-- Same 1s complement answer
Running checksums at multiple levels throughout the network is not a waste. Because flipped bits can be so easily missed, this redundancy is the best chance of catching errors.