Digital Electronics

Logic Gates

By CourseTron Team ·  7 min read ·  Updated Oct 2026 💬 𝕏 in f
Table of Contents
    ? Print / Save as PDF

    In short: Logic gates are the physical, transistor-level building blocks that implement Boolean algebra — AND, OR, NOT, NAND, NOR, XOR and XNOR — and every digital chip, from a 4-bit adder to a 100-billion-transistor SoC, is ultimately a vast interconnection of these seven primitives.

    If you open the layout of any modern VLSI chip in a tool like Cadence Virtuoso or Synopsys IC Compiler II, strip away the hierarchy, and keep zooming in, you eventually reach the same thing every time: tiny clusters of MOSFETs wired to compute a Boolean function. Those clusters are logic gates. Understanding them is not optional trivia — it is the foundation on which synthesis, timing, power and physical design all stand. This guide walks through what each gate does, how to read its symbol and truth table, and why gates matter the moment you move from theory to silicon.

    What a Logic Gate Actually Is

    A logic gate is a circuit that takes one or more binary inputs (0 or 1, typically mapped to 0 V and the supply rail VDD) and produces a single binary output according to a fixed Boolean rule. In CMOS — the technology behind essentially all digital chips since the 1980s — each gate is built from a pull-up network of PMOS transistors connected to VDD and a complementary pull-down network of NMOS transistors connected to ground. Exactly one network conducts for any input combination, which is why static CMOS draws almost no current except during switching.

    A 2-input NAND gate in a standard-cell library needs just 4 transistors. A 2-input AND needs 6, because AND is physically built as NAND followed by an inverter — CMOS naturally produces inverting functions.

    2-input CMOS NAND: PMOS in parallel (pull-up), NMOS in series (pull-down) VDD P1P2 Y N1 N2 GND A drives P1 and N1B drives P2 and N2Y = 0 only when A=1 and B=1 CourseTron · coursetron.com
    Static CMOS NAND: the pull-down NMOS devices are in series (both must be 1 to pull Y low), the pull-up PMOS devices are in parallel.

    The Three Fundamental Gates

    Everything starts with three operations from Boolean algebra, formalised by George Boole in 1854 and mapped onto switching circuits by Claude Shannon in his 1937 thesis.

    • AND (Y = A · B): output is 1 only when every input is 1. Think of a security door needing both a keycard and a PIN.
    • OR (Y = A + B): output is 1 when at least one input is 1. An alarm that triggers if the front door or a window opens.
    • NOT (Y = A'): the inverter — a single input flipped. The simplest gate, 2 transistors, and the most used cell on any chip.

    Symbols and Truth Tables

    Engineers read gate symbols the way musicians read notation. The distinctive shapes (IEEE/ANSI 91-1984) let you trace a schematic at a glance; the small bubble on an output means "inverted".

    ABANDORNANDNORXORXNOR
    00001101
    01011010
    10011010
    11110001

    XOR (exclusive-OR, Y = A ⊕ B) outputs 1 only when inputs differ. It is the heart of every binary adder: the sum bit of a half-adder is simply A ⊕ B, and the carry is A · B.

    Basic gate symbols with Boolean expressions (output on the right)ANDY = A · BNANDY = (A · B)'XORY = A ⊕ BThe bubble on NAND marks an inverted output. XOR is 1 only when A and B differ. CourseTron · coursetron.com
    Symbols and Boolean expressions for AND, NAND and XOR; the small bubble marks an inverted output.

    Watching a Gate in Motion

    A truth table is static, but silicon is not. The diagram below animates a logic 1 propagating through an inverter chain — the same mechanism that creates propagation delay, the quantity static-timing-analysis tools like Synopsys PrimeTime obsess over.

    A signal edge rippling through three inverters, one delay per stageINV1INV2INV3inoutEach stage adds propagation delay t_pd; the delays add along the path.Orange dot = the switching edge. CourseTron · coursetron.com
    Each inverter adds a few picoseconds of delay at advanced nodes — this accumulation is why long logic paths limit a chip's maximum clock frequency.

    NAND, NOR and the Idea of Completeness

    NAND (NOT-AND) and NOR (NOT-OR) look like afterthoughts, but they are the workhorses of real design. Each is functionally complete: you can build AND, OR, NOT — and therefore any Boolean function whatsoever — using only NAND gates, or only NOR gates. This is why foundry standard-cell libraries are dominated by NAND/NOR variants, and why our companion article on universal logic gates is worth reading next. Synthesis tools such as Synopsys Design Compiler and Cadence Genus exploit this: they map your RTL onto whichever gates give the best timing, area and power for the target library.

    From Gates to Chips: Why This Scales

    A single gate is trivial. The power comes from composition. Four gates make a 1-bit full adder; 32 of those make a 32-bit adder; thousands of adders, multipliers and registers make a CPU core. A modern SoC can exceed 50 billion transistors, yet it is nothing more than a hierarchical sea of these seven gate types plus memory and analog blocks. Teams verify that sea with Siemens Questa or Synopsys VCS, check physical rules with Siemens Calibre, and sign off timing across process corners — all built on the assumption that each gate behaves exactly as its truth table promises.

    For teams moving from fundamentals to tapeout-grade design, structured training (like the programs at ChipXpert VLSI training) bridges the gap between truth tables and running real EDA flows.

    Gate count is a rough complexity metric, but designers normalise to the 2-input NAND — the "NAND2 equivalent" or gate-equivalent (GE) — so a block's size can be compared independently of the manufacturing node.

    Common Pitfalls Beginners Hit

    • Confusing OR with XOR. For two inputs they differ only at 1,1 — but that one row changes everything in arithmetic circuits.
    • Ignoring the bubble. A missed inversion bubble turns a NAND into an AND in your mental model and costs hours of debugging.
    • Assuming AND is "cheaper" than NAND. In CMOS the opposite is true, which is why synthesis prefers inverting logic.

    If you want to go deeper into how gates combine into arithmetic, our guide to combinational logic design picks up exactly here. You can also browse the full curriculum on the CourseTron courses page.

    Ready to turn these truth tables into working silicon? The CourseTron Digital Electronics track takes you from gates through RTL, synthesis and timing closure with hands-on industry tools.

    Frequently Asked Questions

    Why are NAND and NOR called "universal" gates?

    Because any Boolean function can be implemented using only NAND gates, or only NOR gates. This completeness simplifies manufacturing and is why they dominate standard-cell libraries.

    How many transistors does a basic gate need?

    In static CMOS, an inverter needs 2, a 2-input NAND or NOR needs 4, and a 2-input AND or OR needs 6 (the inverting gate plus an output inverter).

    What is the difference between OR and XOR?

    OR outputs 1 if any input is 1, including when both are 1. XOR outputs 1 only when the inputs are different, so 1 XOR 1 = 0. XOR is essential for addition and parity checks.

    Do real chips use AND/OR gates directly?

    Logically yes, but physically the synthesis tool often maps them to NAND/NOR networks plus inverters because those are faster and smaller in CMOS. The logical behaviour is identical.

    \n

    VLSI and digital fundamentals cluster

    Strengthen your foundation before RTL, verification, physical design and embedded systems.

    combinational circuitssequential circuitsmultiplexerflip-flop vs latchBoolean algebraKarnaugh mapnoise margin in CMOSCMOS fabrication processSRAM vs DRAMMOSFET basics
    \n
    Advertisement