Question: The ripple carry adder below adds two 16-bit numbers X and Y (i.e. S=X+Y), where X=X 15 X 14 X 1 X 0 and Y=Y
The ripple carry adder below adds two 16-bit numbers X and Y (i.e. S=X+Y), where X=X15X14X1X0 and Y=Y15Y14Y1Y0. Assume we are using twos complement representation for our signed numbers, in which flipping all the bits of a number Y and adding one to it will give -Y.
Modify the circuit below by including an input line P that specifies whether the circuit will add (that is, it will perform X+Y when P = 0) or subtract (that is, it will perform X-Y when P = 1). Hint: X-Y = X+(-Y) and also note that Q XOR 1 flips Q (that is Q XOR 1 = Q').

arry out Carry In
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
