Multiple choice

The circuit in the figure below has 4 boxes each described by inputs P, Q, R and output Y, Z with Y = P$\oplus$Q$\oplus$R Z = RQ + $\bar P$R + Q$\bar P$

The circuit acts as a

  1. 4-bit adder giving P + Q

  2. 4-bit subtractor giving P – Q

  3. 4-bit subtractor giving Q – P

  4. 4-bit adder giving P + Q + R

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Explanation Let P = 1011 and Q = 1001. Given Yn = Pn $\oplus$Qn$\oplus$RnZn = Rn Qn $\oplus$ $\bar p_n$ Rn $\oplus$ Qn$\bar p_n$

Pn Qn Rn Zn Yn
1 1 0 0 0
1 0 0 0 1
0 0 0 0 0
1 1 0 0 0
0

                      Where, Y = P + Q + RZ = RQ + $\bar PR$ +  $Q\bar P$   From the circuit given, we have Rn + 1 = Zn, 1$\le$n$\le$3Z4 = Ys (MSB). Hence, the output is 00010, which shows a 4-bit subtractor P – Q.