Logic Gates: How Simple Rules Build a Circuit
Suppose a small circuit has two “ready” signals and should turn on an indicator only when both are on. An AND gate supplies that rule. If either signal is off, the indicator stays off. Both signals must be on to get an on result.
That imagined indicator is a simple use of a logic gate, a building block of digital circuits. It turns binary inputs into a binary output according to a fixed rule. Binary uses the values 0 and 1; each bit holds one of them. In our example, 0 means off and 1 means on.
The rule is called a Boolean function. The gate does not know what “ready” means. A circuit designer assigns meaning to the signals; the gate follows its rule whether they represent readiness, part of a number or some other information.
AND, OR, NOT: The Building Blocks of a Computer
Four Combinations Tell the Rule
With two binary inputs, there are only four possibilities. A truth table records the output for each one. Here is how three types of gate respond to the same inputs:
| Input A | Input B | AND output | OR output | XOR output |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 |
AND requires both inputs to be 1. OR needs at least one, so it also outputs 1 when both inputs are 1.
A two-input XOR, short for exclusive OR, outputs 1 when the inputs differ. It returns 0 when both are 1. The last row shows the difference between “at least one” and “one, but not both.” Analog Devices' gate reference sets out these functions.
Some gates work on just one input. NOT reverses its value: 0 becomes 1, and 1 becomes 0. AND and OR can also have more than two inputs; the table describes their two-input versions.
One Result Becomes the Next Input
Return to the readiness indicator. If we connect the AND gate's output to a NOT gate, we reverse its answer. The new output is 0 when both signals say ready and 1 for every other combination. Two simple rules have produced a “not both ready” result.
That combination is called NAND: NOT applied to AND. Connecting more outputs to inputs creates networks of gates that carry out more complicated functions. The Computation Structures course explains how these combinations build digital circuits.
Chips can implement gates with transistors, tiny devices that act as electronic switches. Software can calculate the same Boolean functions too, but a line of source code is not literally one electronic gate. The rule can be expressed separately from the hardware that carries it out.
- Make LEDs blink and sensors report in an afternoon with more than 22 guided lessons.
- Start with no soldering: everything plugs into the breadboard.
- See how code controls real hardware, the first step toward understanding any device.
Real Signals Need Time to Settle
The neat 0s and 1s stand for electrical signals. A real chip recognizes specified voltage ranges as the two values. Logical 1 does not mean the same exact voltage in every technology. The course's digital-abstraction lesson explains how those ranges accommodate real electrical behavior.
Signals also take time to pass through a gate and settle. Propagation delay describes how long a changed input can take to produce a valid output. With one readiness signal already at 1, the AND gate takes time to produce an output of 1 when the other signal changes to 1.
What Is a Bit? A Small Unit With an Eightfold Catch

What a CPU Core Does—and When More Cores Help

CISC: Why One CPU Instruction Can Mean Several Steps

QUOTE:
"Amateurs hack systems, professionals hack people."
