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

Longest path: 70 steps · 311 total prerequisite topics

Prerequisites (1)

Leads To (4)