0:00:00.106,0:00:01.530 So the machine I'm going to talk you about 0:00:01.530,0:00:03.204 is what I call the greatest machine that never was. 0:00:03.204,0:00:05.203 It was a machine that was never built, 0:00:05.203,0:00:07.583 and yet, it will be built. 0:00:07.583,0:00:09.575 It was a machine that was designed 0:00:09.575,0:00:11.926 long before anyone thought about computers. 0:00:11.926,0:00:14.075 If you know anything about the history of computers, 0:00:14.075,0:00:16.595 you will know that in the '30s and the '40s, 0:00:16.595,0:00:19.150 simple computers were created 0:00:19.150,0:00:21.943 that started the computer revolution we have today, 0:00:21.943,0:00:23.229 and you would be correct, 0:00:23.229,0:00:25.711 except for you'd have the wrong century. 0:00:25.711,0:00:27.351 The first computer was really designed 0:00:27.351,0:00:31.023 in the 1830s and 1840s, not the 1930s and 1940s. 0:00:31.023,0:00:33.351 It was designed, and parts of it were prototyped, 0:00:33.351,0:00:35.487 and the bits of it that were built are here 0:00:35.487,0:00:37.480 in South Kensington. 0:00:37.480,0:00:40.799 That machine was built by this guy, Charles Babbage. 0:00:40.799,0:00:42.555 Now, I have a great affinity for Charles Babbage 0:00:42.555,0:00:45.164 because his hair is always completely unkempt like this 0:00:45.164,0:00:47.505 in every single picture. (Laughter) 0:00:47.505,0:00:49.352 He was a very wealthy man, and a sort of, 0:00:49.352,0:00:51.365 part of the aristocracy of Britain, 0:00:51.365,0:00:53.704 and on a Saturday night in Marylebone, 0:00:53.704,0:00:56.135 were you part of the intelligentsia of that period, 0:00:56.135,0:00:57.631 you would have been invited round to his house 0:00:57.631,0:01:00.590 for a soiree — and he invited everybody: 0:01:00.590,0:01:04.022 kings, the Duke of Wellington, many, many famous people — 0:01:04.022,0:01:06.543 and he would have shown you one of his mechanical machines. 0:01:06.543,0:01:09.583 I really miss that era, you know, where you could 0:01:09.583,0:01:11.931 go around for a soiree and see a mechanical computer 0:01:11.931,0:01:13.044 get demonstrated to you. (Laughter) 0:01:13.044,0:01:16.310 But Babbage, Babbage himself was born 0:01:16.310,0:01:18.044 at the end of the 18th century, 0:01:18.044,0:01:20.088 and was a fairly famous mathematician. 0:01:20.088,0:01:23.231 He held the post that Newton held at Cambridge, 0:01:23.231,0:01:25.743 and that was recently held by Stephen Hawking. 0:01:25.743,0:01:28.598 He's less well known than either of them because 0:01:28.598,0:01:31.748 he got this idea to make mechanical computing devices 0:01:31.748,0:01:34.033 and never made any of them. 0:01:34.033,0:01:37.318 The reason he never made any of them, he's a classic nerd. 0:01:37.318,0:01:39.329 Every time he had a good idea, he'd think, 0:01:39.329,0:01:40.777 "That's brilliant, I'm going to start building that one. 0:01:40.777,0:01:43.372 I'll spend a fortune on it. I've got a better idea. 0:01:43.372,0:01:45.732 I'm going to work on this one. (Laughter) And I'm going to do this one." 0:01:45.732,0:01:48.612 He did this until Sir Robert Peel, then Prime Minister, 0:01:48.612,0:01:51.076 basically kicked him out of Number 10 Downing Street, 0:01:51.076,0:01:53.517 and kicking him out, in those days, that meant saying, 0:01:53.517,0:01:56.669 "I bid you good day, sir." (Laughter) 0:01:56.669,0:01:58.649 The thing he designed was this monstrosity here, 0:01:58.649,0:02:02.088 the analytical engine. Now, just to give you an idea of this, 0:02:02.088,0:02:03.960 this is a view from above. 0:02:03.960,0:02:07.073 Every one of these circles is a cog, a stack of cogs, 0:02:07.073,0:02:10.309 and this thing is as big as a steam locomotive. 0:02:10.309,0:02:12.300 So as I go through this talk, I want you to imagine 0:02:12.300,0:02:14.944 this gigantic machine. We heard those wonderful sounds 0:02:14.944,0:02:16.704 of what this thing would have sounded like. 0:02:16.704,0:02:18.481 And I'm going to take you through the architecture of the machine 0:02:18.481,0:02:19.960 — that's why it's computer architecture — 0:02:19.960,0:02:23.287 and tell you about this machine, which is a computer. 0:02:23.287,0:02:26.690 So let's talk about the memory. The memory 0:02:26.690,0:02:28.937 is very like the memory of a computer today, 0:02:28.937,0:02:31.639 except it was all made out of metal, 0:02:31.639,0:02:35.183 stacks and stacks of cogs, 30 cogs high. 0:02:35.183,0:02:37.253 Imagine a thing this high of cogs, 0:02:37.253,0:02:39.008 hundreds and hundreds of them, 0:02:39.008,0:02:40.898 and they've got numbers on them. 0:02:40.898,0:02:43.317 It's a decimal machine. Everything's done in decimal. 0:02:43.317,0:02:44.902 And he thought about using binary. The problem 0:02:44.902,0:02:46.620 with using binary is that the machine would have been so 0:02:46.620,0:02:49.937 tall, it would have been ridiculous. As it is, it's enormous. 0:02:49.937,0:02:51.996 So he's got memory. 0:02:51.996,0:02:54.403 The memory is this bit over here. 0:02:54.403,0:02:56.733 You see it all like this. 0:02:56.733,0:03:01.268 This monstrosity over here is the CPU, the chip, if you like. 0:03:01.268,0:03:03.518 Of course, it's this big. 0:03:03.518,0:03:06.431 Completely mechanical. This whole machine is mechanical. 0:03:06.431,0:03:10.572 This is a picture of a prototype for part of the CPU 0:03:10.572,0:03:12.711 which is in the Science Museum. 0:03:12.711,0:03:16.343 The CPU could do the four fundamental functions of arithmetic -- 0:03:16.343,0:03:18.796 so addition, multiplication, subtraction, division -- 0:03:18.796,0:03:21.804 which already is a bit of a feat in metal, 0:03:21.804,0:03:24.433 but it could also do something that a computer does 0:03:24.433,0:03:26.132 and a calculator doesn't: 0:03:26.132,0:03:30.070 this machine could look at its own internal memory and make a decision. 0:03:30.070,0:03:32.936 It could do the "if then" for basic programmers, 0:03:32.936,0:03:35.076 and that fundamentally made it into a computer. 0:03:35.076,0:03:39.674 It could compute. It couldn't just calculate. It could do more. 0:03:39.674,0:03:42.355 Now, if we look at this, and we stop for a minute, 0:03:42.355,0:03:44.226 and we think about chips today, we can't 0:03:44.226,0:03:48.041 look inside a silicon chip. It's just so tiny. 0:03:48.041,0:03:49.842 Yet if you did, you would see something 0:03:49.842,0:03:51.664 very, very similar to this. 0:03:51.664,0:03:54.611 There's this incredible complexity in the CPU, 0:03:54.611,0:03:57.303 and this incredible regularity in the memory. 0:03:57.303,0:03:58.965 If you've ever seen an electron microscope picture, 0:03:58.965,0:04:00.934 you'll see this. This all looks the same, 0:04:00.934,0:04:03.500 then there's this bit over here which is incredibly complicated. 0:04:03.500,0:04:07.483 All this cog wheel mechanism here is doing is what a computer does, 0:04:07.483,0:04:09.576 but of course you need to program this thing, and of course, 0:04:09.576,0:04:12.601 Babbage used the technology of the day 0:04:12.601,0:04:16.247 and the technology that would reappear in the '50s, '60s and '70s, 0:04:16.247,0:04:19.116 which is punch cards. This thing over here 0:04:19.116,0:04:21.940 is one of three punch card readers in here, 0:04:21.940,0:04:25.620 and this is a program in the Science Museum, just 0:04:25.620,0:04:30.013 not far from here, created by Charles Babbage, 0:04:30.013,0:04:31.881 that is sitting there — you can go see it — 0:04:31.881,0:04:34.322 waiting for the machine to be built. 0:04:34.322,0:04:37.742 And there's not just one of these, there's many of them. 0:04:37.742,0:04:40.832 He prepared programs anticipating this would happen. 0:04:40.832,0:04:42.805 Now, the reason they used punch cards was that Jacquard, 0:04:42.805,0:04:44.977 in France, had created the Jacquard loom, 0:04:44.977,0:04:47.655 which was weaving these incredible patterns controlled by punch cards, 0:04:47.655,0:04:50.287 so he was just repurposing the technology of the day, 0:04:50.287,0:04:52.392 and like everything else he did, he's using the technology 0:04:52.392,0:04:57.139 of his era, so 1830s, 1840s, 1850s, cogs, steam, 0:04:57.139,0:05:01.077 mechanical devices. Ironically, born the same year 0:05:01.077,0:05:03.249 as Charles Babbage was Michael Faraday, 0:05:03.249,0:05:05.926 who would completely revolutionize everything 0:05:05.926,0:05:08.439 with the dynamo, transformers, all these sorts of things. 0:05:08.439,0:05:11.597 Babbage, of course, wanted to use proven technology, 0:05:11.597,0:05:13.150 so steam and things. 0:05:13.150,0:05:14.823 Now, he needed accessories. 0:05:14.823,0:05:16.495 Obviously, you've got a computer now. 0:05:16.495,0:05:18.884 You've got punch cards, a CPU and memory. 0:05:18.884,0:05:20.819 You need accessories you're going to come with. 0:05:20.819,0:05:22.447 You're not just going to have that, 0:05:22.447,0:05:25.275 So, first of all, you had sound. You had a bell, 0:05:25.275,0:05:27.429 so if anything went wrong — (Laughter) — 0:05:27.429,0:05:29.774 or the machine needed the attendant to come to it, 0:05:29.774,0:05:31.744 there was a bell it could ring. (Laughter) 0:05:31.744,0:05:33.280 And there's actually an instruction on the punch card 0:05:33.280,0:05:36.182 which says "Ring the bell." So you can imagine this "Ting!" 0:05:36.182,0:05:38.382 You know, just stop for a moment, imagine all those noises, 0:05:38.382,0:05:39.463 this thing, "Click, clack click click click," 0:05:39.463,0:05:42.400 steam engine, "Ding," right? (Laughter) 0:05:42.400,0:05:44.835 You also need a printer, obviously, and everyone needs a printer. 0:05:44.835,0:05:47.843 This is actually a picture of the printing mechanism for 0:05:47.843,0:05:50.326 another machine of his, called the Difference Engine No. 2, 0:05:50.326,0:05:52.261 which he never built, but which the Science Museum 0:05:52.261,0:05:54.432 did build in the '80s and '90s. 0:05:54.432,0:05:56.707 It's completely mechanical, again, a printer. 0:05:56.707,0:05:59.405 It prints just numbers, because he was obsessed with numbers, 0:05:59.405,0:06:02.922 but it does print onto paper, and it even does word wrapping, 0:06:02.922,0:06:05.694 so if you get to the end of the line, it goes around like that. 0:06:05.694,0:06:07.344 You also need graphics, right? 0:06:07.344,0:06:08.900 I mean, if you're going to do anything with graphics, 0:06:08.900,0:06:11.496 so he said, "Well, I need a plotter. I've got a big piece of paper 0:06:11.496,0:06:13.604 and an ink pen and I'll make it plot." 0:06:13.604,0:06:15.434 So he designed a plotter as well, 0:06:15.434,0:06:19.359 and, you know, at that point, I think he got pretty much 0:06:19.359,0:06:20.890 a pretty good machine. 0:06:20.890,0:06:23.580 Along comes this woman, Ada Lovelace. 0:06:23.580,0:06:26.301 Now, imagine these soirees, all these great and good comes along. 0:06:26.301,0:06:29.393 This lady is the daughter of the mad, bad 0:06:29.393,0:06:31.815 and dangerous-to-know Lord Byron, 0:06:31.815,0:06:34.335 and her mother, being a bit worried that she might have 0:06:34.335,0:06:37.192 inherited some of Lord Byron's madness and badness, 0:06:37.192,0:06:40.430 thought, "I know the solution: Mathematics is the solution. 0:06:40.430,0:06:43.379 We'll teach her mathematics. That'll calm her down." 0:06:43.379,0:06:47.135 (Laughter) Because of course, 0:06:47.135,0:06:51.050 there's never been a mathematician that's gone crazy, 0:06:51.050,0:06:53.451 so, you know, that'll be fine. (Laughter) 0:06:53.451,0:06:56.789 Everything'll be fine. So she's got this mathematical training, 0:06:56.789,0:06:59.527 and she goes to one of these soirees with her mother, 0:06:59.527,0:07:02.317 and Charles Babbage, you know, gets out his machine. 0:07:02.317,0:07:04.151 The Duke of Wellington is there, you know, 0:07:04.151,0:07:05.723 get out the machine, obviously demonstrates it, 0:07:05.723,0:07:09.474 and she gets it. She's the only person in his lifetime, really, 0:07:09.474,0:07:10.766 who said, "I understand what this does, 0:07:10.766,0:07:12.973 and I understand the future of this machine." 0:07:12.973,0:07:16.060 And we owe to her an enormous amount because we know 0:07:16.060,0:07:19.037 a lot about the machine that Babbage was intending to build 0:07:19.037,0:07:20.640 because of her. 0:07:20.640,0:07:23.397 Now, some people call her the first programmer. 0:07:23.397,0:07:26.783 This is actually from one of -- the paper that she translated. 0:07:26.783,0:07:29.694 This is a program written in a particular style. 0:07:29.694,0:07:33.263 It's not, historically, totally accurate that she's the first programmer, 0:07:33.263,0:07:35.316 and actually, she did something more amazing. 0:07:35.316,0:07:36.886 Rather than just being a programmer, 0:07:36.886,0:07:39.058 she saw something that Babbage didn't. 0:07:39.058,0:07:42.242 Babbage was totally obsessed with mathematics. 0:07:42.242,0:07:46.191 He was building a machine to do mathematics, 0:07:46.191,0:07:49.450 and Lovelace said, "You could do more than mathematics 0:07:49.450,0:07:52.285 on this machine." And just as you do, 0:07:52.285,0:07:53.910 everyone in this room already's got a computer on them 0:07:53.910,0:07:55.964 right now, because they've got a phone. 0:07:55.964,0:07:58.192 If you go into that phone, every single thing in that phone 0:07:58.192,0:08:00.207 or computer or any other computing device 0:08:00.207,0:08:02.288 is mathematics. It's all numbers at the bottom. 0:08:02.288,0:08:06.981 Whether it's video or text or music or voice, it's all numbers, 0:08:06.981,0:08:10.961 it's all, underlying it, mathematical functions happening, 0:08:10.961,0:08:13.066 and Lovelace said, "Just because you're doing 0:08:13.066,0:08:16.388 mathematical functions and symbols 0:08:16.388,0:08:18.635 doesn't mean these things can't represent 0:08:18.635,0:08:21.988 other things in the real world, such as music." 0:08:21.988,0:08:24.722 This was a huge leap, because Babbage is there saying, 0:08:24.722,0:08:26.944 "We could compute these amazing functions and print out 0:08:26.944,0:08:30.612 tables of numbers and draw graphs," — (Laughter) — 0:08:30.612,0:08:32.508 and Lovelace is there and she says, "Look, 0:08:32.508,0:08:34.984 this thing could even compose music if you 0:08:34.984,0:08:38.532 told it a representation of music numerically." 0:08:38.532,0:08:40.101 So this is what I call Lovelace's Leap. 0:08:40.101,0:08:43.838 When you say she's a programmer, she did do some, 0:08:43.838,0:08:46.975 but the real thing is to have said the future is going to be 0:08:46.975,0:08:49.171 much, much more than this. 0:08:49.171,0:08:51.350 Now, a hundred years later, this guy comes along, 0:08:51.350,0:08:56.803 Alan Turing, and in 1936, and invents the computer all over again. 0:08:56.803,0:08:59.380 Now, of course, Babbage's machine was entirely mechanical. 0:08:59.380,0:09:01.911 Turing's machine was entirely theoretical. 0:09:01.911,0:09:04.702 Both of these guys were coming from a mathematical perspective, 0:09:04.702,0:09:07.255 but Turing told us something very important. 0:09:07.255,0:09:10.190 He laid down the mathematical foundations 0:09:10.190,0:09:12.303 for computer science, and said, 0:09:12.303,0:09:15.490 "It doesn't matter how you make a computer." 0:09:15.490,0:09:17.368 It doesn't matter if your computer's mechanical, 0:09:17.368,0:09:21.778 like Babbage's was, or electronic, like computers are today, 0:09:21.778,0:09:24.582 or perhaps in the future, cells, or, again, 0:09:24.582,0:09:27.728 mechanical again, once we get into nanotechnology. 0:09:27.728,0:09:29.765 We could go back to Babbage's machine 0:09:29.765,0:09:32.341 and just make it tiny. All those things are computers. 0:09:32.341,0:09:33.973 There is in a sense a computing essence. 0:09:33.973,0:09:35.978 This is called the Church–Turing thesis. 0:09:35.978,0:09:38.645 And so suddenly, you get this link where you say 0:09:38.645,0:09:40.868 this thing Babbage had built really was a computer. 0:09:40.868,0:09:43.693 In fact, it was capable of doing everything we do today 0:09:43.693,0:09:48.525 with computers, only really slowly. (Laughter) 0:09:48.525,0:09:50.631 To give you an idea of how slowly, 0:09:50.631,0:09:54.470 it had about 1k of memory. 0:09:54.470,0:09:57.388 It used punch cards, which were being fed in, 0:09:57.388,0:10:03.148 and it ran about 10,000 times slower the first ZX81. 0:10:03.148,0:10:04.751 It did have a RAM pack. 0:10:04.751,0:10:07.930 You could add on a lot of extra memory if you wanted to. 0:10:07.930,0:10:10.256 (Laughter) So, where does that bring us today? 0:10:10.256,0:10:11.864 So there are plans. 0:10:11.864,0:10:14.797 Over in Swindon, the Science Museum archives, 0:10:14.797,0:10:16.491 there are hundreds of plans and thousands of pages 0:10:16.491,0:10:19.960 of notes written by Charles Babbage about this analytical engine. 0:10:19.960,0:10:23.921 One of those is a set of plans that we call Plan 28, 0:10:23.921,0:10:26.075 and that is also the name of a charity that I started 0:10:26.075,0:10:28.809 with Doron Swade, who was the curator of computing 0:10:28.809,0:10:31.048 at the Science Museum, and also the person who drove 0:10:31.048,0:10:32.478 the project to build a difference engine, 0:10:32.478,0:10:35.036 and our plan is to build it. 0:10:35.036,0:10:38.902 Here in South Kensington, we will build the analytical engine. 0:10:38.902,0:10:40.904 The project has a number of parts to it. 0:10:40.904,0:10:43.424 One was the scanning of Babbage's archive. 0:10:43.424,0:10:45.346 That's been done. The second is now the study 0:10:45.346,0:10:48.456 of all of those plans to determine what to build. 0:10:48.456,0:10:52.900 The third part is a computer simulation of that machine, 0:10:52.900,0:10:55.823 and the last part is to physically build it at the Science Museum. 0:10:55.823,0:10:58.399 When it's built, you'll finally be able to understand how a computer works, 0:10:58.399,0:11:00.233 because rather than having a tiny chip in front of you, 0:11:00.233,0:11:02.843 you've got to look at this humongous thing and say, "Ah, 0:11:02.843,0:11:06.178 I see the memory operating, I see the CPU operating, 0:11:06.178,0:11:10.045 I hear it operating. I probably smell it operating." (Laughter) 0:11:10.045,0:11:12.644 But in between that we're going to do a simulation. 0:11:12.644,0:11:14.401 Babbage himself wrote, he said, 0:11:14.401,0:11:16.019 as soon as the analytical engine exists, 0:11:16.019,0:11:19.723 it will surely guide the future course of science. 0:11:19.723,0:11:21.568 Of course, he never built it, because he was always fiddling 0:11:21.568,0:11:23.650 with new plans, but when it did get built, of course, 0:11:23.650,0:11:27.160 in the 1940s, everything changed. 0:11:27.160,0:11:28.983 Now, I'll just give you a little taste of what it looks like 0:11:28.983,0:11:31.616 in motion with a video which shows 0:11:31.616,0:11:36.210 just one part of the CPU mechanism working. 0:11:39.210,0:11:42.209 So this is just three sets of cogs, 0:11:42.209,0:11:45.031 and it's going to add. This is the adding mechanism 0:11:45.031,0:11:47.688 in action, so you imagine this gigantic machine. 0:11:47.688,0:11:48.847 So, give me five years. 0:11:48.847,0:11:51.191 Before the 2030s happen, we'll have it. 0:11:51.191,0:11:54.161 Thank you very much. (Applause)