Ask Question
1 October, 18:15

8. (P4) 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.

+3
Answers (1)
  1. 1 October, 20:44
    0
    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

    + 01100101

    11000001

    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

    + 01100101

    00111111

    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

    + 01100101

    11000001

    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 11011100. We get 11100101 when the most significant bit of 01100101 is flipped.

    Now we determine their sum:

    11011100

    + 11100101

    11000001

    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.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “8. (P4) 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 ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers