Building Logic Gates Using NPN Transistors

by EngineeringLead in Circuits > Electronics

7311 Views, 51 Favorites, 0 Comments

Building Logic Gates Using NPN Transistors

Snip20160106_23.png

In this instructable, we are going to build the NOT, AND, OR logic gates using NPN transistors.
The following link covers the fundamentals of the gates mentioned above: Digital Logic Gates (Part 1)

Parts needed:

Breadboard

9V battery

Battery connector

5V regulator

2 10K resistors

1 5.1K resistor

2 NPN transistors

1 LED (any color)

Wires as needed

Theory Behind Transistors

Snip20160106_22.png

What are transistors? And how do they operate?

Transistors are semiconductor devices (made of silicon or germanium) that are used as either controlled switches, or as amplifier controls. A good analogy would be that a transistor acts as a faucet that controls the flow of water by a control knob; in a transistor, the control knob would be a small current applied to a control terminal, and as a result controlling the larger current flow out of the other two terminals. Transistors are used in almost every electric application out there. There are two types of transistors; bipolar transistors and field-effect transistors. For this instructable, we will focus on bipolar transistors. Bipolar transistors comprise of three terminals; collector, base, and emitter. Also, there are two configurations for bipolar transistors; NPN and PNP configurations. In this instructable, we are going to use NPN transistors. Note: the pin configuration of an NPN bipolar junction transistor is shown in the attached figure. NPN bipolar transistors use small current and positive voltage at its base to control the flow of a larger current from the collector to the emitter.

NOT Gate (Inverter)

Snip20160105_4.png
Snip20160105_5.png
Snip20160106_19.png
Snip20160106_10.png
Snip20160106_11.png

The desired gate is the NOT gate (inverter), and its symbol and truth table are shown in Figures 1 & 2 respectively. The Resistor-Transitor Logic (RTL) configuration for the inverter is shown in Figure 3, and it was constructed on a breadboard for testing purposes. Also, we are going to test the two possible inputs and observe their corresponding outputs, in order to ensure that RTL constructed is indeed correct. The output was observed using an LED circuit detector. If the LED is on, then the output is High (1). If the LED is off, then the output is Low (0). Finally, looking at the output of the constructed circuit and the NOT gate truth table, we can conclude that the RTL circuit configuration is indeed correct.

AND Gate

Snip20160105_6.png
Snip20160105_7.png
Snip20160106_17.png
Snip20160106_1.png
Snip20160106_2.png
Snip20160106_3.png
Snip20160106_4.png

The desired gate is the AND gate, and its symbol and truth table are shown in Figures 1 & 2 respectively. The Resistor-Transitor Logic (RTL) for the inverter is shown in Figure 3, and it was constructed on a breadboard to observe the outputs. Also, we are going to test the four possible inputs and observe their corresponding outputs, in order to ensure that RTL constructed is indeed correct. For the breadboard part, Input 1 (A) is represented by the white wire, Input 2 (B) is represented by the blue wire, and the output is represented by the state of the LED (either on or off). If the LED is on, then the output is High (1). If the LED is off, then the output is Low (0). Finally, looking at the output of the constructed circuit and the AND gate truth table, we can conclude that the RTL circuit configuration is indeed correct.

OR Gate

Snip20160105_8.png
Snip20160105_9.png
Snip20160106_18.png
Snip20160106_5.png
Snip20160106_7.png
Snip20160106_8.png
Snip20160106_9.png

The desired gate is the OR gate, and its symbol and truth table are shown in Figures 1 & 2 respectively. The Resistor-Transitor Logic (RTL) for the inverter is shown in Figure 3, and it was constructed on a breadboard to observe the outputs. Also, we are going to test the four possible inputs and observe their corresponding outputs, in order to ensure that RTL constructed is indeed correct. For the breadboard part, Input 1 (A) is represented by the white wire, Input 2 (B) is represented by the blue wire, and the output is represented by the state of the LED (either on or off). Finally, looking at the output of the constructed circuit and the OR gate truth table, we can conclude that the RTL circuit configuration is indeed correct.