How to Build a NOT Gate with a Transistor

NOT gate



In this article, we go over how to build a NOT gate circuit with a single transistor.

Transistors are the building blocks of logic gates, such as NOT gates, AND gates, 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 heavily 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.

Really 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.

A transistor is an electrical switch, in which if we feed a small current to the base of the 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

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



So with just a few components, just one single transistor, we can construct a NOT gate circuit.

Know that a NOT gate acts as an inverter. When there is no power to the base of the transistor, the load will be powered on. When there is sufficient power to the base of the transistor, the load is powered on.

We will explain why this occurs and it's simply due to the configuration of the circuit.

Being that the LED is connected to the VCC power source through a pull-up resistor, it is normally ON. Thus, even though there is no power to the base of the transistor, the LED is powered on via the pull-up resistor to the 5V power source.

Now if there is sufficient current to the base of the transistor, the pull-up resistor effect goes away, as voltage is now distributed across the transistor; the load, in this case, the LED, shuts off.

Below is the truth table for a NOT gate.


NOT Gate Logic
Input Output
0 1
1 0



So as you can see from the truth table, a NOT gate is the exact opposite logic state of the input. If the input is ON, the output is OFF and vice versa.

The circuit we will build is shown below.


NOT gate circuit built with a transistor


So what makes this a NOT gate?

So to understand what makes this a NOT gate, we have to understand how the transistor works.

A NPN BJT transistor is a component that conducts current across from the collector to the emitter when there is sufficient current to the base. Without sufficient current to the base, a larger current from the collector to the emitter cannot occur. It's a small base current that allows for the flow of a much larger current from the collector to the emitter. This is based on the NPN BJT transistor is doped. The collector and emitter regions are doped heavier with greater electrons, so that it can produce a much larger electron flow from the collector to the emitter.

What allows the LED to be ON without the transistor being ON through a sufficient base current is the fact that we have it connected to the 5V power source via a pull-up resistor. This pull-up resistor gives the load power, which allows the LED to be on.

Now with the transistor turned on via sufficient current to the base, the pull-up resistor effect goes away. The LED no longer has sufficient voltage to power on and it turns off.

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 always 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 starting level.

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

So this is how to build a NOT gate with a single transistor.

Related Resources



HTML Comment Box is loading comments...