How to Build an OR Gate with Transistors

OR gate

In this article, we go over how to build an OR gate circuit with transistors.

Transistors are the building blocks of logic gates, such as NOT gates, OR gates, AND gates, and NAND gates, and gates are the building blocks of integrated circuits.

With transistors arranged in certain configurations, we can build the various gates that are used in electronics.

So from this article, you will not only learn how to build logic gates from discrete transistor components, but you learn more about how transistors operate in order to create gates. This teaches you more about the basic building blocks of electronic circuits, the transistor.

Any type of transistor can be used in order to create logic gates, including BJTs or FETs. However, in this article, we will use NPN BJTs in order to do it.

The 2N3904 transistor is a very common NPN BJT transistor which can act as a switch or an amplifier.

The NPN BJT transistor, just like a FET, has 3 terminals: these 3 terminals are the base, collector, and emitter.

The base functions as the turn-on switch. A small amount of current flowing through the base can allow a much larger current to flow from the collector to the emitter. The BJT functions as an electrical switch, in which if we feed a small current to the base of a transistor, it turns on a larger current from the collector to the emitter.

The components we need to build this circuit are shown below.

Components Needed

  • 2 2N3904 Transistors
  • 2 10KΩ Resistor
  • 470Ω Resistor
  • LED

So with just a few components, we can construct an OR gate circuit.

Know that an OR gate circuit turns on a load if any of the inputs are a logic HIGH.

Below is the truth table for an OR gate.

OR Gate Logic
Inputs Output
0 0 0
0 1 1
1 0 1
1 1 1

So as you can see from the truth table, an OR gate will have a HIGH output if any of the inputs is a logic HIGH. Otherwise, it will have a logic LOW state if all inputs are a logic LOW.

The circuit we will build is shown below.

OR gate circuit built with transistors

So what makes this an OR gate?

You can see that the transistors are in parallel with each other. It is an OR gate because it can take one path or another (or several others if there are more than 2 inputs). Current, therefore, multiple paths to travel. As long as 1 input is a logic HIGH, current can travel through it and get to the load to turn it on.

As stated before, transistors are the building blocks for ICs, because they form the logic gates which are used heavily in computers.

Arranging transistors in certain configurations allows us to build gates, which can then be used to form higher-level electronic devices such as registers, latches, etc.

Knowing how transistors can be used to create logic gates allows you to understand electronics at the lowest level, so that you can get the best understanding of it from the most basic fundamental level.

This, again, was done through NPN BJT transistors but it can also be done in a similar fashion with FETs such as MOSFETs.

So this is how to build an OR gate with transistors.

Related Resources

HTML Comment Box is loading comments...