6.2 Mechanizing logic

This section explains how machines can compute, starting with simple logical operations. BooleanWe use Boolean logic, in which there are two possible values: true (often denoted as 1), and false (often denoted as 0). The Boolean datatype in Scheme is based on Boolean logic. Boolean logic is named for George Boole, a self-taught British mathematician who published An investigation into the Laws of Thought, on Which are founded the Mathematical Theories of Logic and Probabilities in 1854. Before Boole’s work, logic focused on natural language discourse. Boole made logic a formal language to which the tools of mathematics could be applied.

We illustrate how logical functions can be implemented mechanically by describing some logical machines. Modern computers use electrons to compute because they are small (more than a billion billion billion ($10^{31}$) electrons fit within the volume of a grain of sand), fast (approaching the speed of light), and cheap (more than a billion billion ($10^{22}$) electrons come out of a power outlet for less than a cent).

George Boole

They are also invisible and behave in somewhat mysterious ways, however, so we will instead consider how to compute with wine (or your favorite colored liquid). The basic notions of mechanical computation don’t depend on the medium we use to compute, only on our ability to use it to represent values and to perform simple logical operations.