0

I know logical ADD in binary is 0010, and logical AND in binary is 0000. How do I go from this to a full operation?

enter image description here

enter image description here

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
aflo7
  • 58
  • 5
  • 1
    The diagram has an error with the a-> green arrow extending too far, going right past the inverter; it should look like the b-> green arrow instead, which stops at the inverter and becomes black post inverter. – Erik Eidt Jun 16 '22 at 16:30

1 Answers1

2

There's two control lines: Ainvert, and Bnegate, which can be used to invert values before combining them.

Use them as needed!

The Bnegate control line does these two things:

  • inverts the bits of the b input to ~b, which is then fed to the other circuits as the b-side/lower input.
  • and also feeds a 1 into the carry input of the adder, +.

The combined effect of Bnegate with the + Operation, will accomplish a + ~b + 1, which is the same as a-b and also a + -b, because in two's complement, -x = ~x+1.

Though we can, we don't have to use the + with Bnegate, as others operations are still available.


Given this logic diagram, what are some things that cannot be done?

  • a + ~b  (though ~a + b can be done)
  • a | -b
  • a & -b
  • -a + b
Erik Eidt
  • 23,049
  • 2
  • 29
  • 53