Realize NAND, NOR and NOT gates using transistors.


Q.) Realize NAND, NOR and NOT gates using transistors.

Subject: digital circuit and design

To realize NAND, NOR, and NOT gates using transistors, we typically use Bipolar Junction Transistors (BJTs) or Metal-Oxide-Semiconductor Field-Effect Transistors (MOSFETs). Here, we will use MOSFETs for our explanation, specifically the NMOS and PMOS types, which are commonly used in Complementary MOS (CMOS) technology.

NOT Gate (Inverter)

A NOT gate, also known as an inverter, inverts the input signal. The CMOS inverter consists of a PMOS transistor at the top and an NMOS transistor at the bottom.

Circuit Diagram:

 Vdd
  |
  |
  |-----| PMOS
  |     |
  |-----|
  |
  |-----| NMOS
  |     |
  |-----|
  |
  GND

Operation:

  • When the input (connected to both gates) is low (0), the PMOS is ON (conducting), and the NMOS is OFF (not conducting). The output is connected to Vdd through the PMOS, resulting in a high output (1).
  • When the input is high (1), the PMOS is OFF, and the NMOS is ON. The output is connected to GND through the NMOS, resulting in a low output (0).

NAND Gate

A NAND gate outputs a low (0) only when all its inputs are high (1). Otherwise, it outputs a high (1).

Circuit Diagram:

 Vdd
  |
  |-----| PMOS
  |     |
  |-----| PMOS
  |     |
  |-----|
  |
  |-----| NMOS
  |     |
  |-----| NMOS
  |     |
  |-----|
  |
  GND

Operation:

  • When both inputs are high (1), both NMOS transistors are ON, and both PMOS transistors are OFF. The output is connected to GND through the NMOS transistors, resulting in a low output (0).
  • When any input is low (0), the corresponding PMOS transistor is ON, and at least one NMOS transistor is OFF. The output is connected to Vdd through the PMOS transistor(s), resulting in a high output (1).

NOR Gate

A NOR gate outputs a high (1) only when all its inputs are low (0). Otherwise, it outputs a low (0).

Circuit Diagram:

 Vdd
  |
  |-----| PMOS
  |     |
  |-----| PMOS
  |     |
  |-----|
  |
  |-----| NMOS
  |     |
  |-----| NMOS
  |     |
  |-----|
  |
  GND

Operation:

  • When both inputs are low (0), both PMOS transistors are ON, and both NMOS transistors are OFF. The output is connected to Vdd through the PMOS transistors, resulting in a high output (1).
  • When any input is high (1), the corresponding NMOS transistor is ON, and at least one PMOS transistor is OFF. The output is connected to GND through the NMOS transistor(s), resulting in a low output (0).

Comparison Table

Gate Type High Output Condition Low Output Condition PMOS Configuration NMOS Configuration
NOT Input is Low (0) Input is High (1) Single PMOS ON Single NMOS OFF
NAND Any Input is Low (0) All Inputs are High (1) Both PMOS ON Both NMOS ON
NOR All Inputs are Low (0) Any Input is High (1) Both PMOS ON Both NMOS ON

Example

Let's take an example of a NAND gate with two inputs A and B:

  • If A = 0 and B = 0, then at least one PMOS is ON, and both NMOS are OFF, so the output is high (1).
  • If A = 0 and B = 1, the same condition as above applies, and the output is high (1).
  • If A = 1 and B = 0, again at least one PMOS is ON, and both NMOS are OFF, so the output is high (1).
  • If A = 1 and B = 1, both PMOS are OFF, and both NMOS are ON, so the output is low (0).

This behavior matches the truth table of a NAND gate:

A B Output
0 0 1
0 1 1
1 0 1
1 1 0

In summary, by using transistors in different configurations, we can create the basic logic gates that form the building blocks of digital circuits.