Logic Gates: One-Bit ALU

 


Simple ALU

Handles AND, OR, and binary addition. The two Operation control bits determine which result is passed through the MUX (AND, OR, or sum). (How does a MUX work?)

Simple ALU

What about subtraction?

1-bit ALU

Handles binary subtraction by negating b and doing addition. (Flip all the bits and set CarryIn0 to 1 to compute two's complement.)

The Binvert control bit determines whether b or not b is passed to the adder.

The two Operation control bits determine which result is passed through the second MUX (AND, OR, or sum).

Stop and Think: Why is the Binvert control line 1 bit, while the Operation control line is 2 bits?


Alyce Brady, Kalamazoo College