How does this subtractor circuit handle A<B?

Thread Starter

tempneff

Joined Aug 11, 2012
17
Hey all,

How does this circuit handle signed bits. I understand how the two's compliment subtraction is implemented as long as A=>B but I am supposed to allow B to be greater...

Thanks in advance!

 

WBahn

Joined Mar 31, 2012
29,976
What efforts have you made to answer your own question? For instance, have you tried picking some values that represent the case you are concerned about? If not, do so and see if that answers your question.

Another hint is that you may understand how it is implemented, but not why that implementation is valid.
 

Thread Starter

tempneff

Joined Aug 11, 2012
17
Aha! Okay I see now that it gives me the correct number and I just have to take two's compliment again. So to implement this into a circuit which is expected to do both subtraction and addition and give both positive and negative answers...I need to check for b>a somehow, yes?
 

WBahn

Joined Mar 31, 2012
29,976
What do you meed "take the two's complement again"?

Show an example. I suspect that you are missing something.
 
Top