Electronic – How to reduce an 8 output ALU to a 4 or 3 output ALU

alucomputer-architecturecomputersdigital-logicvlsi

I can implement the functions in the picture below, but then if I implement them independently, I would have 8 outputs to the mux. Our professors wants us to reduce the ALU to only 3 or 4 outputs, I have tried but am not getting anywhere?

enter image description here

Best Answer

Addition and subtraction have inverted constants \$C_{in}\$, we can be connected to \$(I_3 \vee I_4)\$. Then invert the subtracting value before passing to a full adder. ADD/SUBR/SUBS can be expressed as :

$$ (R \forall I_3) + (S \forall I_4) + (I_3 \vee I_4) $$

Using the same xor inversion method you can mearge:
AND/NOTRS : \$ (R \forall I_3) \wedge S\$
EXOR/EXNOR : \$ R \forall S \forall I_3\$

This make 4 possibilities that can be decoded using three 2-to-1 muxes.

schematic

simulate this circuit – Schematic created using CircuitLab

Hint: Gate count can be reduced further by share logic with the gates inside the fulladder.