Answer:
a) 00111110
b) 11000000
c) We get 00111110 when one bit is flipped in each of the 2 bytes and yet the 1s complement doesn’t change.
Explanation:
a) The sum of 01011100 and 01100101 is as indicated below:
01011100
+ <u> 01100101</u>
<u>11000001</u>
Therefore, the sum of these 2 bytes 01011100 and 01100101 equals 11000001.
Next we determine the 1s complement, this is usually obtained by reversing the bits i.e 1 to 0 and 0 to 1. Therefore, the 1s complement of 11000001 is 00111110.
Therefore, the 1s complement of the sum of these 2 bytes 01011100 and 01100101 equals 00111110.
b) The sum of 11011010 and 01100101 is as indicated below:
11011010
+ <u>01100101</u>
<u>00111111</u>
The carry is ignored as we are dealing with 8 bits
Therefore, the sum of these 2 bytes 11011010 and 01100101 equals 00111111.
Next we determine the 1s complement, this is usually obtained by reversing the bits i.e 1 to 0 and 0 to 1. Therefore, the 1s complement of 00111111 is 11000000.
Therefore, the 1s complement of the sum of these 2 bytes 11011010 and 01100101 equals 11000000.
c) Using the 2 bytes in part (a)
The sum of 01011100 and 01100101 is as indicated below:
01011100
+ <u> 01100101</u>
<u>11000001</u>
Therefore, the sum of these 2 bytes 01011100 and 01100101 is 11000001.
The 1s complement of 11000001 is 00111110.
When the most significant bit is flipped 01011100 we get <u>11011100</u>. We get <u>11100101 </u>when the most significant bit of 01100101 is flipped.
Now we determine their sum:
11011100
+ <u> 11100101 </u>
<u>11000001</u>
The carry is ignored as we are dealing with 8 bits
Therefore, the sum of these 2 bytes 11011100and 11100101 is 11000001.
The 1s complement of 11000001 is 00111110.
We can see that the 1s complement doesn’t change when one bit is flipped in each of the 2 bytes.