Question
Question: The output of 2 input gates is 1 only if its inputs are equal. It is true for A. NAND B. AND ...
The output of 2 input gates is 1 only if its inputs are equal. It is true for
A. NAND
B. AND
C. EX-NOR
D. EX-OR
Solution
As a first step, one could read the question well along with the given options. Then one could get the truth table for two inputs in each of the mentioned gates by applying the respective logic. Thus find out which of them will give output as 1 whenever the inputs are of the same value.
Complete step-by-step solution:
In the question we are told that the output of two input gates is 1 when the inputs are equal. We are given four options under this statement and we are supposed to find this statement is true for which of the given gates.
In order to answer this question, one should first find out the truth table for each of the given gates for two inputs A and B.
The truth table for AND gate and NAND gate:
A | B | Y (AND) | Y (NAND) |
---|---|---|---|
0 | 0 | 0 | 1 |
0 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
1 | 1 | 1 | 0 |
Therefore, we found that, not all same inputs give 1 as the output.
The truth table for EX-OR and EX-NOR gates:
A | B | Y (EX-OR) | Y (EX-NOR) |
---|---|---|---|
0 | 0 | 0 | 1 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
Therefore, we found that when inputs have the same value the output is 0 for EX-OR gate while EX-NOR gate which is complementary to EX-OR gate gives the output as 1 whenever the input is the same.
Hence, we found the answer to be option C EX-NOR gate.
Note: We could say that logic gates form the basic building blocks of any digital system. Logic gates basically is an electronic circuit that has one or may be more than one input but only one output. Certain logic is applied to get the relationship between the input and output and hence the name.