GATE Computer ScienceHardGATE CS (PYQ pattern)
A Boolean function is affine if it equals c ⊕ (XOR of some subset of its variables) for a constant c, and self-dual if f(x̄) = f(x)'. Among functions of four variables, how many are both affine and self-dual, and how many of those depend on all four variables?
- A. 16 and 2
- B. 32 and 2
- C. 8 and 0
- D. 16 and 0
Correct answer: D. 16 and 0
Complementing all inputs flips the XOR of a subset S exactly |S| times, so f(x̄) = f(x) ⊕ (|S| mod 2). Self-duality needs |S| odd: C(4,1) + C(4,3) = 8 subsets, times 2 constants = 16. Depending on all four variables would need |S| = 4, which is even, so none: 0.
More Digital Logic questions
- A Boolean function f is self-dual if f(x̄) = f(x)' for every input x. How many self-dual functions of three variables A, B, C depend…
- How many Boolean functions f(A,B,C,D) are self-dual (f(x̄) = f(x)' for every input x) and can also be written as a single product of…
- F(A,B,C,D) = 1 exactly when the unsigned number ABCD (A is the MSB) is a prime. How many literals are there in the minimal sum-of-products…
- What is the minimum number of 2-input NOR gates needed to realise A XOR B when only the true inputs A and B are available?
- F(A,B,C,D,E) = E + (A ⊕ B ⊕ C ⊕ D). How many literals does the minimal sum-of-products of F contain?
- F(A,B,C,D,E) = Σm(1,4,5,10,11,14,16,17,21,25,26,28,30). How many literals are in its minimal sum-of-products?