GATE / CS ARCHIVE

GATE CSE 2026 SET 1 / QUESTION 21

Simplifying a Boolean XOR expression

Digital Logic · Boolean Algebra & Logic Gates · Full GATE CSE 2026 Set 1 paper

GATE 2026 Set 1, Q21 1 mark · MSQ
Report issue

Boolean Algebra & Logic Gates

Question 21, GATE 2026: Let F(P,Q)=((NOT P) OR Q) XOR ((NOT P) AND Q). Identify equivalent expressions: A NOT(P XOR Q); B P XOR Q; C (NOT P) XOR Q; D (NOT P) XOR (NOT Q).
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, C

Givens and goal

Let F(P,Q)=((NOT P) OR Q) XOR ((NOT P) AND Q). Identify equivalent expressions: A NOT(P XOR Q); B P XOR Q; C (NOT P) XOR Q; D (NOT P) XOR (NOT Q).

Approach

Rename the two repeated inputs and compare OR XOR AND with the definition of exclusive OR.

Step-by-step solution

1. Let x=NOT P and y=Q. The given expression becomes (x OR y) XOR (x AND y).
2. If both x and y are zero, both inner expressions are zero and the result is zero. If exactly one is one, the OR is one and the AND zero, so the result is one. If both are one, both inner expressions are one and the result is zero. Thus the expression is x XOR y.
3. Substituting back gives (NOT P) XOR Q, exactly option C. Complementing one XOR input complements the XOR result, so this is also NOT(P XOR Q), option A.
4. B is P XOR Q, the opposite function. D complements both XOR inputs and therefore equals P XOR Q as well, so neither is equivalent to the given expression.

Truth-table check: For (P,Q)=00,01,10,11, the output is respectively 1,0,0,1. This is XNOR of P and Q.

Visual check: Option A's bar covers the whole XOR expression; C complements P only; D complements each input separately. Those distinctions were confirmed in the rendered source.

Explicit truth table

    P Q | NOT P OR Q | NOT P AND Q | F
    0 0 |      1     |       0     | 1
    0 1 |      1     |       1     | 0
    1 0 |      0     |       0     | 0
    1 1 |      1     |       0     | 1

The first two intermediate columns distinguish OR from AND; XOR of equal bits is zero and XOR of unequal bits is one. Matching the final column, rather than just manipulating complement symbols visually, verifies both selected forms.

Original paper, page 16 · Answer key