GATE Computer ScienceVery hardGATE CS

Two 2-input NAND gates G1 and G2 are used. Both inputs of G1 come from the signals a, b, c (the same signal may be used on both inputs); the inputs of G2 come from a, b, c or the output of G1 (again repetition is allowed). How many different Boolean functions of a, b, c can appear at the output of G2?

  1. A. 13
  2. B. 28
  3. C. 16
  4. D. 22

Correct answer: D. 22

G1 itself realises 6 functions (NAND of two different inputs: 3, NOT of an input: 3). Enumerating all G2 input choices gives 22 distinct functions, 16 of which actually use G1's output; 6 more come from circuits where G2 ignores G1 (NAND of two of a, b, c, or NOT of one).

More Digital Logic questions

Exams that ask this topic