Here is the coding. Suppose that the tolerance t is in switch 751. Suppose that the number x to be checked is in counter 4321. Then the instructions and coding are:
| Clear the check counter | — | — | 7 |
| Put in the tolerance, from switch 751 | 751 | 74 | 7 |
| Subtract the absolute value of the number to be checked | 4321 | 74 | 71 |
| Stop, O Mechanical Brain, if your result be negative! | — | — | 64 |
An operation like this is very useful in a mechanical brain. It enables the calculation to be interrupted if something has gone wrong. Of course, other operations of checking besides this one are used—for example, inspecting for reasonableness the results printed on typewriter 1.
Other Operations
There are other operations in the machine. There are two pairs of storage registers that can be coupled together so that we can handle problems requiring numbers of 46 digits instead of 23. Registers 64 and 65 can be coupled, and registers 68 and 69 can be coupled. There is another storage counter, No. 71, that has an extra property. We can read out the number it holds times 1, or times 10¹², or times 10⁻¹², as may be called for. As a result of this counter, we can do problems requiring 144 registers storing numbers of 11 digits each, instead of 72 registers storing 23 digits each. Bigger statistical problems can be handled, for example.
There are some minor sequences of operations, or subroutines, that can be called for by a single code. The subroutine may be a whole set of additions, subtractions, multiplications, divisions, and choices, having a single purpose: to compute some number by a process of rapid approximation ([see Supplement 2]). There are built-in subroutines for some special mathematical functions: the logarithm of a number to the base 10, the exponential of a number to the base 10, and the sine of a number. ([See Supplement 2].)
There are also 10 changeable subroutines, each of 22 coding lines, which can be called in, when wanted, by the main sequence-control tape or by each other. These subroutines constitute the Subsidiary Sequence Mechanism, and are extremely useful. They have A, B, and C fields just like the main sequence-control, but they are given information by plugging with short lengths of wire instead of by feeding punched paper tape.
RAPID APPROXIMATION FOR A LOGARITHM
Up to this point in this chapter the author has tried to tell the facts about the Harvard machine in plain words. But for reading this section, a little knowledge of calculus is necessary. ([See also Supplement 2].) If you wish, skip this section and go on to the next one.
What is the process that the machine uses to compute any desired logarithm to 23 digits? Suppose that we take for an example the process by which the machine computes log10 49.3724. We choose a 6-digit number for simplicity; the machine would handle a 23-digit number in the same way. The process uses 2 fundamental equations involving the logarithm: the sum relation