Boolean basics & the AND/OR/NOT gates
Numbers told us what a chip holds. Now: how a chip decides — the algebra of true/false, and the three gates that build everything else.
Built from first principles. Boolean algebra: George Boole, 1854.
Before you start
What you need first
- Why digital — that every wire sits at one of two values, 0 or 1.
What you'll be able to do
- Use 0/1 as logic values and the operators AND, OR, NOT.
- Recognise the three gate symbols and their truth tables.
- Evaluate an expression using the right order of operations.
What is Boolean algebra?
It's an algebra where every variable is either 0 or 1 — invented
by George Boole in 1854, long before computers, to make logical reasoning precise.
0 = false / off / low / no1 = true / on / high / yesAND — written
· or side-by-side: A·BOR — written
+: A+BNOT — a bar or apostrophe:
A′+ and · here are
not arithmetic addition and multiplication — they are reused symbols for OR and AND.
And 0/1 are logic values, not numbers.Variables, constants, expressions
A Boolean variable (e.g. A, ENABLE) holds 0 or 1
and can stand for a physical signal — a wire voltage, a button, a sensor flag. A
constant is just the literal 0 or 1. A
Boolean expression combines them with AND/OR/NOT to describe an output for
every input combination:
| Expression | Means |
|---|---|
F = A·B + C | three inputs, one output |
F = A′·B + A·B′ | XOR, written out |
F = A·A′ | always 0, whatever A is |
AND — all conditions must be true
Reads: "F equals A AND B." Notation: F = A·B.
| A | B | F |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR — any condition is enough
Reads: "F equals A OR B." Notation: F = A+B.
| A | B | F |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NOT — flip the value
Reads: "F equals NOT A." Notation: F = A′.
Also called an inverter.
| A | F |
|---|---|
| 0 | 1 |
| 1 | 0 |
Combining gates: order of operations
Expressions have a precedence order, like ordinary algebra: NOT first, then AND, then OR. Use parentheses to override.
Read F = A + B·C′
NOT C first, then AND it with B, then OR A on top. The drawing of the circuit is the expression, just laid out in space.
✏️ Try it yourself
(a) Evaluate F = A·B for A=1, B=0. (b) Evaluate F = A+B for
A=0, B=1. (c) Evaluate F = (A·B) + C for A=1, B=0, C=1. (d) Which gate
outputs 1 only when all inputs are 1?
Recap — the whole topic on one screen
| Gate | Notation | Output is 1 when… |
|---|---|---|
| AND | A·B | all inputs are 1 ("all") |
| OR | A+B | any input is 1 ("any") |
| NOT | A′ | the input is 0 ("flip") |