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)?
- A. 6
- B. 8
- C. 2
- 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
- A three-input majority gate has each input connected to one of 0, 1, x, y, z, x', y' or z'. How many distinct Boolean functions of x, y, z…
- A single 2:1 multiplexer (output = s ? b : a) has each of its three inputs connected to one of 0, 1, x, y, z (no complemented literals)…
- For how many 8-bit patterns x does there exist some rotation distance k with 1 ≤ k ≤ 7 such that rotating x left circularly by k bits…
- Let g(x) = x XOR (x >> 1) be the 8-bit binary-reflected Gray encoding. What is the smallest k ≥ 1 such that applying g k times returns…
- A bit string is a palindrome if it reads the same forwards and backwards. How many 8-bit palindromes and how many 9-bit palindromes…
- Let g(x) = x XOR (x >> 1) be the 8-bit Gray code of x. For how many x in 0..254 is g(x) equal to x + 1?