Logic Gates | Basics, Transistor Diagrams, Truth Tables, Circuits

Table of Contents

Picture of Akila Weerathunga

Akila Weerathunga

Content Creator

Introduction

Logic gates are the building blocks of digital electronics. Every computer, smartphone, and calculator depends on them. A logic gate takes inputs, processes them, and gives a single output that follows a logical rule.

In this article, we’ll go step by step. First, we’ll see the truth tables. Then, we’ll look at transistor-level designs. Finally, we’ll connect them into circuits.

Focus keyphrase: Logic Gates

What Are Logic Gates?

Logic gates use binary signals. That means 0 (LOW, 0 volts) or 1 (HIGH, supply voltage like +5V).

There are seven basic logic gates:

  1. AND Gate
  2. OR Gate
  3. NOT Gate (Inverter)
  4. NAND Gate
  5. NOR Gate
  6. XOR Gate (Exclusive OR)
  7. XNOR Gate (Exclusive NOR)

1. AND Gate

Truth Table

Input AInput BOutput (A·B)
000
010
100
111

Transistor Diagram (CMOS)

  • Two PMOS transistors in parallel at the top (connected to Vcc).
  • Two NMOS transistors in series at the bottom (connected to GND).
  • When both inputs are HIGH, output goes HIGH.

Circuit Symbol

A flat-ended shape with two inputs on the left and one output on the right.

2. OR Gate

Truth Table

Input AInput BOutput (A+B)
000
011
101
111

Transistor Diagram (CMOS)

  • Two PMOS transistors in series at the top.
  • Two NMOS transistors in parallel at the bottom.
  • If any input is HIGH, output goes HIGH.

3. NOT Gate (Inverter)

Truth Table

Input AOutput
01
10

Transistor Diagram

  • One PMOS and one NMOS transistor in series.
  • If input is HIGH, PMOS is OFF, NMOS is ON → output = LOW.
  • If input is LOW, PMOS is ON, NMOS is OFF → output = HIGH.

4. NAND Gate

Truth Table

Input AInput BOutput (¬(A·B))
001
011
101
110

Diagram

It’s just an AND gate followed by a NOT gate.

👉 NAND is very important. Using only NAND gates, we can build all other gates.

5. NOR Gate

Truth Table

Input AInput BOutput (¬(A+B))
001
010
100
110

Diagram

OR gate followed by NOT gate.

👉 NOR is also a universal gate.

6. XOR Gate

Truth Table

Input AInput BOutput (A⊕B)
000
011
101
110

Explanation

  • Output is HIGH only when inputs are different.
  • Built from a combination of NAND, OR, and AND gates.

7. XNOR Gate

Truth Table

Input AInput BOutput (¬(A⊕B))
001
010
100
111

Explanation

  • Output is HIGH only when inputs are the same.
  • Built from XOR + NOT.

How Logic Gates Become Circuits

  • Half Adder: Uses an XOR and AND gate to add two bits.
  • Full Adder: Expands half adder with carry input.
  • Multiplexers, Flip-Flops, Counters: All are based on gates.
  • CPUs: Billions of logic gates packed in microchips.

Why Transistor-Level Design Matters

Logic gates are not just abstract math. They are physical circuits.
Each gate is built from transistors. With CMOS (Complementary Metal Oxide Semiconductor), we combine PMOS and NMOS to reduce power loss.

This is why processors can run fast without overheating.

Applications of Logic Gates

  • Electronics: Used in digital circuits.
  • Computers: Perform binary math.
  • Signal Processing: Filtering, decision making.
  • IoT Devices: Embedded logic circuits.
  • Robotics: Sensors and control systems rely on gates.

Final Thoughts

Logic gates are the foundation of modern electronics. From transistors to truth tables, they explain how 0s and 1s turn into powerful computation. If you understand them, you understand the base of computer science and physics combined.

Leave a Reply

Your email address will not be published. Required fields are marked *

Trending Topics

Watch Our Videos