LOGICAL OPERATIONS

Punch-card machines do many operations of reasoning or logic that do not involve addition, subtraction, multiplication, or division. Just as we can write equations for arithmetical operations, so we can write equations for these logical operations using mathematical logic (see [Chapter 9] and [Supplement 2]). If any reader, however, is not interested in these logical equations, he should skip each paragraph that begins with “in the language of logic,” or a similar phrase.

Translating

Reading and writing are operations perhaps not strictly of reasoning but of translating from one language to another. Basically these operations take in a mark in one language and give out a mark with the same meaning in another language. For example, the interpreter takes in punched holes and gives out printed marks, but the holes and the marks have the same meaning.

The major part of sorting is done by a punch-card sorting machine and can be considered an operation of translating. In sorting a card, the machine takes in a mark in the form of a punched hole on a punch card and specifies a place bearing the same mark where the card is put. The remaining part of sorting is done by human beings. This part consists of picking up blocks of cards from the pockets of the sorter and putting the blocks together in the right sequence.

Comparing

Fig. 13. Comparer.

The first operation of reasoning done by punch-card machines is comparing. For an example of comparing in the operation of the tabulator, let us take instructing the machine when to pick up a total and print it. As an illustration, suppose that we are making a table by state, county, and township of the number of persons counted in a census. Suppose that for each township we have one punch card telling the total number of persons. If all the cards are in sequence, then, whenever the county changes, we want a minor total, and, whenever the state changes, we want a major total. What does the machine do?

The tabulator has a mechanism that we shall call a comparer ([Fig. 13]). A comparer has 2 inputs that may be called Previous and Current and one output that may be called Unequal. The comparer has the property of giving out an impulse if and only if there is a difference between the 2 inputs.

In the language of the algebra of logic ([see Supplement 2] and [Chapter 9]), let the pieces of information coming into the comparer be a and b, and let the information coming out of the comparer be p. Then the equation of the comparer is:

p = T(ab)

where “T (···)” is “the truth value of ···” and “···” is a statement, and where the truth value is 1 if true and 0 if false.

In wiring the tabulator so that it can tell when to total, we use the comparer. We feed into it the county from the current card and the county from the previous card. Out of the comparer we get an impulse if and only if these two pieces of information are different. This is just what happens when the county changes. The impulse from the comparer is then used in further wiring of the tabulator: it makes the counter that is busy totaling the number of persons in the county print its total and then clear. In the same way, another comparer, which watches state instead of county, takes care of major totals when the state changes.

Selecting

The next operation of reasoning which punch-card machines can do is selecting. The tabulator, collator, interpreter, reproducer, and calculating punch all may contain mechanisms that can select information. These mechanisms are called selectors.

For example, suppose that we are using the tabulator to make a table showing for each city the number of males and the number of females. In the table we shall have three columns: first, city; second, males; third, females. Suppose that each punch card in columns 30 to 36 shows the total of males or females in a city. Suppose that, if and only if the card is for females, it has an X punch (or 11 punch) in column 79. What do we want to have happen? We want the number in columns 30 to 36 to go into the second column of the table if there is no X in column 79, and we want it to go into the third column of the table if there is an X in column 79. This is just another way of saying that we want the number to go into the males column if it is a number of males, and into the females column if it is a number of females. We make this happen by using a selector.

A selector ([Fig. 14]) is a mechanism with 2 inputs and 2 outputs. The 2 inputs are called X Pickup and Common. The 2 outputs are called X and No X. The X Pickup, as its name implies, watches for X’s. The Common takes in information. What comes out of X is what goes into Common if and only if an X punch is picked up; otherwise nothing comes out. What comes out of No X is what goes into Common if and only if an X punch is not picked up; otherwise nothing comes out. From the point of view of ordering punch-card equipment, we should note that there are two types of selectors: X selectors or X distributors, which have a selecting capacity of one column—that is, one decimal digit—and class selectors, which ordinarily have a selecting capacity of 10 columns or 10 decimal digits. But we shall disregard this difference here, as we have disregarded most other questions of capacity in multiplication, division, etc.

