Who this is for: Beginners starting digital electronics. You need only be comfortable reading 0 and 1 as two distinct logic states.
What you will learn: describe AND, OR, NOT, NAND, NOR, and XOR; read their truth tables; and evaluate a compound expression in a deliberate order.
Model and limits: This lesson uses ideal Boolean logic, where each input is either 0 or 1. In a physical circuit, voltage ranges represent those states, and switching behavior depends on the logic family, supply, loading, and propagation delay. The diagram is a logic block diagram, not a circuit schematic or simulator.
Start with the three basic operations
In Boolean expressions, a variable such as A or B is a logic input. The output depends on the operation:
- AND: the output is 1 only when both inputs are 1. Write
A AND BorA · B. - OR: the output is 1 when at least one input is 1. Write
A OR BorA + B. - NOT: invert one input: 0 becomes 1 and 1 becomes 0. Write
NOT AorĀ.
Compare common two-input gates
NAND is the inverse of AND, NOR is the inverse of OR, and XOR is 1 when its two inputs differ. The table shows each output for all four pairs of inputs:
| A | B | AND | OR | NOT (A AND B) NAND |
NOT (A OR B) NOR |
XOR |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 |
For a single-input NOT gate, the complete table is simply NOT 0 = 1 and NOT 1 = 0.
Read a logic block diagram
Here, A and B pass through an AND operation. Input C is inverted. Those two results then feed an OR operation to produce F:
Work through F = (A AND B) OR NOT C
Evaluate the parentheses first, then invert C, then OR the two results. A three-input expression has 2³ = 8 possible input combinations.
| A | B | C | A AND B | NOT C | F |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 1 |
For example, when A = 1, B = 0, and C = 1, the AND result is 0 and NOT C is 0, so F = 0. When A = 1, B = 1, and C = 1, the AND result is 1, so F = 1 even though NOT C is 0.
Practice: change the grouping
For G = (A OR B) AND NOT C, calculate G for A = 1, B = 0, C = 0 and for A = 1, B = 0, C = 1.
Show the worked answer
For both rows, A OR B = 1. When C = 0, NOT C = 1, so G = 1 AND 1 = 1. When C = 1, NOT C = 0, so G = 1 AND 0 = 0.
What the Boolean model leaves out
- Real logic inputs are voltages interpreted as LOW or HIGH within ranges specified by a device’s logic family; they are not arbitrary exact 0 V and 1 V values.
- Gate outputs take time to change. Propagation delay, loading, power supply, and electrical limits matter in a physical design.
- This lesson checks logical relationships only. It does not select components, verify a circuit’s electrical compatibility, or replace a datasheet or hardware test.