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.
- AND — output is \mathbf{T} only when both inputs are \mathbf{T}. Matches p \land q.
- OR — output is \mathbf{T} when at least one input is \mathbf{T}. Matches p \lor q.
- NOT — a single input, output is the flip. Matches \lnot p.
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.
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
- A room light controlled by two switches in series is an AND — both must be on for the bulb to glow.
- The same light controlled by two switches in parallel is an OR — either switch being on lights the bulb.
- A push-to-break doorbell button (pressing it stops the buzzer) is a NOT — the output is the inverted input.
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