The minimum number of NAND gates required to implement the Boolean function f…

2023

The minimum number of NAND gates required to implement the Boolean function f = x'y + xy' is:

  1. A.

    3

  2. B.

    4

  3. C.

    6

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 292 students.

Show answer & explanation

Correct answer: B

Recognize the function: f = x'y + xy' is the XOR function.

A minimum NAND-only implementation can be built as follows:

  1. g1 = x NAND y

  2. g2 = x NAND g1

  3. g3 = y NAND g1

  4. f = g2 NAND g3

This gives x XOR y = x′y + xy′ using exactly 4 NAND gates.

A method that first separately creates x' and y' uses more gates, but it is not the minimum construction.

Answer: 4

Explore the full course: Up Lt Grade Assistant Teacher 2025