Updated Jun 25, 2026

Boolean Algebra & Logic Gates

Here is one of the most beautiful facts in all of computing: the entire machine in front of you - every calculation, every pixel, every saved file - is built out of the three little words you already know from Propositional Logic. AND, OR, and NOT. That's the whole alphabet. Everything else is spelling.

This guide walks that bridge in two steps. First, boolean algebra: treating true/false as values you can calculate with, using laws that let you simplify a tangled condition the same way you'd simplify 2(x + 3). Then, logic gates: those same operations built as physical components - and how a handful of them, wired together, learn to add. By the end, "the computer is only logic" will stop being a slogan and become something you can actually trace, gate by gate.

How to read this

  • Here for the "how does a CPU work" payoff? Phase 3 builds an adder from gates.
  • Want the full bridge? Read in order - the algebra (Phase 1) and the gates (Phase 2) are what make Phase 3 click.

The phases

  1. Boolean Algebra: The Laws - true/false as 1/0, the laws (incl. De Morgan), and simplifying expressions.
  2. Logic Gates: Logic Made Physical - AND/OR/NOT/NAND/NOR/ XOR gates, their truth tables, and why NAND alone can build anything.
  3. From Gates to a Computer - wiring gates into an adder, and the leap from "adds two bits" to "is a CPU."

This builds directly on Propositional Logic. It pairs well with the hardware track for what happens once these gates become silicon.


Phase 1: Boolean Algebra: The Laws →