Question
Computer arcitecture / Machine Organization

9. Express the negative value -25 as a 2s complement integer, using eight bits. Repeat, using 16 bits. Repeat, using 32 bits
0 0
Add a comment Improve this question Transcribed image text
Answer #1
using 8-bits:
--------------
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 25 successively by 2 until the quotient is 0
   > 25/2 = 12, remainder is 1
   > 12/2 = 6, remainder is 0
   > 6/2 = 3, remainder is 0
   > 3/2 = 1, remainder is 1
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 11001
So, 25 of decimal is 11001 in binary
Adding 3 zeros on left hand side of this number to make this of length 8
So, 25 in normal binary is 00011001
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   00011001 is flipped to 11100110
Step 3:. Add 1 to above result
11100110 + 1 = 11100111
so, -25 in 2's complement binary is 11100111
Answer: 11100111

using 16-bits:
---------------
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 25 successively by 2 until the quotient is 0
   > 25/2 = 12, remainder is 1
   > 12/2 = 6, remainder is 0
   > 6/2 = 3, remainder is 0
   > 3/2 = 1, remainder is 1
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 11001
So, 25 of decimal is 11001 in binary
Adding 11 zeros on left hand side of this number to make this of length 16
So, 25 in normal binary is 0000000000011001
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   0000000000011001 is flipped to 1111111111100110
Step 3:. Add 1 to above result
1111111111100110 + 1 = 1111111111100111
so, -25 in 2's complement binary is 1111111111100111
Answer: 1111111111100111

using 32-bits:
---------------
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 25 successively by 2 until the quotient is 0
   > 25/2 = 12, remainder is 1
   > 12/2 = 6, remainder is 0
   > 6/2 = 3, remainder is 0
   > 3/2 = 1, remainder is 1
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 11001
So, 25 of decimal is 11001 in binary
Adding 27 zeros on left hand side of this number to make this of length 32
So, 25 in normal binary is 00000000000000000000000000011001
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   00000000000000000000000000011001 is flipped to 11111111111111111111111111100110
Step 3:. Add 1 to above result
11111111111111111111111111100110 + 1 = 11111111111111111111111111100111
so, -25 in 2's complement binary is 11111111111111111111111111100111
Answer: 11111111111111111111111111100111

so, with increasing number of bits, we just need to extend sign(1 for -ve and 0 to +ve) to fill up the bits on left hand side of the binary number.
Add a comment
Know the answer?
Add Answer to:
Computer arcitecture / Machine Organization 9. Express the negative value -25 as a 2's complement integer,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT