In the two-bit full adder/subtractor unit shown in figure, when t
|
In the two-bit full adder/subtractor unit shown in figure, when the switch is in position 2 then which operation is performed provided that operands are in 2’s complement representation.
A. A - B
B. A + B
C. B - A
D. -A - B
Please scroll down to see the correct answer and solution guide.
Right Answer is: A
SOLUTION
In position 2, Cin = 1 (Vcc = 1)
Bin = B̅1 B̅0 = B̅ (B0 is LSB)
Ain = A1A0 = A
S= A + B̅ + Cin
S = A + B̅ + 1
∴ S = A - B