The majority function is a Boolean function f(x, y, z) that takes the value 1 whenever a majority of the variables x, y, z and 1. In the circuit diagram for the majority function shown below, the logic gates for the boxes labeled P and Q are, respectively,
(A) XOR, AND
(B) XOR, XOR
(C) OR, OR
(D) OR, AND
Answer: (D)
Explanation:
Truth tables of given operations are as follows:
y | z | XOR | OR | AND |
0 | 0 | 0 | 0 | 0 |
0 | 1 | 1 | 1 | 0 |
1 | 0 | 1 | 1 | 0 |
1 | 1 | 0 | 1 | 1 |
Thus we have OR and AND which give different outputs on (0, 0) and (1, 1). The encoder can hence select from the two and decide output of the function according to x.
Reference:
http://nptel.ac.in/courses/117106086/30
This solution is contributed by Kriti Kushwaha .
Quiz of this Question