Bitwise

Home > Other > Bitwise > Page 8
Bitwise Page 8

by David Auerbach


  To take a step back: Boolean logic is comprised of a series of logical operators, such as AND, OR, and NOT, that are applied to one or two binary variables. The expression (p AND q) is true only if p and q are both true; (p OR q) is true if p or q or both are true; (NOT p) is true if p is false and vice versa. “My name is David AND I am ten feet tall” is false. “My name is David OR I am ten feet tall” is true.*5 Smullyan’s puzzles are disguised Boolean logic problems, the goal being to determine which p’s and q’s are true and which are false.

  Boolean operations form the fundamental structure of computer hardware itself. Transistors on a computer chip form logic gates, which instantiate Boolean operators in physical hardware. Like the operators, logic gates take inputs that are each one of two possible “signals,” and output one of the same two possible signals depending on those inputs. A NOT gate on a transistor will output a high voltage signal when no such signal is coming in from its input, and vice versa.*6 An AND gate will output a signal when current is flowing into both of its two inputs. By chaining these gates together, simple mathematics is possible. Addition and subtraction in turn permit multiplication and division, and from there on, things look less like logic and more like programming (including software implementation of Boolean logic).

  There’s nothing “true” or “false” on those circuit boards. The binary is between the voltage being ON and OFF, not TRUE or FALSE or even 0 and 1. No one is actually interested in whether gates output a voltage signal except inasmuch as that signal represents something else. And what such signals represent in a computer is an abstract notion of logical truth and falsehood, a notion imposed by us. Truth and falsehood are conceptions that we apply to the presence or absence of a signal at a particular point on a circuit board.

  A binary half-adder, composed of an XOR gate on top and an AND gate on the bottom, that “adds” binary inputs A and B together, producing a binary sum (S) and a carry (C) output

  This binary representation of truth is so ubiquitous that we chronically conflate logical (true/false) and computational (1/0, or on/off) binaries. A programming language permits me to have a Boolean variable—call it IsThisThingOn—which can be either TRUE or FALSE. The simplest representation would be to use 0 for FALSE and 1 for TRUE. But what if, with this numerical representation, we run across a 2, or some other number that’s not 0 or 1? We could simply declare these other numbers to be meaningless, neither true nor false, but we do not want a trinary logic in which there are not two but three options, true, false, and meaningless. In C, the convention is that 0 is FALSE and any other number is TRUE. This representation appeals to our common convention of equating truth with existence. Falsehood is nothing, absence, emptiness: 0. Truth is presence, validity, existence: anything other than 0, even a negative number.

  A programmer is conditioned to treat TRUE and FALSE as synonyms for 1 and 0 respectively. TRUE and FALSE become the two possible values for a single bit in a two-value system. But those TRUEs and FALSEs remain a purely formal convention, even though the words contain metaphysical weight within them. If I write GodExists = TRUE, that obviously doesn’t cause God to exist. Nor does it cause the computer to think or believe that God exists. All it does is set a signal somewhere deep in the recesses of a computer’s memory chips. That line of code, however, suggests more than just the changing of signal on a circuit board. Any meaning we assign to TRUE and FALSE besides a signal’s being on or off is interpretation. When I say “God exists,” I am making a claim about the real world. When a program contains the statement GodExists = 1, it merely indicates the alteration of a signal.

  Computers do not understand the difference between TRUE and FALSE, nor do they understand what these two concepts mean. If a computer is to gain any grasp on truth as we understand it, it will have to be someplace other than in its bits.

  True and False

  Who claims Truth, Truth abandons.

  —THOMAS PYNCHON, Mason & Dixon

  The history of logic has long wrestled with the problem of getting that TRUE to mean more than 1 or ON. In other words, the problem of getting TRUE to say something about the world. The difficulty started long before computers. We may think that we can patently tell the difference between a true statement and a false statement, but outside of logic puzzles, pinning down this distinction proves horrendously vexing, to the point that both Western philosophers like Sextus Empiricus and Eastern philosophers like Nagarjuna questioned whether the truth of anything could be known. These concerns, which might seem like philosophical navel-gazing, became far more urgent once formal logic entered the picture. The great logician Alfred Tarski, a great influence on computer science and artificial intelligence, coined “Convention T” as a minimal criterion for the truth of a statement. Here are two examples of Convention T:

  “The sky is blue” is true if and only if the sky is blue.

  “I am a jelly doughnut” is true if and only if I am a jelly doughnut.

  A great deal of philosophical ink has been spilled on Convention T. But I think most lay readers will agree that this criterion is not especially helpful as a practical guide to determining the truth of a statement. And we may even despair at how little progress Convention T appears to make over Aristotle’s definition (itself based on Plato’s) of over two thousand years ago:

  To say of what is that it is not, or of what is not that it is, is false, while to say of what is that it is, and of what is not that it is not, is true.

  Yet whatever truth may be, we can safely conclude that in order to interact well with the world, computers must be able to distinguish between true and false in the same way as humans do. The inadequacies of logicians’ attempts to collapse the difference between a logical truth and a worldly truth have been made all too clear by the computing age. Mathematician and phenomenologist Gian-Carlo Rota put this bluntly:

  Mathematicians are therefore mystified by the spectacle of philosophers pretending to re-inject philosophical sense into the language of mathematical logic….The fake philosophical terminology of mathematical logic has misled philosophers into believing that mathematical logic deals with the truth in the philosophical sense. But this is a mistake. Mathematical logic deals not with the truth but only with the game of truth. The snobbish symbol-dropping found nowadays in philosophical papers raises eyebrows among mathematicians, like someone paying his grocery bill with Monopoly money.

  Rota here echoes Plato, who was one of the first to find that truth is a practical matter, a matter of action rather than of pure theoretical abstraction. In Paul Friedlander’s summary, “Truth, in Plato’s system, is always both: reality of being and correctness of apprehension and assertion.”*7 The troublesome gap is not between logic and language, but between logic and reality. Symbols and proofs cannot close that gap on their own.

  In formal logic, truth is a construct devoid of external meaning. By claiming that “X = X” is true for any possible value of X, I am applying the axiom of identity to the logical system: it is always true that something is equal to itself. Even trying to apply this simple principle in reality quickly runs up against ambiguities. If I say “David = David,” am I saying the same kind of thing as “2 = 2”? Or does using a person’s name instead of a number change the sort of truth in play? It doesn’t seem possible that 2 could not equal 2, but could David not equal David? What if there are two different Davids involved? Context comes crashing in very quickly.

  The pioneering philosophical logicians—Gottlob Frege, Bertrand Russell, Ludwig Wittgenstein, Rudolf Carnap—joined the formalism of logic with the content and metaphysics of reality.*8 For them, logic had to have some regulating function on the world. Carnap titled his magnum opus The Logical Structure of the World, and his ambition was to show that a universal language of logic could wholly represent the world. This was a utopian view for Carnap, who was a committed sociali
