GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 5(a)

Four implication gates for XOR

Digital Logic · Boolean Algebra & Logic Gates · Full GATE CSE 1998 paper

GATE 1998, Q5(a) Descriptive
Report issue

Boolean Algebra & Logic Gates

Question 5(a), GATE 1998: For I(x,y)=¬x∨y, realize f=¬x·y+x·¬y using implication gates. Both the GFG and GateForum reproductions explicitly require four implication gates. Neither reproduction explicitly provides a constant-zero input.
Tap to enlarge
Answer & solution

Answer: With constant 0: p=I(x,y), q=I(y,x), r=I(q,0), f=I(p,r). Without 0, impossible. (no official key was published)

The requested function is XOR. A four-gate construction satisfies that requirement if one input can be tied to Boolean 0:

G1: p = I(x,y)
G2: q = I(y,x)
G3: r = I(q,0)
G4: f = I(p,r)

Wire x and y to G1 in that order and to G2 in the opposite order. Connect G2's output and a grounded input to G3. Connect G1's output and G3's output to G4, in that order. This netlist is an unambiguous gate-level schematic with fan-out allowed.

Since p=¬x∨y and q=¬y∨x, r=¬q. Therefore f=¬p∨r=¬(¬x∨y)∨¬(¬y∨x)=x¬y∨y¬x, as required. The truth table provides a direct check:

x y | p q r | f
0 0 | 1 1 0 | 0
0 1 | 1 0 1 | 1
1 0 | 0 1 0 | 1
1 1 | 1 1 0 | 0

The grounded input is essential, not an unmentioned extra implication gate. Without constant 0 or another non-1-preserving primitive, no finite acyclic circuit of implication gates can realize XOR. On x=y=1, every primary input is 1; every gate whose inputs are 1 outputs I(1,1)=1. Induction through the circuit makes its final output 1, contradicting XOR(1,1)=0. A constant 1 does not fix this problem. Thus the bare statement is impossible, while the conventional hardware interpretation allowing a ground connection admits the four-gate design above.

Original paper, page 6