Chapter 6. Logic with Switches
第六章、逻辑与开关
This chapter explores how simple circuits constructed from switches, batteries, lightbulbs, and wires
can carry out logical operations.
本章探讨由开关、电池、灯泡和导线构成的简单电路如何执行逻辑操作。
In these circuits, toggle the state of the switches with either mouse clicks or finger taps.
The color red indicates that electricity is flowing through the circuit.
在这些电路中,可以通过鼠标点击或手指轻触切换开关状态。红色表示电流正在通过电路流动。
Switches in Series (page 50)
串联开关
A pair of switches can be wired in series to implement the logical operation AND.
一对开关可以串联接成实现逻辑操作 AND。
Switches in Parallel (page 52)
并联开关
Wired in parallel, the pair of switches implement the logical operation OR.
这对开关并联连接,实现逻辑操作 OR。
Kitten Selector (page 54)
小猫选择器
More complex logical expressions can be realized by combinations of switches in series
and parallel, such as this circuit to determine if a particular kitten satisfies a
set of criteria:
更复杂的逻辑表达式可以通过串联和并联开关组合实现,例如该电路用于判断特定小猫是否满足一组条件:
