Question

Compute 410 – 510 using 4-bit two’s complement addition. You will need to first convert each...

Compute 410 – 510 using 4-bit two’s complement addition. You will need to first convert each number into its 4-bit two’s complement code and then perform binary addition (i.e., 410 + (−510)). Provide the 4-bit result and indicate whether two’s complement overflow occurred. Check your work by converting the 4-bit result back to decimal.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

4 - 5
= 4 + (-5)

4:
---
Since this is a positive number. we can directly convert this into binary
Step 1. Divide 4 successively by 2 until the quotient is 0
4/2 = 2, remainder is 0
2/2 = 1, remainder is 0
1/2 = 0, remainder is 1
Read remainders from the bottom to top as 100
so, 4 in 2's complement binary is 0100

-5:
----
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 5 successively by 2 until the quotient is 0
5/2 = 2, remainder is 1
2/2 = 1, remainder is 0
1/2 = 0, remainder is 1
Read remainders from the bottom to top as 101
So, 5 in normal binary is 0101
Step 2: flip all the bits
   0101 is flipped to 1010
Step 3:. Add 1 to above result
1010 + 1 = 1011
so, -5 in 2's complement binary is 1011

Add these numbers

    0100
    1011
------------------
 (0)1111
------------------

There is no overflow.
result of adding these numbers is 1111
let's convert this into 2's complement decimal number

since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits
   1111 is flipped to 0000
II. Add 1 to above result
0000 + 1 = 0001
III. Now convert this result to decimal value
=> 1
=> 1x2^0
=> 1x1
=> 1
=> 1
Answer: -1


Add a comment
Know the answer?
Add Answer to:
Compute 410 – 510 using 4-bit two’s complement addition. You will need to first convert each...
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