CODE
The Hidden Language of Computer Hardware and Software
2nd Edition

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.

Your browser does not support the canvas element.

Switches in Parallel (page 52)

Wired in parallel, the pair of switches implement the logical operation OR.

Your browser does not support the canvas element.

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:

Your browser does not support the canvas element.