The correct option is
C NAND
From the given circuit diagram, point
A and
B can be at
5 V (level 1) or
earthed (level 0) with the help of a battery.
Here, there are four possible cases.
1.) When both
A and
B are earthed
2.) when
A is connected to battery and
B is earthed
3.) when
B is connected to the battery and
A is earthed
4.) when both
A and
B are connected to the battery
Let us take a possibility - when
A is connected to the positive terminal of the battery and
B is earthed
(A=1 and B=0) then the upper diode is reversed biased, and the lower one is forward biased. Due to voltage difference the base current will flow. Hence, current will flow in the collector region of the transistor and we will get an output as
1.
When both
A and
B are connected to the battery, then the diodes are reverse biased and hence at the end of base resistance the potential will be zero. Hence, the transistor will be saturated, and the output will be
0.
Similarly, if we check for the remaining two possibilities, we see that the truth table obtained is that of
NAND gate.
Hence, the correct option is
(C).