Skip to content
Mad4Study

Engineering & Science

GATE Electronics and Communication

  • GATE EC
  • 2026–27 pattern practice
  • Circuits and Signals
  • Combinational logic
  • Easy

What is the minimum number of two-input NAND gates needed to implement a two-input XOR gate?

Digital Circuits

Pick an option to check your answer.

XOR can be built from four NAND gates: N1=AB‾N_1 = \overline{AB}, then N2=AN1‾N_2 = \overline{A N_1}, N3=BN1‾N_3 = \overline{B N_1} and Y=N2N3‾=A⊕BY = \overline{N_2 N_3} = A \oplus B. Fewer gates cannot produce XOR.

Why not the others

  • 55 is the count for a naive sum-of-products build, not the minimum.
  • 33 is not enough to form both cross terms.
  • 22 gives only NAND or AND-type functions.

Report an error

GATE EC · Circuits and Signals · Digital Circuits