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 LawsFlip-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 ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsUniversal Gates: NOR and NAND

Longest path: 74 steps · 321 total prerequisite topics

Prerequisites (1)

Leads To (2)