Introduction: Build a AND Gate From Transistors

About: “Let the future tell the truth, and evaluate each one according to his work and accomplishments. The present is theirs; the future, for which I have really worked, is mine.” Nikola Tesla

In this guide I will show you how to build a AND gate with two NPN transistors.

Using the image above as a reference, we see that our transistor has three (3) pins. A collector (C), base (B), and emitter (E). Functionally, the transistor acts as an electronic switch, with the base input controlling whether or not there will be a flow of electricity from collector to emitter. There are different types of transistors with different purposes; from high speed switching to amplification, but in this guide we are just using the NPN transistor as a switch.

Step 1: Parts List

To build a logic AND gate you are going to need the following parts:

  • 1x Breadboard
  • 1x LED (Any color, red was used in this project)
  • 1x 1K Ohm resistor
  • 2x 10K Ohm resistors
  • 2x NPN Transistors (I used the 2N2222)
  • 2x N.O. Push buttons (Normally Open)
  • 5x Wires/Jumper Wires

The only prerequisite to this project is the ability to read and construct a circuit from a schematic.

Step 2: Schematic / Truth Table

Construct the gate of out the schematic above. ^

Every gate has its own truth table stating what the output will be based on the state of its inputs. For the AND gate, the table is as follows:

0  0  0
0  1  0
1  0  0
1  1  1

You see, the only time the output is ON (1), is when both A AND B are ON (1). Any other state results in the output being OFF (0).

That is it for the AND gate. A seemingly simple device, but when arranged in certain combinations with other gates (NAND, OR, NOR, XOR, XNOR, NOT) we get devices from computers to cell phones and rocket guidance systems.