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.

Answer :

ohismike24

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

                + 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.

1. The complement of the sum of 2 bytes is:

The sum of 01011100 and 01100101 is as indicated below: 01011100+ 01100101 = 11000001.

  • Therefore, the sum of these 2 bytes 01011100 and 01100101 =11000001.

Bytes

Bytes is a unit of digital information that consists commonly of 8 bits.

2. The 1s complement of the sum of the 2 bytes is:

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.

3. An example where one bit is flipped and does not change is:

The sum of 01011100 and 01100101 is as indicated below: 01011100  + 01100101=  11000001

  • Therefore, the sum of these 2 bytes 11011100and 11100101 is 11000001.

We can see that the 1s complement doesn’t change when one bit is flipped in each of the 2 bytes.

Therefore, the correct answer is:

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.

Read more about bytes here:

https://brainly.com/question/9969218

Other Questions