Implement a one-bit ALU which takes two one-bit operands $a_0$, $b_0$, and produces a one-bit output $z_0$. The ALU has a two-bit control input $cont_0$, $cont_1$, with codes as shown below.
|$cont_0$|$cont_1$ |selects
|--- 0 ---|--- 0 ---| AND
|--- 0 ---|--- 1 ---| NOR
|--- 1 ---|--- 0 ---| OR
|--- 1 ---|--- 1 ---| XOR
(Sorry I didn't know how to make a properly formatted table)
The questions is:
Design the ALU using the smallest MUX possible.
I made a truth table as a start, then I came up with an ALU model, but I am not too confident with it. Any input on how to tackle this problem is appreciated.
Here's the truth table I made:
And here's the ALU that I'm doubtful about because it seems too easy of an approach.