Understand that a logic gate is just a rule mapping every possible combination of input bits to an output bit, and that different gates (AND, OR, XOR, NAND, NOR) encode fundamentally different rules.
| A | B | Out |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
AND: output = 1 only if both inputs are 1OR: output = 1 if at least one input is 1XOR: output = 1 if the inputs differNAND / NOR: the exact opposite of AND / ORSelect the XOR gate. Set A = 1, B = 0. Confirm the output is 1 — XOR fires exactly when the inputs disagree.
Ready to check