How would you set up a circuit to obtain NOT gate using a transistor?



The NOT gate is a device which has only one input and one output i.e. A = Y means Y equals NOT A.
This gate cannot be realised by using diodes. However, it can be realised by making the use of a transistor. This can be seen in the figure given below:

Here, the base B of the transistor is connected to the input A through a resistance RB and the emitter E is earthed. The collector is connected to 5 V battery. The output Y is the voltage at C with respect to the earth. The resistors,${ R }{ B }$ and
${ R}
{ C }$ are so chosen that, if emitter-base junction is unbiased, the transistor is in cut-off mode and if emitter-base junction is forward biased by 5 V, the transistor is in saturation state.