In terms of "separating" the functions, that's not really how digital logic works. Digital logic is "always doing everything". You need a mux (multiplexer) in there. The multiplexer is used to pick the right output from all of those generated.
Assume inputs A and B, output Q. Assume the ALU does two different things: Q=A+B, or Q=A&B.
The ALU will have an adder. It will also have a big AND gate.
A and B both go to the adder, and the AND gate. Always. Every moment of every day, the adder is adding A and B, and the gate is ANDing A and B.
The mux is used to select which one of the outputs we want to pass to Q. If the control signals to the ALU say "add", then the mux will select the output of the adder and pass it to Q; the output of the AND gate is unused. If the control says "and", the mux will select the output of the AND gate and pass it to Q instead, while the output of the adder is unused.
Imagine A = 0b0001 and B = 0b0010 on the inputs of the ALU. The adder is always producing 0b0011, and the AND gate is always producing 0b0000. If you provide the "add" control signal, the 0b0011 is passed to Q. You can leave A and B alone, and change the control signal to "and", then 0b0000 is passed to Q.
It is possible that there is a "clock" line which must get an impulse for each of the 4 carry full adders until the right result is available at the output.
If you have a clock pin somewhere feed it manually with at least 5 impulses or connect it to a continuous clock signal. Let the input lines be static and check if the carry is correct...
Best Answer
Let's look at bit level what happens in an addition. We're going to add
1111
to1000
.The end result is thus:
0111
Now, let's have a look at the status bits.
0111
zero?