So the machine I'm going to talk you about is what I call the greatest machine that never was. It was a machine that was never built, and yet, it will be built. It was a machine that was designed long before anyone thought about computers.
A máquina de que vou falar é a "maior máquina que nunca existiu". Foi uma máquina que nunca foi construída mas que será construída. Foi uma máquina que foi concebida muito antes de alguém pensar em computadores.
If you know anything about the history of computers, you will know that in the '30s and the '40s, simple computers were created that started the computer revolution we have today, and you would be correct, except for you'd have the wrong century. The first computer was really designed in the 1830s and 1840s, not the 1930s and 1940s. It was designed, and parts of it were prototyped, and the bits of it that were built are here in South Kensington.
Se sabem um pouco da história dos computadores, sabem que foi nos anos 30 e 40, que se criaram computadores simples que iniciaram a revolução de computadores que temos hoje. E vocês teriam razão, só que estariam no século errado. O primeiro computador foi concebido nos anos de 1830 e 1840, e não em 1930 e 1940. Foi concebido e foram feitos protótipos de algumas partes. Essas partes que foram construídas estão aqui, em South Kensington.
That machine was built by this guy, Charles Babbage. Now, I have a great affinity for Charles Babbage because his hair is always completely unkempt like this in every single picture. (Laughter) He was a very wealthy man, and a sort of, part of the aristocracy of Britain, and on a Saturday night in Marylebone, were you part of the intelligentsia of that period, you would have been invited round to his house for a soiree — and he invited everybody: kings, the Duke of Wellington, many, many famous people — and he would have shown you one of his mechanical machines.
Essa máquina foi construída por este sujeito, Charles Babbage. Eu tenho uma grande afinidade com o Charles Babbage porque tem o cabelo sempre assim despenteado em todas as fotografias. Era um homem muito rico e, de certa forma, fazia parte da aristocracia britânica. Aos sábados à noite, em Marylebone, se vocês fossem intelectuais naquela época, seriam convidados para um sarau em casa dele. Ele convidava toda a gente: reis, o Duque de Wellington, muita gente famosa. Ter-vos-ia mostrado uma das suas máquinas mecânicas.
I really miss that era, you know, where you could go around for a soiree and see a mechanical computer get demonstrated to you. (Laughter) But Babbage, Babbage himself was born at the end of the 18th century, and was a fairly famous mathematician. He held the post that Newton held at Cambridge, and that was recently held by Stephen Hawking. He's less well known than either of them because he got this idea to make mechanical computing devices and never made any of them.
Tenho saudades daquela época em que podíamos ir a um sarau e ver uma demonstração de um computador mecânico. (Risos) Mas o próprio Babbage, nasceu no fim do séc. XVIII, e era um matemático famoso. Tinha o mesmo cargo que Newton, em Cambridge, e que foi recentemente do Stephen Hawking. Não é tão conhecido como eles porque tinha aquela ideia de fazer aparelhos mecânicos de cálculo e acabou por nunca fazer nenhum.
The reason he never made any of them, he's a classic nerd. Every time he had a good idea, he'd think, "That's brilliant, I'm going to start building that one. I'll spend a fortune on it. I've got a better idea. I'm going to work on this one. (Laughter) And I'm going to do this one." He did this until Sir Robert Peel, then Prime Minister, basically kicked him out of Number 10 Downing Street, and kicking him out, in those days, that meant saying, "I bid you good day, sir." (Laughter)
E não o fez porque era um "nerd" clássico Cada vez que tinha uma boa ideia, pensava: "Brilhante, vou começar a construí-lo. "Vou gastar uma fortuna nele. Tenho uma ideia melhor. "Vou trabalhar neste. Vou fazer este aqui." Ele fez isto até que Sir Robert Peel, primeiro-ministro na altura, o expulsou do nº 10 de Downing Street. Nessa altura, uma expulsão era como dizer: "Um bom dia para si, Sir." (Risos)
The thing he designed was this monstrosity here, the analytical engine. Now, just to give you an idea of this, this is a view from above. Every one of these circles is a cog, a stack of cogs, and this thing is as big as a steam locomotive. So as I go through this talk, I want you to imagine this gigantic machine. We heard those wonderful sounds of what this thing would have sounded like. And I'm going to take you through the architecture of the machine — that's why it's computer architecture — and tell you about this machine, which is a computer.
Ele concebeu esta monstruosidade aqui, a "máquina analítica". Para terem uma ideia, esta é uma visão de cima. Cada um destes círculos é uma engrenagem, é uma pilha de engrenagens, e isto tem o tamanho de uma locomotiva a vapor. Portanto, durante esta palestra, imaginem esta máquina gigante. Ouvimos os sons magníficos que esta máquina teria produzido. Vou mostrar a arquitetura da máquina — é por isso que é arquitetura de computador — e falar-vos desta máquina, que é um computador.
So let's talk about the memory. The memory is very like the memory of a computer today, except it was all made out of metal, stacks and stacks of cogs, 30 cogs high. Imagine a thing this high of cogs, hundreds and hundreds of them, and they've got numbers on them. It's a decimal machine. Everything's done in decimal. And he thought about using binary. The problem with using binary is that the machine would have been so tall, it would have been ridiculous. As it is, it's enormous. So he's got memory. The memory is this bit over here. You see it all like this.
Falemos da memória. A memória é semelhante à memória dos computadores de hoje, exceto que era toda feita de metal, pilhas de rodas dentadas. 30 rodas dentadas de altura. Imaginem uma altura de 30 rodas dentadas, centenas e centenas, contendo números inscritos nelas. É uma máquina decimal. Tudo é feito no sistema decimal. Ele pensou em usar o sistema binário. mas a máquina teria que ser ridiculamente alta, Como está, já é enorme. Portanto, tem memória. A memória é este pedaço aqui. Veem-na assim.
This monstrosity over here is the CPU, the chip, if you like. Of course, it's this big. Completely mechanical. This whole machine is mechanical. This is a picture of a prototype for part of the CPU which is in the Science Museum.
Esta monstruosidade aqui é o processador — o chip se preferirem. Claro, é enorme. Esta máquina é totalmente mecânica. Isto é uma fotografia de um protótipo para uma parte do processador que está no Museu da Ciência.
The CPU could do the four fundamental functions of arithmetic -- so addition, multiplication, subtraction, division -- which already is a bit of a feat in metal, but it could also do something that a computer does and a calculator doesn't: this machine could look at its own internal memory and make a decision. It could do the "if then" for basic programmers, and that fundamentally made it into a computer. It could compute. It couldn't just calculate. It could do more.
O processador executava as quatro funções fundamentais da aritmética — adição, multiplicação, subtração, divisão -- o que já é uma façanha, em metal, mas também conseguia fazer uma coisa que um computador faz e uma calculadora não faz: esta máquina observava a memória e podia tomar uma decisão. Conseguia fazer o "se... então" para programadores básicos. Era isso que fazia dele um computador. Não fazia só cálculos. Podia fazer mais.
Now, if we look at this, and we stop for a minute, and we think about chips today, we can't look inside a silicon chip. It's just so tiny. Yet if you did, you would see something very, very similar to this. There's this incredible complexity in the CPU, and this incredible regularity in the memory. If you've ever seen an electron microscope picture, you'll see this. This all looks the same, then there's this bit over here which is incredibly complicated.
Se pararmos um instante, a olhar para isto, e pensarmos nos chips de hoje, não podemos ver um chip de silicone por dentro, porque é muito pequeno. Mas se conseguíssemos, veríamos uma coisa muito semelhante a isto. O processador tem uma complexidade incrível, e uma regularidade incrível na memória. Se já viram uma imagem de um microscópio eletrónico, viram isto. Parece tudo igual. Mas depois há esta parte aqui que é muito complicada.
All this cog wheel mechanism here is doing is what a computer does, but of course you need to program this thing, and of course, Babbage used the technology of the day and the technology that would reappear in the '50s, '60s and '70s, which is punch cards. This thing over here is one of three punch card readers in here, and this is a program in the Science Museum, just not far from here, created by Charles Babbage, that is sitting there — you can go see it — waiting for the machine to be built. And there's not just one of these, there's many of them. He prepared programs anticipating this would happen.
Todo este mecanismo de rodas dentadas faz o que um computador faz, mas é preciso programar isto. Babbage usou a tecnologia da altura e a tecnologia que voltaria a aparecer nos anos 50, 60 e 70, que é a dos cartões perfurados. Isto é um de três leitores de cartões perfurados, e isto é um programa, no Museu de Ciência, perto daqui, criado por Charles Babbage, que lá existe — podem ir lá vê-lo — à espera que a máquina seja construída. Não há só um, há muitos. Ele preparou programas prevendo que isto aconteceria.
Now, the reason they used punch cards was that Jacquard, in France, had created the Jacquard loom, which was weaving these incredible patterns controlled by punch cards, so he was just repurposing the technology of the day, and like everything else he did, he's using the technology of his era, so 1830s, 1840s, 1850s, cogs, steam, mechanical devices. Ironically, born the same year as Charles Babbage was Michael Faraday, who would completely revolutionize everything with the dynamo, transformers, all these sorts of things. Babbage, of course, wanted to use proven technology, so steam and things.
Usavam-se cartões perfurados porque Jacquard, em França. tinha criado o tear de Jacquard, que tecia belos padrões controlados por cartões perfurados. Babbage estava apenas a reutilizar a tecnologia da época. Como em tudo o que fazia, usava a tecnologia da época. Nos anos 1830, 1840, 1850, usava as engrenagens, o vapor, dispositivos mecânicos. Ironicamente, nascido no mesmo ano de Charles Babbage, surgiu Michael Faraday que viria a revolucionar tudo com o dínamo, transformadores, e coisas dessas. Mas Babbage queria usar tecnologia comprovada, como era o caso do vapor.
Now, he needed accessories. Obviously, you've got a computer now. You've got punch cards, a CPU and memory. You need accessories you're going to come with. You're not just going to have that,
Ora, ele precisava de acessórios. Temos um computador. Temos cartões perfurados, um processador e memória. Era preciso adicionar acessórios. Não podia ficar apenas com aquilo.
So, first of all, you had sound. You had a bell, so if anything went wrong — (Laughter) — or the machine needed the attendant to come to it, there was a bell it could ring. (Laughter) And there's actually an instruction on the punch card which says "Ring the bell." So you can imagine this "Ting!" You know, just stop for a moment, imagine all those noises, this thing, "Click, clack click click click," steam engine, "Ding," right? (Laughter)
Primeiro, havia o som. Havia um sino. Se algo corresse mal ou a máquina precisasse da atenção de alguém, havia um sino para tocar. Há uma instrução num cartão perfurado que diz: "Toca o sino". Têm que imaginar este "Ting!" Imaginem por instantes todos aqueles ruídos: "Clic, clac clic clic clic," a máquina a vapor... "Ding".
You also need a printer, obviously, and everyone needs a printer. This is actually a picture of the printing mechanism for another machine of his, called the Difference Engine No. 2, which he never built, but which the Science Museum did build in the '80s and '90s. It's completely mechanical, again, a printer. It prints just numbers, because he was obsessed with numbers, but it does print onto paper, and it even does word wrapping, so if you get to the end of the line, it goes around like that.
Também era precisa uma impressora. Este é a imagem de um mecanismo de impressão para outra máquina dele, 'Máquina Diferencial n.º 2" que ele nunca construiu, mas foi construída, nos anos 80 e 90, pelo Museu de Ciência. A impressora é totalmente mecânica. Imprime apenas números, porque ele era obcecado por números, mas imprime em papel e até faz quebras de linha. Portanto, ao chegar ao fim da linha, dá a volta assim.
You also need graphics, right? I mean, if you're going to do anything with graphics, so he said, "Well, I need a plotter. I've got a big piece of paper and an ink pen and I'll make it plot." So he designed a plotter as well, and, you know, at that point, I think he got pretty much a pretty good machine.
Também são precisos gráficos, se quiserem fazer algo com gráficos. Pensou: "Preciso de uma impressora de gráficos. "Tenho papel e caneta, posso desenhar". Portanto, também desenhou uma impressora de gráficos. Penso que, naquele momento, tinha uma máquina bastante boa.
Along comes this woman, Ada Lovelace. Now, imagine these soirees, all these great and good comes along. This lady is the daughter of the mad, bad and dangerous-to-know Lord Byron, and her mother, being a bit worried that she might have inherited some of Lord Byron's madness and badness, thought, "I know the solution: Mathematics is the solution. We'll teach her mathematics. That'll calm her down." (Laughter) Because of course, there's never been a mathematician that's gone crazy, so, you know, that'll be fine. (Laughter) Everything'll be fine. So she's got this mathematical training, and she goes to one of these soirees with her mother, and Charles Babbage, you know, gets out his machine. The Duke of Wellington is there, you know, get out the machine, obviously demonstrates it, and she gets it. She's the only person in his lifetime, really, who said, "I understand what this does, and I understand the future of this machine." And we owe to her an enormous amount because we know a lot about the machine that Babbage was intending to build because of her.
Surge então uma mulher, Ada Lovelace. Imaginem aqueles saraus, onde se juntam os grandes e os bons. Esta senhora é filha de Lord Byron, um homem maluco, malvado e perigoso. A mãe, preocupada com a ideia de a filha poder ter herdado alguma da loucura e da maldade de Lord Byron, pensou: "Já sei. A matemática é a solução. "Vamos ensinar-lhe matemática. Isso vai acalmá-la." (Risos) "Porque nunca houve um matemático que tivesse enlouquecido, "portanto, há-de correr bem". (Risos) Portanto, ela recebeu formação em matemática, e vai a um dos saraus com a mãe. Charles Babbage aparece com a sua máquina. Também está lá o Duque de Wellington. Ele mostra a máquina, faz uma demonstração, e ela compreende. Foi a única pessoa, enquanto ele foi vivo, que disse: "Eu percebo o que ela faz, "percebo o futuro desta máquina." Devemos-lhe muito, porque sabemos muito sobre a máquina que Babbage queria construir por causa dela.
Now, some people call her the first programmer. This is actually from one of -- the paper that she translated. This is a program written in a particular style. It's not, historically, totally accurate that she's the first programmer, and actually, she did something more amazing. Rather than just being a programmer, she saw something that Babbage didn't.
Há quem lhe chame a primeira programadora. Isto pertence a um papel que ela traduziu. É um programa escrito de uma forma particular. Historicamente, não é totalmente exato que ela fosse a primeira programadora. Mas ela fez algo mais espantoso. Em vez de ser só programadora, ela viu algo que Babbage não viu.
Babbage was totally obsessed with mathematics. He was building a machine to do mathematics, and Lovelace said, "You could do more than mathematics on this machine." And just as you do, everyone in this room already's got a computer on them right now, because they've got a phone. If you go into that phone, every single thing in that phone or computer or any other computing device is mathematics. It's all numbers at the bottom. Whether it's video or text or music or voice, it's all numbers, it's all, underlying it, mathematical functions happening, and Lovelace said, "Just because you're doing mathematical functions and symbols doesn't mean these things can't represent other things in the real world, such as music." This was a huge leap, because Babbage is there saying, "We could compute these amazing functions and print out tables of numbers and draw graphs," — (Laughter) — and Lovelace is there and she says, "Look, this thing could even compose music if you told it a representation of music numerically." So this is what I call Lovelace's Leap. When you say she's a programmer, she did do some, but the real thing is to have said the future is going to be much, much more than this.
Babbage era totalmente obcecado pela matemática. Estava a construir uma máquina para fazer matemática, e Lovelace disse: "Nesta máquina, podes fazer mais do que matemática." Todos aqui, nesta sala têm um computador porque têm um telemóvel. Se pegarem no telemóvel, tudo nesse telemóvel, num computador ou em qualquer outro aparelho informático, é matemática. No fundo, tudo são números. Quer seja vídeo, texto, música ou voz, tudo são números. Na essência, são tudo funções matemáticas. Lovelace disse: "Lá porque estás a fazer "funções matemáticas e símbolos, "não quer dizer que isso não possa representar "outras coisas no mundo real, como a música." Isto foi um grande salto, porque Babbage dizia: "Podíamos calcular estas funções magnificas "e imprimir tabelas com números e desenhar gráficos" e Lovelace dizia: "Isto até podia compor música, "se lhe indicasses uma representação numérica da música". É a isto que eu chamo o "Salto de Lovelace". Quando se diz que ela é uma programadora, ela até programou, mas o importante foi que disse que o futuro podia ser muito mais do que isso.
Now, a hundred years later, this guy comes along, Alan Turing, and in 1936, and invents the computer all over again. Now, of course, Babbage's machine was entirely mechanical. Turing's machine was entirely theoretical. Both of these guys were coming from a mathematical perspective, but Turing told us something very important. He laid down the mathematical foundations for computer science, and said, "It doesn't matter how you make a computer." It doesn't matter if your computer's mechanical, like Babbage's was, or electronic, like computers are today, or perhaps in the future, cells, or, again, mechanical again, once we get into nanotechnology. We could go back to Babbage's machine and just make it tiny. All those things are computers. There is in a sense a computing essence. This is called the Church–Turing thesis.
Cem anos depois, aparece um tipo — Alan Turing — e em 1936, inventa de novo o computador. Claro que a máquina de Babbage era totalmente mecânica. A máquina de Turing era inteiramente teórica. Ambos tinham uma perspetiva matemática, mas Turing disse-nos algo muito importante. Criou as fundações matemáticas para a ciência da informática e disse: "Não interessa como se faz um computador." Não interessa se o computador é mecânico, como o de Babbage ou eletrónico, como os de hoje, ou, talvez no futuro, feito de células, ou de novo mecânico, quando entrarmos na nanotecnologia. Poderemos voltar à máquina de Babbage e torná-la minúscula. Todas estas coisas são computadores. Há uma essência da computação. Esta é a tese de Church-Turing.
And so suddenly, you get this link where you say this thing Babbage had built really was a computer. In fact, it was capable of doing everything we do today with computers, only really slowly. (Laughter) To give you an idea of how slowly, it had about 1k of memory. It used punch cards, which were being fed in, and it ran about 10,000 times slower the first ZX81. It did have a RAM pack. You could add on a lot of extra memory if you wanted to.
E assim, estabelece-se uma ligação que diz que o que Babbage criou é um computador. De facto, era capaz de fazer tudo o que fazemos hoje com computadores só que muito mais devagar. (Risos) Para terem uma ideia dessa lentidão, tinha cerca de 1K de memória. Usava cartões perfurados que tinham que ser inseridos, e funcionava 10 000 vezes mais devagar do que o primeiro ZX81. Tinha memória RAM. Podíamos adicionar muita memória, se quiséssemos.
(Laughter) So, where does that bring us today? So there are plans. Over in Swindon, the Science Museum archives, there are hundreds of plans and thousands of pages of notes written by Charles Babbage about this analytical engine. One of those is a set of plans that we call Plan 28, and that is also the name of a charity that I started with Doron Swade, who was the curator of computing at the Science Museum, and also the person who drove the project to build a difference engine, and our plan is to build it. Here in South Kensington, we will build the analytical engine.
Portanto, até onde é que isso nos leva hoje? Hoje há planos. Em Swindon, nos arquivos do Museu da Ciência, há centenas de planos e milhares de páginas com notas escritas por Babbage acerca desta máquina analítica. Um deles é um conjunto de planos a que chamamos Plano 28, e que é também o nome de uma fundação de beneficência que iniciei com Doron Swade, o curador de computação do Museu da Ciência e também a pessoa que chefiou o projeto para construir uma máquina diferencial. Os nossos planos são para a construir. Aqui em South Kensington, vamos construir a máquina analítica.
The project has a number of parts to it. One was the scanning of Babbage's archive. That's been done. The second is now the study of all of those plans to determine what to build. The third part is a computer simulation of that machine, and the last part is to physically build it at the Science Museum.
O projeto consiste em várias partes. Uma era digitalizar o arquivo de Babbage, o que já foi feito. A segunda é o estudo de todos esses planos para determinar o que construir. A terceira é uma simulação computacional dessa máquina. E a última parte é construí-la, fisicamente, no Museu da Ciência.
When it's built, you'll finally be able to understand how a computer works, because rather than having a tiny chip in front of you, you've got to look at this humongous thing and say, "Ah, I see the memory operating, I see the CPU operating, I hear it operating. I probably smell it operating." (Laughter) But in between that we're going to do a simulation.
Depois de construída, perceberão como funciona um computador, porque, em vez de olharem para um pequeno chip, podem olhar para algo monstruoso e dizer: "Ah, estou a ver a memória a funcionar, o processador a funcionar, "ouço-o a funcionar, até o cheiro a funcionar." Mas, entretanto, vamos fazer uma simulação.
Babbage himself wrote, he said, as soon as the analytical engine exists, it will surely guide the future course of science. Of course, he never built it, because he was always fiddling with new plans, but when it did get built, of course, in the 1940s, everything changed.
O próprio Babbage escreveu, dizendo que, quando a máquina analítica existisse, certamente iria orientar o futuro da ciência. Nunca construiu a máquina porque dedicou-se a novos planos. Mas quando foi construída, nos anos 40, tudo mudou. Vou dar-vos uma pequena amostra do seu aspeto em movimento
Now, I'll just give you a little taste of what it looks like in motion with a video which shows just one part of the CPU mechanism working. So this is just three sets of cogs, and it's going to add. This is the adding mechanism in action, so you imagine this gigantic machine.
com um vídeo que mostra apenas uma parte do mecanismo do processador a funcionar. Isto são apenas três conjuntos de rodas dentadas. Está a somar. Isto é o mecanismo de somar em funcionamento. Imaginem esta máquina gigante.
So, give me five years. Before the 2030s happen, we'll have it.
Portanto, deem-me cinco anos. Antes de 2030, teremos isto pronto.
Thank you very much. (Applause)
Muito obrigado.