st and pacifist. In the introduction to The Logical Structure of the World (1928), he made clear that the larger purpose of his work was to set the world aright and eliminate the misunderstandings and irrationality that give rise to suffering:

  We feel that there is an inner kinship between the attitude on which our philosophical work is founded and the intellectual attitude which currently manifests itself in entirely different walks of life; we feel this orientation in artistic movements, especially in architecture, and in movements which strive for meaningful forms of personal and collective life, of education, and of external organisations in general. We feel all around us the same basic orientation, the same style of thinking and doing. It is an orientation which demands clarity everywhere, but which realizes that the fabric of life can never quite be comprehended. It makes us pay careful attention to detail and at the same time recognizes the great lines which run through the whole. It is an orientation which acknowledges the bonds which tie people together, but at the same time strives for free development of the individual. Our work is carried by the faith that this attitude will win the future.

  Carnap’s attitude remains close to the hearts of many engineers, scientists, and mathematicians. It is the vision and hope that the world can one day make as much sense as logic and mathematics do. The promise of mathematics, as held out by Plato so long ago, is a vision of a harmonious world where misery, misunderstanding, and conflict are logical contradictions to be ironed out through the use of reason.

  Wittgenstein’s opening line of the Tractatus Logico-Philosophicus reads, “The world is all that is the case.” It’s a claim that also joins logic and the world. “There’s a unicorn in my room” is false because there is no unicorn in my room. But what about a statement like “All men are created equal”? How can one establish the truth of something like that? Computers cannot yet even detect whether there is a unicorn in my room.

  We know what truth and falsehood are. Or, at least, we think we do. When it comes to anything beyond the simplest facts, we have a much harder time settling on truth in our daily lives than the average scientist does at getting to an accepted truth in his or her field.*9 It takes an entire legal system to determine who caused a car accident. My wife says it’s a chilly day while I find it temperate. We use words like “old,” “thin,” “ugly,” and “dumb” haphazardly and inconsistently, and we live with disagreement over when they should be applied. In everyday life, the line between fact and opinion is so blurred as to be frequently invisible, and our speech is beset by chronic vagueness and ambiguity, which generates as much confusion as it does richness. Code flounders on ambiguity, while literature thrives on it.

  Even in science it’s tricky enough. Newton’s laws were accepted as truth for hundreds of years. They are still useful, but we now know they are not universally true. For high masses and high velocities, Newton’s laws fail. Newton didn’t imagine that the speed of light would function as any sort of absolute speed limit. He didn’t know what light was, much less that it moved at any speed. Newton’s laws are true sometimes, with caveats. But is a truth with caveats still true?

  All worldly truths have contexts, conditions, and caveats. Wittgenstein suggested that worldly contexts, conditions, and caveats were precisely those of formal logic: “The limits of logic are the limits of my world.” Wittgenstein looked to logic to find how truth works in the real world. Our linguistic statements, he proposed, depict true or false states of affairs, and formal logic provides the rules that regulate our construction of these statements. Language and the world share logical form, which is also the form of reality. This attempt to regiment language as formal logic went on to be an article of faith for many computer scientists and cognitive scientists for decades, as well as exerting a foundational influence on Noam Chomsky’s linguistics.

  But after a ten-year break from philosophy, Wittgenstein changed his mind. Language did not have such a fixed, logic-bound relation to reality. The process of “measuring” the truth of a statement against reality was neither objective nor cleanly delineated. The meaning of what we say can’t be abstracted away from the context in which we say it: “We are unable clearly to circumscribe the concepts we use; not because we don’t know their real definition, but because there is no real ‘definition’ to them.” Instead, what we say and the truth of what we say are grounded in a set of social practices. In speaking, there clearly are rules that shouldn’t be broken and clearly ways of speaking that are blatantly incorrect, though they can change over time and admit to flexible interpretations even on a daily basis. It’s just that explicitly delineating those boundaries is extremely difficult, because language is not built up through organized, hierarchical rules, but through byzantine, overlapping practices. Some truths can be pinned down with practical certainty, just not in isolation and not without context. Truth is not necessarily relative, but neither does it exist in a vacuum.

  Formal logic does. The context of formal logic is austere and explicit, which is what makes it amenable to computers. But the cost of that simplicity is giving up the link between logic and reality. The true and false of formal logic are not the true and false of which we speak every day. The true and false of formal logic are empty abstractions: 1s and 0s.

  I believe in an objective external reality to which we all must conform, but I am also a social constructionist. We negotiate truths as much as we discover them. We invent and create a language to describe that reality, but as Wittgenstein found, that language has a somewhat haphazard relationship to reality. So what we call “truth” is never quite the truth, but a representational approximation of it.*10 We generate and agree upon everyday truths, and we fight over them. At the end of the day, if we’re lucky, consensus prevails. What we call “truth” remains loosely in line with reality because practical usages weed out falsehoods. Astronomy proved more useful than astrology, so astrology diminished and astronomy grew. Aristotle’s physics did not work for building machines and predicting movement; Newton’s did. Humanity had to agree that Newton’s physics were true and Aristotle’s were false, but we had good reason to do so. Computers do not have reasons for what they deem true or false. To know the truth of something is to be able to explain it, use it, argue for it, and revise it in light of new evidence. When computers can use what they believe to be TRUE to function (or malfunction) in the world, and modify and judge these “truths” based on their interactions with the world, that is when we’ll know that computers have an understanding of what we mean by truths and falsehoods. That is when they will start to become human.

  *1 Gödel’s incompleteness theorem proves, among other things, that certain computer programming problems cannot be solved, as the mere existence of their solutions would lead to a logical contradiction.

  *2 So it is with audio, where audiophiles insist that no digital process can quite replicate the experience of listening to the analog performance of a vinyl record channeled through a diamond-tipped stylus on a turntable, preferably amplified through transistor-free vacuum tubes. I do not buy these claims. Whatever differences there are (and there surely are some) between records and digital playback, they are capable of being captured within a digital representation. The fetishistic denial of the ability to translate frail vinyl into the robust realm of the digital gets turned on its head when audiophiles try to “shield” digital cables from interference and corruption, as though the error-checked series of bits flowing through them could actually become corrupted (they can’t). There is a market for “high-performance” CDs as well, which somehow serve up the exact same sequence of 1s and 0s in a mysteriously enhanced fashion. Audiophiles want to be convinced that they are experiencing more and truer music than the ordinary listener. In Hong Kong, audiophiles hang violins and cellos from the walls and ceilings in meticulous but incomprehensible patterns, their resonances (or auras) supposedly enhancing the quality of music played in the room.

  I confess to
