3.4 The Agreement That Links Voltage and Computation

In the previous sections, we learned that a CPU chip is a physical electronic circuit with tens of billions of transistors, and that an electronic circuit can represent states. Even so, you may still find it hard to accept that this tiny electronic component actually performs calculation, or computation.

It may seem that understanding how an electronic circuit can match a human’s ability to calculate would require some grand explanation, but the principle is actually simple. To start with the conclusion: map numbers standing for the input information onto voltages, then build an electronic circuit that produces, for the given inputs, the same result a person would get by calculating.

Figure 3-8 shows a person adding the numbers 0 and 1, alongside an electronic circuit capable of adding 0 and 1.

A brain computing 0 + 1 = 1, compared with a chip that takes a low and a high voltage and outputs a high voltage
Figure 3-8. Computation by a person (a) and by an electronic circuit (b), compared

Figure 3-8 (a) shows the human brain adding 0 and 1 and coming up with 1 as the result, while Figure 3-8 (b) shows an electronic circuit receiving two inputs, a low voltage and a high voltage, and raising the voltage of its output.

At first glance, the two situations seem completely unrelated. But if we read the low voltage in (b) as 0 and the high voltage as 1, following the agreement we made in Section 3.1, the inputs and results of the two situations become the same. Under that agreement, circuit (b) takes in the numbers 0 and 1 as a low and a high voltage, and outputs a high voltage, which stands for the number 1. This is identical to the inputs and result of the addition in (a). So we can call circuit (b) a conceptual circuit that reproduces one case of addition.

Thinking it over once more, no magic took place that gave the circuit enough intelligence to add. It’s simply that, seen from a different angle, the circuit produced the same value a person arrived at with human intelligence — so we can now say that circuit (b), too, is capable of calculation, and more broadly, computation. All we did here was associate the voltages of a circuit that gives the right answer with the numbers people use when they calculate. One more important point: because we used an electronic circuit, we can get the result overwhelmingly faster than a person could compute it.

Does a circuit with calculating power that once seemed unique to humans turn out to be simpler than you first imagined? In this light, it should make sense that calculators, and by extension computers, contain electronic circuits built to produce, for given inputs, the same results a person would arrive at. The remaining question, then, is how to build the circuits inside a chip so that they produce the results we want.

In other words, what matters is building the right electronic circuit: one in which applying the voltages for the desired numerical inputs (0 or 1) makes the output voltage rise or stay low, so that the result can be read as the number 0 or 1.

I hope this section has given you a feel for what it means for a circuit to be capable of calculation or computation. The shift in thinking that links human computation to the behavior of electronic circuits may seem like nothing special once you understand it, but what matters is that this shift is the starting point for implementing complex human calculation in circuits. Building on this principle, in the next section we’ll look at how transistors can be connected to perform logical operations such as AND and OR.