Fig. 14. Selector.

In the language of logic (see [Chapter 9] and [Supplement 2]), if p, a, b, c are the information in X Pickup, Common, X, and No X, respectively, then the equations for a selector are:

b = a·p

c = a·(1 - p)

Returning now to the table we wish to make, we connect columns 30 to 36 of the punch card to Common. We connect column 79 of the punch card to the X Pickup. We connect the output No X to the males column of the table. We connect the output X to the females column of the table. In this way we make the number in the punch card appear in either one of two places in the table according to whether the number counts males or females.

We might mention several more properties of selectors. A selector can be used in the reverse way, with X Pickup, X, and No X as inputs and Common as output ([Fig. 15]). What will come out of Common is (1) what goes into input No X if there is no X punch in the column to which input X Pickup is wired, and (2) what goes into input X if there is an X punch in the column to which input X Pickup is wired.

In this case the logical equation for the selector is:

a = bp + c(1 - p)

Also, selectors can be used one after another, so that selecting based on 2 or 3 X punches can be made.

Fig. 15. Selector.

In the language of logic, if p, q, r are the truth values of “there is an X punch in column i, j, k,” respectively, then by means of selectors we can get such a function as:

c = apq + b(1 - q)(1 - r)

Also, a selector may often be energized not only by an X punch but also by a punch 0, 1, 2, ···, 9 and 12. In this case, the selector is equipped with an additional input that can respond to any digit. This input is called the Digit Pickup.

Digit Selector

Something like an ordinary selector is another mechanism called a digit selector ([Fig. 16]). This has one input, Common, and 12 outputs, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12. This mechanism is often included in the tabulator and may be included in other punch-card machines. For example, suppose that we want to do something if and only if column 62 of a punch card contains a 3 or a 4 or a 9. Then we connect a brush that reads column 62 of the punch card to the Common input of the digit selector. And we connect out from the digit selector jointly from outputs 3, 4, and 9.

Fig. 16. Digit selector.

In the language of logic, if a is the digit going into Common, and if p is the impulse coming out of the digit selector, then the equation of the mechanism in this case is:

p = T(a = 3, 4, 9)

Sequencer

A fourth operation of reasoning done by punch-card machines is finding that one number is greater than, or equal to, or less than another. This operation is done in the collator and may be called sequencing. For example, suppose that we have a file of punch cards for cities, showing in columns 41 to 48 the number of people. Suppose that we wish to pick out the cards for cities over 125,000 in population. Now the collator has a mechanism that has 2 inputs and 3 outputs ([Fig. 17]). We may call this mechanism a sequencer, since it can tell the sequence of two numbers. What goes into the Primary input is a number: let us call it a. What goes into Secondary is another number: let us call it b. An impulse comes out of Low Primary if a is less than b. An impulse comes out of Equal if a equals b. An impulse comes out of Low Secondary if a is greater than b.

Fig. 17. Sequencer.

In the language of logic, if p, q, r are the three indications in Low Primary, Equal, and Low Secondary, then:

p = T(a < b)

q = T(a = b)

r = T(a > b)

Returning to our example, we punch up a card with 125,000 in columns 43 to 48, and we put this card into the Secondary Feed. We take the punch cards for cities and put them into the Primary Feed. In the plugboard, we connect the hubs of the Secondary Brushes (that read the card in the Secondary Feed), columns 43 to 48, to the Secondary input of the Sequencer. We connect the hubs of the Primary Brushes (that read the card in the Primary Feed), columns 41 to 48, to the Primary input of the Sequencer. Then we connect the Low Primary output of the Sequencer to a device that causes the city card being examined to fall into pocket 1. We connect Equal output and Low Secondary output to a device that causes the city card being examined to fall into pocket 2. Then, when the card for any city comes along, the machine compares the number of people in the city with 125,000. If the number is greater than 125,000, the card will fall into pocket 1; otherwise the card will fall into pocket 2. At the end of the run, we shall find in pocket 1 all the cards we want.