PartAndStock
Fundamentals

What Are Logic Gates? (AND, OR, NOT, NAND)

1 min read
Quick answer

Logic gates are the smallest building blocks of digital circuits. They take one or more 0/1 (LOW/HIGH) inputs, process them by a set rule, and produce a single 0/1 output. All microchips are made of billions of these gates.

What Is a Logic Gate?

Each gate applies a logic rule to its inputs. The inputs and output are represented by logic levels (0 = LOW, 1 = HIGH). A gate's behavior is fully defined by a truth table.

Basic Gates

GateRuleOutput is 1 when…
ANDAll are 1all inputs are 1
ORAt least one is 1any input is 1
NOTInverterinput is 0
NANDThe inverse of ANDat least one input is 0
XORInputs differinputs are not equal

Truth Table Example (AND)

ABA AND B
000
010
100
111

Why Is NAND Important?

NAND is the "universal gate": using only NAND gates you can build all logic functions, including AND, OR and NOT. That's why it's used so much as a basic building block in chip manufacturing.

Common Mistakes

  • Confusing OR with XOR: in OR 1+1=1; in XOR 1+1=0 (if inputs are equal the output is 0).
  • Floating input: an unconnected gate input is undefined; it needs a pull-up/pull-down.
  • Supply/level compatibility: connecting different logic families (TTL/CMOS) directly can cause problems.

Frequently Asked Questions

How many basic logic gates are there?+
Three basic gates (AND, OR, NOT) and the derived NAND, NOR, XOR, XNOR are commonly used.
Where are logic gates found?+
Inside processors, memories and all digital circuits; they're also sold as separate ICs (e.g. the 74 series).

Search related parts in our catalog

Find the right part by comparing price, stock and distributors.

Search These Parts