Logic Gates: Types, Symbols & Truth Tables

Logic gates are the basic building blocks of every digital circuit. A logic gate takes one or more binary inputs (0 or 1) and produces a single binary output according to a fixed Boolean rule. Every processor, memory and digital chip is built from millions of these gates wired together. This guide covers the seven standard gates — AND, OR, NOT, NAND, NOR, XOR and XNOR — with their symbols, Boolean expressions and truth tables.

What is a logic gate?

A logic gate is a physical device (built from transistors) that implements a Boolean function. Inputs and output take only two values — logic 0 (low voltage) and logic 1 (high voltage). Because the behaviour is fully defined by a truth table, gates can be combined to build any digital function, from a simple adder to a complete CPU.

The three basic logic gates

AND gate

The output is 1 only when all inputs are 1. Boolean expression: Y = A · B.

ABY = A·B
000
010
100
111

OR gate

The output is 1 when at least one input is 1. Boolean expression: Y = A + B.

ABY = A+B
000
011
101
111

NOT gate (inverter)

A single-input gate that outputs the opposite of its input. Boolean expression: Y = A'.

AY = A’
01
10

The universal and derived gates

NAND gate

AND followed by NOT: output is 0 only when all inputs are 1. Y = (A · B)'. NAND is a universal gate — any Boolean function can be built from NAND gates alone.

ABY = (A·B)’
001
011
101
110

NOR gate

OR followed by NOT: output is 1 only when all inputs are 0. Y = (A + B)'. NOR is also a universal gate.

ABY = (A+B)’
001
010
100
110

XOR gate (exclusive-OR)

Output is 1 when the inputs differ. Y = A ⊕ B = A'B + AB'. XOR is the core of adders and parity circuits.

ABY = A⊕B
000
011
101
110

XNOR gate (exclusive-NOR)

Output is 1 when the inputs are equal — the complement of XOR. Y = (A ⊕ B)'. Used as an equality/comparator element.

ABY = (A⊕B)’
001
010
100
111

Why NAND and NOR are called universal gates

Any logic function can be implemented using only NAND gates or only NOR gates. For example, a NOT is a NAND with both inputs tied together, and AND is a NAND followed by a NAND-inverter. This is why standard-cell libraries and real chips lean heavily on NAND/NOR — they are compact in CMOS and functionally complete.

How do you learn to design with logic gates?

Start with truth tables and Boolean algebra, then move to combinational and sequential design in an HDL. ChipXpert’s RTL Design course takes you from gates to synthesizable Verilog. For the next topics, see our guides on Boolean algebra, universal gates and the Karnaugh map.

FAQs on logic gates

What are the 7 basic logic gates?

AND, OR, NOT, NAND, NOR, XOR and XNOR. AND, OR and NOT are the three fundamental gates; NAND, NOR, XOR and XNOR are derived from them.

Which logic gates are universal?

NAND and NOR. Each can implement any Boolean function on its own, so any circuit can be built using only NAND gates or only NOR gates.

What is the difference between XOR and OR?

OR outputs 1 when at least one input is 1 (including both). XOR outputs 1 only when the inputs are different — it outputs 0 when both inputs are 1.

Why are NAND gates preferred in chip design?

In CMOS, NAND gates are compact, fast and functionally complete, so synthesis tools map much of a design onto NAND/NOR cells for area and performance efficiency.

🎓 Take VLSI Courses Online → Explore ChipXpert Online  –  Live VLSI courses with practical EDA lab work.
Have questions about this topic?
Share your question in comments or talk to our mentor team for batch guidance.

Ask the Admin Team

Drop your basic question in comments: eligibility, prerequisites, tools, fee range, and placement support.

Our team reviews and responds regularly.

Tags :
Share This :