22 min read
AND, OR and NOT Gates
The three basic gates: their symbols, truth tables, Boolean expressions and everyday meanings.
The AND Gate
An AND gate gives 1 only when all its inputs are 1. If any input is 0, the output is 0.
Boolean expression: — read "Q equals A AND B". The dot means AND. Some books write it as AB with no dot.
The AND gate
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Boolean expression:
The OR Gate
An OR gate gives 1 when at least one input is 1. The output is 0 only when every input is 0.
Boolean expression: — read "Q equals A OR B". Here + means OR, not addition.
The OR gate
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Boolean expression:
The NOT Gate
A NOT gate (also called an inverter) has one input. It outputs the opposite: 0 becomes 1 and 1 becomes 0.
Boolean expression: — read "Q equals NOT A". The bar over the letter means NOT. You may also see A′ or ¬A. The small circle (the bubble) on the symbol always means NOT.
The NOT gate
| A | Q |
|---|---|
| 0 | 1 |
| 1 | 0 |
Boolean expression:
The Three Basic Gates Together
| Truth tables for AND, OR (two inputs) and NOT | ||||
|---|---|---|---|---|
Practice
More lessons in Boolean Algebra and Logic Gates · Next: NAND, NOR and XOR Gates · Previous: Logic and Truth Tables
