On 01-11-11 we take a moment to appreciate Binary Code. Math is a universal language — and nothing’s more universal than Base 2. How a counting system around since the stone age remains at the heart of our most complex transactions today.

Guests

  • Keith Devlin Executive Director, H-STAR Institute, Professor, Stanford University; also, NPR Weekend Edition 'Math Guy'

Transcript

  • 13:34:47

    MR. JAMES LEDBETTERAnd one of the things about Dwight Eisenhower was, it was pretty hard to have an argument with the man who lead one of the largest, you know, military forces in the history of mankind and won World War II. Pretty hard to have that argument and win. Eisenhower felt himself, you know, an absolute expert on nearly every aspect of the military. And so he gave his joint chief of staff a lot of headaches. He was frequently calling for generals to be fired because they were testifying before congress, etcetera.

  • 13:46:17

    MR. KOJO NNAMDIAdmit it. When you noticed today was January 11, 011111, how many of you got a chuckle, took a moment's pause and thought, cool. And you techies or engineers or math geeks, how many of you smiled and thought about binary code? Dates like today's where the numbers follow some pattern are not as rare as you thing. Remember hearing about all those weddings scheduled on August 8, 2008?

  • 13:46:41

    MR. KOJO NNAMDIBut today's string of zeroes and ones isn't just a pattern, it's also readable. An example of binary code, a language and a number really. So it seemed right to take a moment to appreciate binary code. Joining us from studios at Stanford is Keith Devlin, professor at Stanford University, and Weekend Editions math guy. Keith Devlin, thank you for joining us.

  • 13:47:03

    MR. KEITH DEVLINNice to be here. Thanks for having me on, Kojo.

  • 13:47:05

    NNAMDIKeith, I've heard it said humans are like fish, and the binary code is our water. It surrounds us so much it's almost impossible to see.

  • 13:47:13

    DEVLINThat's sort of right. Actually what I would say is that the binary code is the fish for computers. We're surrounded by computers, and the natural language if you're a computer is binary. If you're American, your natural language is English. If you're French, your natural language is French. And if you're a computer, your natural language is binary.

  • 13:47:32

    NNAMDIBefore we go too far, let's do the basics, and remind everyone about our current math system. It's base 10, right? Please explain.

  • 13:47:40

    DEVLINThat's right. Because when people -- when humans started to count, they counted on their fingers, and we've got ten fingers. That means when you get up to ten, you have to sort of start counting again, and put up more fingers. So the base 10 system we used is based on the fact we have ten fingers. The word digit comes from the Latin word that means finger. So that's why 10 is the basis of the way we count.

  • 13:48:02

    DEVLINComputers don't have fingers. Computers have switches that are either on or off. And so they have two states, and they have to count in twos.

  • 13:48:10

    NNAMDII'm holding my hands on an article you wrote nearly 30 years ago when you launched your column, and it celebrates an ancient British counting system. Tell us about that.

  • 13:48:19

    DEVLINYeah. I mean, we like to think that binary arithmetic is a new computer thing, but in fact the brewing trade -- the wine and brewing trade in England in the 13th century onwards had a system based on twos. Part of that survived to today. We have two pints is one quart. But that was a whole system. There was two gills equals one chopin. Let's see, two chopins equals one pint. Two pints, one quart. Two quarts, one pottle. Two pottles, one gallon.

  • 13:48:47

    DEVLINTwo gallons, one peck. Two pecks, one demibushel. Two demibushels, one bushel or a firkin. Firkin we still use today sometimes. Two firkins is a kilderkin. Two kilderkins a bobble . Two bobbles a hog's head. Two hog's heads a pipe, and two pipes is one ton. And that you have binary arithmetic courtesy of 13th century English brewers and winemakers.

  • 13:49:06

    NNAMDIAnd that cost me a peck and a bushel. You can join this conversation if you'd like to at 800-433-8850. Are you likely to notice patterns in days and numbers around you? What patterns catch your eye the most? 800-433-8850, or you can go to our website, kojoshow.org, and make your contribution there. We non-computer math types, we don't think much how a computer does what it does, Keith.

  • 13:49:33

    NNAMDIYou say we should probably think of our computers more as translators than as computing devices. Every day when we work on a computer, everything we do is converted into binary code and then converted back out of it. That seems somehow impossible.

  • 13:49:49

    DEVLINActually, when people first started building computers in the '40s, originally they actually built it with on base 10. And so there were early computers base 10, but the person who is regarded as the father of computing in America, John von Neumann says, look, computers are these two state devices that have lots and lots of on off switches. It's much more efficient if we let the computers use their own natural language, which is binary.

  • 13:50:12

    DEVLINAnd that means we have to create a little translation routine that initially translates from numbers or letters into binary, so the computer does its work in binary, and then another translation routine that translates out backwards. So the interface that we use with the computer is really just a translation device from decimal arithmetic and the English language into the binary language of the computer.

  • 13:50:35

    NNAMDII'm told a celebrated mathematician who helped show the breadth of uses for binary systems is George Boole. What's his claim to fame?

  • 13:50:45

    DEVLINYeah. Well, people hear about Boole now, because when you do a library search you talk about Boolean search. George Boole was a mathematician cognitive, so actually in many ways he was the first cognitive scientist. He develops an algebra for zeros and ones, an algebra for truth if you like, and for combinations of propositions. So he wasn't thinking of arithmetic, he was thinking of statements being true or false. But that's also a binary, if something is either true or false. And he develops an algebra to understand how we combine things that are either true or false.

  • 13:51:18

    DEVLINThat was just an intellectual exercise really when he did that. But fast forward 200 years, computers come along and low and behold we have machines that very efficiently can implement Boolean algebra. When, in fact, the modern computer is really an implementation of Boole's algebra.

  • 13:51:35

    NNAMDICan it be said that Google owes everything to Boole's algebra or to binary codes?

  • 13:51:42

    DEVLINYou know, I'm less than two miles from the Google headquarters, so I've got to be a little bit careful what I say.

  • 13:51:46

    NNAMDIOh, yeah.

  • 13:51:47

    DEVLINBut I would say, yes. The Google guys really implemented Boole's work in an even more efficient way for doing search.

  • 13:51:55

    NNAMDIHere is Gary in Washington D.C. Gary, you are on the air. Go ahead, please.

  • 13:52:00

    GARYGood afternoon. I wanted to know if your guest thinks that one day we might move to hexadecimal system of counting to utilize -- to utilize binary counting.

  • 13:52:14

    NNAMDIWhat do you say to that, Keith Devlin?

  • 13:52:17

    DEVLINIf we had more fingers, I'm sure we'd be doing that now. We do hexadecimal for various things. Now, most people, when they put up their own wireless network you have to put in a code if you want to secure your wireless network, and that's very often a hexadecimal code. When you get beyond the numbers you have some letters. It does have some advantages because it's easier to translate from hexadecimal into binary, because hexadecimal is based on 16, which is a power of two.

  • 13:52:42

    DEVLINSo in some ways, it would be a nice in between thing, but since people wedded to decimal, we learn it when we're small children, we have all of these arithmetic algorithms we learn at school, I don't think there's every going to be a switch to hexadecimal except in these very special situations like putting the code in for your wireless network.

  • 13:53:01

    NNAMDIGary, thank you very much for your call. We have Chris in Woodbridge, Va., who has a special kind of translation for us, Keith. Chris, you're on the air. Go ahead, please.

  • 13:53:11

    CHRISHey, Kojo. Hello, you guys. I'm a long-time listener. I love your show.

  • 13:53:16

    NNAMDIThank you.

  • 13:53:16

    CHRISI just -- I was just saying to, you know, my family that this year my birthday falls on November 11, so it's 11/11/11.

  • 13:53:27

    NNAMDIWell, no. 111111.

  • 13:53:31

    CHRISRight. And coincidentally, I'm going to be 33. So if you add all that up, it equals 33, 11 plus 11, plus 11.

  • 13:53:39

    NNAMDIExcept that that's not quite the way binary code works, does it, Keith?

  • 13:53:43

    DEVLINNo. No. But if I was in Chris's position, I'd be wanting to celebrate, too. That's kind of neat, and good luck to you, and have a good celebration on November 11, Chris.

  • 13:53:51

    NNAMDI1111111. Thank you kindly, Chris. When I try to think of examples of binary code at work in daily life, somebody said, well, don't you play the college basketball brackets? I said, yes. Please explain, Keith.

  • 13:54:06

    DEVLINI'm an English person and I haven't got into basketball, despite the fact that Stanford has a really good girls' basketball team.

  • 13:54:12

    NNAMDIThey really do.

  • 13:54:12

    DEVLINBasketball and baseball are beyond my ken, I'm afraid, Kojo.

  • 13:54:15

    NNAMDIStanford is the one that just finished the Connecticut Women's Long Run, and winning basketball game. The Stanford women's team did that.

  • 13:54:22

    DEVLINI know the story, I just don't know the details of how the game is played.

  • 13:54:26

    NNAMDIWell, I just making the point that I think most Americans encounter binary thinking without even noticing it, don't we?

  • 13:54:32

    DEVLINOh, we do it all the time. In fact, the old style mobile phones, before the things like the iPhone came along, you have the individual keys, and if you wanted to type in someone's name into your address book, you had to touch the A key either once for A, twice for B, three times for C. That was because you were manually converting from letters into binary. A switch, a button -- any button. If you've got any device that's operated by buttons, you're operating a binary device.

  • 13:54:58

    DEVLINIf you want to get words into a binary interface like on the old style mobile phones, you had to do the conversion. And the easy way they figured out to do that, was you just press and individual key two or three times to get the different letters. So anything with a button including mobile phones is binary. Other examples is if you get in an elevator, very often there is a Braille keyboard for people to be able to find out what the floors are in Braille.

  • 13:55:22

    DEVLINBraille is a different form of binary coding, because there are just raised dots. There either is a dot or there isn't, and Braille is a very specialized kind of binary coding. There are other kinds as well. There's a -- there's thing called the ASCII code, the American Standard Code Information Interchange. That's the system whereby your keyboard on your computer converts letters and numbers into binary, and it's -- it takes your input in words and it converts it through this so-called ASCII code into the binary language of the computer.

  • 13:55:54

    NNAMDIIt's my understanding that as they say, back in the day, you were able to read and understand binary code as printed on paper tape.

  • 13:56:03

    DEVLINI could…

  • 13:56:04

    NNAMDITell me about that.

  • 13:56:05

    DEVLINWhen I was a high school kid growing up in England, I had a job working at for British Petroleum on early computers. They had bought this computer, and there weren't many people around that knew how to use it, and I was a teenager and, of course, as we all know, teenagers immediately take to computers. So I did their programming work for them for several months, mainly in the summer when I was off from school. And in those days, you input the programs and the data into a computer by typing at a teleprinter.

  • 13:56:34

    DEVLINIt would produce paper tape which had lots of holes in it, and after three or four weeks of doing that, I could hold this up in front of me, and I could read what it said pretty fluently. I just learned the language of the computer. And teenagers do the same things today. If you're young enough, the age when you can pick up a language, you can actually pick up binary language, and I was fluent in binary. I could read it, I could put the machinery -- the information into the machine in binary form. Not something I'm particularly proud of, but it's kind of neat.

  • 13:57:07

    NNAMDIAnd that's why Keith Devlin is the math guy. That's why he is the math guy. Keith Devlin, thank you so much for joining us.

  • 13:57:15

    DEVLINOkay. My pleasure, Kojo.

  • 13:57:17

    NNAMDIKeith Devlin is a professor at Stanford University and Weekend Edition's math guy. Today, of course, is 011111, significant in the understanding of binary code. "The Kojo Nnamdi Show" is produced by Brendan Sweeney, Tara Boyle, Michael Martinez, and Ingalisa Schrobsdorff, with help from Kathy Goldgeier, Elizabeth Weinstein, Saron (word?) and Tinbete (word?) . Diane Vogel is the managing producer. The engineer today, Timmy Olmstead. Dorie Anisman has been on the phones.

  • 13:57:49

    NNAMDIPodcasts of all shows, online archives, CD's and free transcripts are available at our website, kojoshow.org. Thank you all for listening. I'm Kojo Nnamdi.

Related Links

Most Recent Shows