GATE Computer ScienceVery hardGATE CS (PYQ pattern)
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 can the single gate produce?
- A. 56
- B. 64
- C. 24
- D. 40
Correct answer: D. 40
Enumerating all 8³ input connections and removing duplicates leaves 40 distinct functions: for example the 8 literals and constants, AND/OR of two literals (like xy' and x + y'), and genuine majorities such as MAJ(x, y, z') and MAJ(x, y', z').
More Digital Logic questions
- 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?
- For how many of the 256 ordered pairs of 4-bit two's complement numbers (a, b) does the exact product a·b fit in a 4-bit two's complement…