Study smarter with Fiveable
Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.
Logic gates are the fundamental building blocks of every digital system you'll encounter—from simple circuits to complex processors. When you're tested on this material, you're not just being asked to memorize which input combinations produce which outputs. You're being evaluated on your understanding of Boolean algebra principles, gate universality, and how gates combine to perform logical operations. These concepts form the foundation for everything from circuit simplification to sequential logic design.
The truth tables themselves encode the logical behavior that makes digital electronics predictable and designable. Understanding the relationships between gates—how NAND is the inverse of AND, how XOR detects differences—lets you analyze circuits quickly and choose the right gate for any application. Don't just memorize the tables; know why each gate behaves the way it does and when you'd use one gate over another.
These three gates represent the fundamental Boolean operations. Every other gate can be understood as a combination or inversion of these core functions.
| A | B | |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| A | B | |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
| A | |
|---|---|
| 0 | 1 |
| 1 | 0 |
Compare: AND vs. OR—both require two inputs, but AND needs all inputs high while OR needs any input high. Remember: AND outputs three 0s and one 1; OR outputs three 1s and one 0. If asked to implement a "both conditions required" scenario, AND is your gate.
These gates can individually implement any Boolean function, making them crucial for integrated circuit design. A single gate type simplifies manufacturing and reduces component variety.
| A | B | |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
| A | B | |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
Compare: NAND vs. NOR—both are universal gates with inverted outputs, but their truth tables are complements of each other. NAND outputs three 1s and one 0; NOR outputs one 1 and three 0s. Know how to construct a NOT gate from each: tie both inputs together.
These gates focus on whether inputs match or differ, making them essential for comparison operations, arithmetic circuits, and error detection.
| A | B | |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
| A | B | |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Compare: XOR vs. XNOR—these are exact complements. XOR asks "are they different?" while XNOR asks "are they the same?" For binary addition, XOR gives you the sum bit; for equality checking, XNOR is your gate. Both output two 1s and two 0s, just in opposite positions.
| Concept | Best Examples |
|---|---|
| Outputs 1 for single condition | AND (all inputs 1), NOR (all inputs 0) |
| Outputs 0 for single condition | OR (all inputs 0), NAND (all inputs 1) |
| Universal gates | NAND, NOR |
| Inverted versions | NAND (inverted AND), NOR (inverted OR), XNOR (inverted XOR) |
| Difference detection | XOR |
| Equality detection | XNOR |
| Single-input operation | NOT |
| Used in binary addition | XOR (sum bit), AND (carry bit) |
Which two gates are considered universal, and what does "universal" mean in this context?
Compare the truth tables of AND and NAND—how many output values differ between them, and why?
If you need a gate that outputs 1 only when two input signals are different, which gate would you choose? What if you needed the opposite behavior?
Using Boolean expressions, explain why and produce the same truth table. Which theorem does this demonstrate?
You're designing a circuit that should activate an alarm when either sensor A or sensor B detects motion, but not when both detect motion simultaneously. Which single gate implements this logic? Write out the truth table to verify your answer.