ALGEBRA OF LOGIC
We turn now to the algebra of logic. The first half of [Chapter 9], “Reasoning” (through the section “Logical-Truth Calculation by Algebra”), introduces this subject. There the terms truth values, truth tables, logical connectives, and algebra of logic are explained. The part of [Chapter 3], “A Machine That Will Think,” that discusses the operations greater-than and selection, also explains some of the algebra of logic. It introduces, for example, the formula
p = T(a > b) = 1, 0
This is a way of saying briefly that the truth value of the statement “a is greater than b” equals p; p is 1 if the statement is true and 0 if the statement is false. The truth value 1 corresponds with “yes.” The truth value 0 corresponds with “no.”
With mechanical brains we are especially interested in handling mathematics and logic without any sharp dividing line between them. For example, suppose that we have a register in which a ten-digit number like 1,765,438,890 may be stored. We should be able to use that register to store a number consisting of only 1’s and 0’s, like 1,100,100,010. Such a number may designate the answers to 10 successive questions: yes, yes, no, no, yes, no, no, no, yes, no. Or it may tell 10 successive binary digits. The register then is three times as useful: it can store either decimal numbers or truth values or binary digits. We need, of course, a way to obtain from the register any desired digit. For this purpose we may have two instructions to the machine: (1) read the left-hand end digit; (2) shift the number around in a circle. The second instruction is the same as multiplying by 10 and then putting the left-most digit at the right-hand end. For example, suppose that we want the 3rd digit from the left in 1,100,100,010. The result of the first circular shift is 1,001,000,101; the result of the second circular shift is 0,010,001,011; and reading the left-most digit gives 0. A process like this has been called extraction and is being built into the newest mechanical brains.
Using truth values, we can put down very neatly some truths of ordinary algebra. For example:
- (the absolute value of a) =
- a × (the truth of a greater than or equal to 0)
- - a × (the truth of a less than 0)
|a| = a · T(a ≥ 0) - a · T(a < 0)
For another example:
- Either a is greater than b,
- or else a equals b,
- or else a is less than b