Consider the ALU shown below.

If the operands are in complement representation, which of the following operations can be performed by suitably setting the control lines and only (+ and – denote addition and subtraction respectively)?
View worked solution
Answer: A
In the given ALU circuit, the inputs to the -bit adder are:
- First input:
- Second input: (since is XORed with the control line )
- Carry-in:
The output of the adder is given by the expression:
Let us analyze the possible operations by setting the control lines and :
- Addition (): By setting and , we get:
This operation is possible. - Subtraction (): In ’s complement representation, . By setting and , we get:
This operation is possible. - Increment (): To perform , the second operand of the adder must be with . Since the second operand is , its value depends on the external input . We cannot force for all values of using only the control lines and . Thus, is not possible.
Therefore, we can perform and , but not .
Free practice · Your answers on this page are not saved.