the inverse obsession. I care about measurable differences in sound that the human ear can’t detect, instead of unmeasurable differences in sound that the ear supposedly can. I prefer lossless digital formats like FLAC over lossy formats like MP3, even when tests have shown no human ear can tell the difference (certainly not mine, which can no longer hear above 15 kHz due to age). The knowledge that the music has been modified to be incomplete—that digital certainty—digs at me even though my ears are sadly ignorant of the difference. I store my digital music in pristine, lossless form.

  *3 This restriction usually applies only to the Hebrew, though you’ll frequently see expressions like “G-d” or even “L-rd” in English. Halakhic law applies sacred restrictions to seven names, the most common being the tetragrammaton and Elohim.

  *4 Very occasionally it is the other way round, to the endless vexation of programmers. I experienced that kind of vexation when programming in the ML language, which demands that negative numbers be written not with a dash but with a tilde: “-2” must be written as “~2,” or else the language will not understand you. There are reasons for this syntax; the question is whether any such reasons could justify violating the ubiquitous convention.

  *5 It would be true even if I were ten feet tall, since OR means that one or both statements are true. The XOR, or exclusive-OR, operator specifies that only one of the two statements is true, while the other must be false.

  *6 Generally, the possibilities are either a high voltage or a near-zero voltage, but what’s important is that there are exactly two distinct signals—a binary representation.

  *7 Or, in William James’s words, “Truth happens to an idea. It becomes true, is made true by events.”

 

‹ Prev