GATE Computer ScienceHardGATE CS (PYQ pattern)

Of the 16 binary operations ∘ on {0, 1}, for how many is ∘ associative AND has a two-sided identity element e (e ∘ x = x ∘ e = x for both x)?

  1. A. 6
  2. B. 8
  3. C. 2
  4. D. 4

Correct answer: D. 4

The associative operations are 0, 1, AND, OR, XOR, XNOR and the two projections (x∘y = x, x∘y = y). Constants and projections have no two-sided identity. AND (e = 1), OR (e = 0), XOR (e = 0) and XNOR (e = 1) do, giving 4. Only XOR and XNOR also have inverses (2 groups).

More Digital Logic questions

Exams that ask this topic