How does this subtractor circuit handle A<B?

Discussion in 'Homework Help' started by tempneff, Feb 11, 2013.

  1. tempneff

    Thread Starter New Member

    Aug 11, 2012
    17
    0
    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!

    [​IMG]
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    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.
     
  3. tempneff

    Thread Starter New Member

    Aug 11, 2012
    17
    0
    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?
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    What do you meed "take the two's complement again"?

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