-1

i'm doing an exercise on two complement, the question sound like this:

  1. Solving 11base10 – 11base10 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.

i got 0 for the answer because 11-11=0, what problem if the answer is 0? and is there a way to overcome it?

X unknown
  • 11
  • 5

1 Answers1

0

So 11 in base 10 is the following in 7-bit base 2:

000 1011

To subtract 11, you need to find -11 first. One of the many ways is to invert all the bits and add 1, leaving you with:

111 0101

Add the two numbers together:

1000 0000

Well, that's interesting. The 8th bit is a 1.

You didn't end up with zero. Or did you?

That's the question that your homework is attempting to get you to answer.

Broam
  • 4,602
  • 1
  • 23
  • 38