
Lidia Z.
asked 04/01/20two's complement
plz help me i have spent hours trying to figure this out.
1. Solving 1110 – 1110 using 2’s complement will lead to a problem; by using 7-bit data representation. Explain what the problem is and suggest steps to overcome the problem.
1 Expert Answer

Suzanne O. answered 04/07/20
International Experience and Multiple State Certifications
Hi Lidia. A very interesting problem:
Solving 1110 – 1110 using 2’s complement will lead to a problem; by using 7-bit data representation. Explain what the problem is and suggest steps to overcome the problem.
Things to remember:
- the subtraction has to be done by adding the 2's complement
- the 2's complement is the 1's complement plus 1
- if we have an overflow bit, we are allowed to throw it out
Step by step:
- Convert 1110 to binary 10112
- find the 1's complement 01002
- add 1 to get the 2's complement 01012
- add 1011 and 0101 10112+01012=100002
In 4-bit representation, the 1 in 100002 gets thrown away, leaving 00002, or zero, the correct answer.
In 7-bit representation, the 1 in 100002 has to stay, leaving 100002, or 1610, Yikes!😧
So we have identified the problem.
As to ways to avoid this, I can think of a few:
- Don't use 7-bit data representation. If I had stayed with 4-bit I could have tossed out the overflow bit and gotten the correct answer. This is an obvious answer, but probably not the best. Can you guess why?
- Use leading zeroes in the 7-bit representation. If we do that, the numbers become 00010112, 11101012 and 100000002. That leaves me an overflow bit of 1 which I can throw away, leaving 00000002 or zero.
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Alan L.
1110 is -2 in twos complement. 1110 - 1110 = 0000. In other words, -2 - (-2) = 0. That's not a problem at all! Can you add more details if you think I'm missing something?04/07/20