Triple AND Gate Treasure Chest
Explore cascaded AND gates with a three-key treasure chest. All three keys must be active to open the chest. Demonstrates multiple gate combinations.
您将学到什么
- Build a 3-input AND from two 2-input ANDs and verify the result.
- Apply AND associativity: (A·B)·C = A·(B·C) regardless of grouping.
- Read the 3-input AND truth table — exactly one of 8 rows produces 1.
- Distinguish AND chaining (this circuit) from a single 3-input AND primitive.
- Identify multi-factor authentication and safety interlocks as real AND applications.
工作原理
Three keys, one chest, one rule: every key must be turned for the chest to open. The circuit chains two 2-input AND gates to make a 3-input AND: (Key1 AND Key2) AND Key3. The output is high (chest open) only on the row where all three keys are 1.
This is the canonical example of AND chaining. Because AND is associative, you can build a 3-input AND from two 2-input ANDs in either order — (A AND B) AND C is identical to A AND (B AND C). Either way, the result is 1 only when every input is 1, and 0 otherwise.
With three inputs there are 2³ = 8 possible combinations. Exactly one row produces 1; the other 7 produce 0. This is the inverse pattern from a 3-input OR (where 7 rows produce 1 and only the all-zeros row produces 0).
The educational difference vs. the AND Gate Security System is the chained construction — even though digital simulators usually offer a single 3-input AND primitive, this circuit shows you how that primitive is internally built and why associativity guarantees correctness.
真值表
Three keys, 8 combinations. Only the all-keys-turned row opens the chest.
| 输入 | 输出 | |||
|---|---|---|---|---|
| Key1 | Key2 | Key3 | Open | |
| 0 | 0 | 0 | 0 | No keys turned |
| 0 | 0 | 1 | 0 | |
| 0 | 1 | 0 | 0 | |
| 0 | 1 | 1 | 0 | |
| 1 | 0 | 0 | 0 | |
| 1 | 0 | 1 | 0 | |
| 1 | 1 | 0 | 0 | Two keys, but Key3 missing |
| 1 | 1 | 1 | 1 | All three turned — chest opens |
布尔表达式
Standard 3-input AND — output is 1 only if every input is 1.
Same expression with explicit chaining of two 2-input ANDs.
Equivalent grouping — associativity guarantees the same output.
逐步尝试
在上方嵌入式电路中设置输入,然后阅读预期结果并验证。
- 1Key1 = 0 Key2 = 0 Key3 = 0预期:
Open = 0您将看到: All keys off — chest stays locked. The default state. - 2Key1 = 1 Key2 = 1 Key3 = 0预期:
Open = 0您将看到: Two keys turned but Key3 still off. AND requires all-or-nothing — close isn't enough. - 3Key1 = 1 Key2 = 1 Key3 = 1预期:
Open = 1您将看到: All three keys on — chest opens. The only winning combination. - 4Key1 = 0 Key2 = 1 Key3 = 1预期:
Open = 0您将看到: Flip Key1 off and the chest re-locks immediately. Removing any single key drops the AND output to 0.
使用的组件
实际应用
Multi-factor authentication. "Something you know, something you have, something you are" combines via AND: password AND key card AND fingerprint must all be valid. Each factor is a separate input that must be 1.
Industrial safety interlocks. A press machine requires guard closed AND emergency stop released AND two-hand-control buttons depressed. Removing any single condition stops the machine.
Memory write enable. A RAM cell writes only when chip-select AND write-enable AND row-strobe AND data-valid are all asserted. Wide ANDs gate sensitive operations.
Boolean SOP minterms. A Sum-of-Products expression is an OR of ANDed minterms. Each minterm — the AND of variables (or their inverses) — represents one specific combination. This 3-input AND on its own is a single minterm, lighting up exactly one row of the truth table.
Permission AND. "Allow this transaction if the user is logged in AND has admin privileges AND has confirmed via 2FA" — every condition must be true.