PHY 452 · Electronics
Boolean algebra and logic gates
The basic gates and their truth tables, Boolean laws and theorems, De Morgan's theorems and universal gates.
PHY 452 · Electronics
| Gate | Expression | Output is 1 when |
|---|---|---|
| AND | Y = A·B | all inputs are 1 |
| OR | Y = A + B | any input is 1 |
| NOT | Y = A' | the input is 0 |
| NAND | Y = (A·B)' | not all inputs are 1 |
| NOR | Y = (A + B)' | all inputs are 0 |
| XOR | Y = A ⊕ B | inputs differ |
| XNOR | Y = (A ⊕ B)' | inputs are the same |
Here A' means "NOT A" (often written with a bar over the letter).
| A | B | AND | OR | NAND | 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 |
"Break the bar and change the sign."
NAND and NOR can each make every other gate:
Manufacturers make whole circuits from NAND gates because they are cheap and fast.
Thinking (A·B)' = A'·B'. By De Morgan it is A' + B'.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Our team adds free books, videos and practice for each topic, and opens every link before it goes up.