A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Universal Gates: NOR and NAND

College Depth 73 in the knowledge graph ☐ I know this ☆ Set as goal
620topics build on this
321prerequisites beneath it
See this on the map →
Boolean Algebra and Fundamental Laws→→Flip-Flops and LatchesXOR and XNOR Gates
gates universal nand nor

Core Idea

NAND and NOR gates are universal because any boolean function can be constructed using only NAND gates (or only NOR gates). This property makes them essential for minimizing component types in digital circuits.

How It's Best Learned

Design AND, OR, and NOT using only NAND gates; repeat with NOR. Observe how the same gate type replaces different gate families.

Common Misconceptions

Not all gates are equally universal—AND and OR alone cannot implement NOT. The order matters when stacking universal gates.

Explainer

From Boolean algebra, you know that any logical expression can be written using AND, OR, and NOT. These three operations are functionally complete — together they can express any truth table. But here is a remarkable fact: you can throw away two of those three gate types and still build everything, as long as the one gate you keep is either NAND or NOR. These are called universal gates because each one alone is sufficient to implement any Boolean function.

Start with NAND, which outputs 0 only when both inputs are 1 (it is AND followed by NOT). To build a NOT gate, connect the same signal to both inputs of a NAND: NAND(A, A) = NOT(A), because when A is 1, both inputs are 1, so the output is 0, and when A is 0, at least one input is 0, so the output is 1. To build an AND gate, take the output of a NAND and feed it through your NAND-built NOT — you are negating the negation, recovering the original AND. To build an OR gate, apply De Morgan's theorem: A OR B = NOT(NOT(A) AND NOT(B)), which is a NAND of two inverted inputs. Since you already know how to build NOT from NAND, you can build OR. With AND, OR, and NOT all implemented, you can build any Boolean function using nothing but NAND gates.

The same argument works for NOR (which outputs 1 only when both inputs are 0). NOR(A, A) gives NOT(A). Two NOTs followed by a NOR gives AND. A NOR followed by a NOT gives OR. The constructions are symmetric to the NAND case, following from the other form of De Morgan's theorem.

Why does this matter in practice? Manufacturing simplicity. If a chip fabrication process can produce one gate type reliably, it can produce entire processors. Early integrated circuits were built entirely from NAND gates (TTL 7400 series) because NAND is slightly faster and cheaper to fabricate in common transistor technologies. Rather than designing and testing three or four different gate structures, engineers design one and compose everything from it. This is why NAND-only or NOR-only implementations appear throughout real hardware — they are not just a theoretical curiosity but a practical manufacturing strategy. Understanding universality also deepens your grasp of Boolean algebra: it proves that the AND/OR/NOT decomposition, while intuitive, is not the only way — or even the most efficient way — to think about logic.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Universal Gates: NOR and NAND

Longest path: 74 steps · 321 total prerequisite topics

Prerequisites (1)

Leads To (2)