Truth tables live on paper. Logic gates live in silicon. They are the same thing wearing different clothes — each gate is a small physical device whose output pin follows one specific truth-table pattern, and every digital computer is a vast network of these patterns wired together. When you toggle the inputs of an AND gate and watch the output bulb light up only when both switches are on, you are seeing p \land q happen, not just memorising a row of Ts and Fs.

The three building blocks

Three gates are enough to build every other logic operation. Each has one job.

In circuit language, \mathbf{T} is "1" or "high voltage," and \mathbf{F} is "0" or "low voltage." The gate simulator below lets you drag a selector through every row of the three tables and watch the output pin change.

Logic gate simulator for AND, OR, NOTThree stacked rows show the outputs of AND, OR, and NOT gates for the four combinations of the two inputs p and q. The NOT gate depends only on p. A draggable red dot below selects one of four rows. The readout shows p, q, and the three outputs for the current row. inputs AND (p ∧ q) OR (p ∨ q) p=T, q=T T T p=T, q=F F T p=F, q=T F T p=F, q=F F F row 1 row 2 row 3 row 4 drag the dot across the four input rows
AND (centre) lights up only in row 1, when both inputs are $\mathbf{T}$. OR (right) lights up except in row 4, when both are $\mathbf{F}$. The column signatures — $TFFF$ for AND and $TTTF$ for OR — are identical to the truth tables for $p \land q$ and $p \lor q$.

From gate to truth table

Why the correspondence is exact: a gate's specification is "given these inputs on the wires, produce this output on the output wire." Writing that specification for every combination of inputs is the same as filling in a truth table. The gate is the physical embodiment of the table; the table is the mathematical skeleton of the gate.

An AND gate is often drawn as a flat-backed D-shape with two input wires entering the flat side and one output wire leaving the curved front. An OR gate has a curved back and a pointier front. A NOT gate is a triangle ending in a small circle — the circle is the inverting bubble that flips the signal. You will meet these shapes again in any electronics or computer-organisation course.

Real circuits you already know

When you see a truth table in your logic chapter, it is not an abstract game. It is the exact specification of a chip you could buy for five rupees and solder onto a breadboard.

Stacking gates into bigger logic

Gates compose. Feed the output of an AND gate into a NOT gate and you get a NAND — "not and" — whose pattern is F, T, T, T. Feed two NOTs into an AND and you get \lnot p \land \lnot q, the De Morgan cousin of NOR. Every compound propositional formula corresponds to a gate diagram, and every gate diagram to a formula. Moving between the two is just a change of notation.

Related: Logic and Propositions · Truth-Table Builder · De Morgan's Law Animation · Tautology & Contradiction Detector · Set Operations