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

Boolean Functions, Logic Gates, and Digital Circuits

College Depth 69 in the knowledge graph I know this Set as goal
723topics build on this
311prerequisites beneath it
See this on the map →
Boolean AlgebraBoolean Circuit Complexity and Lower BoundsBoolean Satisfiability (SAT)+2 more
Boolean-functions logic-gates circuits DNF-CNF

Core Idea

A Boolean function f: {0,1}ⁿ → {0,1} is computed by a logic circuit using AND, OR, NOT gates. Every Boolean function can be expressed in disjunctive normal form (DNF) or conjunctive normal form (CNF). Circuit complexity measures the minimum gates or depth needed.

How It's Best Learned

Build truth tables for Boolean functions. Express functions in DNF (OR of ANDs) and CNF (AND of ORs). Apply Boolean algebra identities to simplify circuits. Design circuits for arithmetic (adders, multipliers).

Common Misconceptions

DNF and CNF are normal forms, not canonical until further specified. A Boolean function can have multiple minimal representations. Circuit complexity depends on depth and gate count—it's not unique.

Explainer

A Boolean function takes n binary inputs (each 0 or 1) and produces a single binary output. You've already learned Boolean algebra — the rules governing AND, OR, and NOT on individual values. A Boolean function simply extends this systematically: for all 2ⁿ possible input combinations, it specifies the output for each one. A truth table is the most direct definition of any Boolean function — list all 2ⁿ rows and record the output for each.

The connection to circuits is direct: any Boolean function can be computed by wiring AND, OR, and NOT gates together. The systematic translation uses Disjunctive Normal Form (DNF) — also called sum-of-products. Identify every row of the truth table where the output is 1. For each such row, write an AND term (a "minterm") that is satisfied only by that exact input combination. Then OR all those terms together. For example, if f(x,y,z) = 1 only when (x=1, y=0, z=1), the DNF minterm is (x ∧ ¬y ∧ z). Conjunctive Normal Form (CNF) — product-of-sums — works dually: identify all rows where the output is 0 and write OR terms (maxterms) that exclude those combinations, then AND everything together.

DNF and CNF guarantee that every Boolean function has a circuit representation — a completeness result. But the circuits produced this way can be large and redundant. The Boolean algebra identities you already know let you simplify: (x ∧ ¬y ∧ z) ∨ (¬x ∧ ¬y ∧ z) simplifies to (¬y ∧ z) by factoring out ¬y ∧ z. Circuit complexity measures how efficient a circuit can be — specifically, the minimum number of gates (circuit size) or the fewest gate-layers from inputs to output (circuit depth). Different circuits can compute the same function, so there is no single canonical representation; the interesting question is how small the optimal circuit is.

The most instructive design exercise is building a circuit for addition. A half adder adds two 1-bit inputs: the sum bit is XOR(A,B) (the inputs differ) and the carry bit is AND(A,B) (both are 1). A full adder takes three bits — two inputs plus a carry-in — and produces a sum and carry-out. Chain n full adders together and you have a circuit that adds two n-bit binary numbers — the same operation a CPU performs billions of times per second. This shows how the abstract machinery of Boolean functions and normal forms connects directly to the arithmetic hardware at the heart of every computer.

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 Functions, Logic Gates, and Digital Circuits

Longest path: 70 steps · 311 total prerequisite topics

Prerequisites (1)

Leads To (4)