The use of transistor for OR gate operation depends on the transistor’s switching speed. For OR gate operation, we use a transistor as a switch.
Two BC547 NPN transistor
Two 100 ohm resistor
Two 4.7k resistor
Two toggle switches
General purpose LED
5V power supply
Some jumper wires
Two-input OR Gate using transistor
The BC547 is used here in common emitter configuration. This transistor utilizes the low power and also has low-frequency. In the common emitter configuration, transistor gives a phase shift of 180 degrees. Due to change in 180 degree in phase shift, it is able to give high at the output when our input is low and vice-versa. The biasing of the transistor is done in a way so that the operating point of the transistor comes closer to the origin in the transfer-characteristic curve of the transistor. This causes an immediate switching of the transistor from its cutoff to saturation state. Hence when we apply enough voltage at the base of the transistor, it immediately reaches into its saturation state and the transistor starts conducting.
We have used BC547general purpose NPN bipolar junction transistor. Other range of BC transistor (BC548, BC549) also works fine here. By using RTL (resistor transistor logic) we have designed the OR gate by two transistors and some resistor.
How It Works
The transistors are connected in parallel and their bases are used as input. The base of both the transistors act like input and one of the emitters of both the transistors is used to derive the output. Initially, both the switches are in OFF state so none of the transistor bases is getting a power supply. The base to emitter junction and base to collector junction of both the transistors have a voltage lower than 0.65V, which is the practical threshold voltage of the diode. Both junctions are in reverse bias hence both the transistors turn off and go into their cutoff state. Therefore the transistors act like an open switch. Since all the current coming from the collector through resistor R4 is blocked by the transistor hence we get a low voltage at the output, which turns off the LED.
In next case when we close the switch 1 then the base of the first transistor is getting a positive value of voltage. The base to emitter junction and base to collector junction of the first transistor have a voltage greater than threshold voltage so both junctions are in forward bias. The first transistor reaches into saturation state and acts like a short circuit whereas the second transistor is still in the cutoff state due to no power supply base. Hence all current passes through the first transistor to the output and our LED lights up.
Likewise, if we open switch 1 and close switch 2 then the first transistor goes in cutoff while the second transistor in saturation. Now current flows through the second transistor and we get high at the output
When we close both the switches, the junction of both the transistors has a voltage greater than threshold voltage so both junctions are in forward bias. Therefore both transistors are in saturation state and act like a short circuit. The current now gets a short circuit path and flows from both of the transistors which derive high at the output, thereby lighting up the LED.
We can say for OR logic, the transistor is connected in parallel and either of the transistors must be in its conducting state to derive high at the output. If one or both the inputs have high value then at the output we get high, otherwise low.