Advent of Computing - Episode 145 - Zuse's Mysterious Machines

Episode Date: November 11, 2024

In 1933 Konrad Zuse, a German civil engineer, caught the computing bug. It would consume the rest of his life. According Zuse he invented the world's first digital computer during WWII, working in nea...r total isolation within the Third Reich. How true is this claim? Today we are looking at Zuse's early machines, the Z1, Z2, and Z3. Selected Sources: The Computer -- My Life, by Konrad Zuse https://arxiv.org/pdf/1406.1886 - Z1 Architecture paper by Rojas https://sci-hub.se/10.1109/85.707574 - Z3... Turing Complete? also by Rojas

Transcript
Discussion (0)
Starting point is 00:00:00 The origin of the computer is a story shrouded in mystery. If you've been listening to Admin of Computing long enough, then you've probably picked up on that reality. It's something I tend to weave into my stories. But if not, let me try and convince you. The electronic digital computer, what we just call a computer these days, emerges sometime between 1938 and 1945, depending on who you ask. In that time period, we have a number of contenders that all come with their own problems, but all claim to be the origin of the computer. From Iowa State College, we have the Atanasoff-Berry computer, which became operational in 1942
Starting point is 00:00:44 and was destroyed scant years later. It holds the legal title of the first computer due mainly to a lengthy court battle. We only know about ABC due to this court case. Otherwise, it would have kind of been lost to time, just a footnote in I think only one published article. This machine, according to US case law, is the first real computer. But there are some technical details that prevent it from being a general purpose machine. Some argue for ENIAC, which sparked to life in 1945. On a technical level, it's definitely a computer, but its design is so primitive that it almost appears alien to modern observers. Its programs existed as
Starting point is 00:01:33 wiring diagrams scrawled on long scrolls of blued paper. The very existence of ENIAC itself was even kept a secret until 1946. Then we have relay machines like the Harvard Mark I and all the Bell models of complex number calculators. Some of those approach the technical cutoff, but the underlying technology is, as with ENIAC, nearly alien and incomprehensible. Then we can look at the European computers. Colossus, built in England and operational in 1943, was later destroyed. It was designed and used in secrecy. When it outlived its usefulness, the machine itself was crushed and all records and blueprints were burnt to ash.
Starting point is 00:02:20 The overarching pattern here is one of secrecy, loss of records, and contention. Of the computers I've listed, only two have survived. The Harvard Mark I and parts of ENIAC still float around museum collections. But there's one series of computers that beats out all in terms of mystery. Those are the computers of one Konrad Zeus. Zeus built his first machines in Germany during the lead-up and through the height of the Second World War. His works were destroyed by bombs and many of his records were burnt by incendiary weapons. Yet some claim that Zeus cracked the code
Starting point is 00:03:01 before anyone else. That he is the true creator of the first computer. Perhaps you can see the edges fraying a little bit. There's no clean or clear story to the creation of the computer. Let's complicate that picture a little bit more today, shall we? we? Welcome back to Advent of Computing. I'm your host, Sean Haas, and this is episode 145, Zeus's Mysterious Machines. Today we're looking at one of my most requested topics, that is, the work of Conrad Zuse. According to some, Zuse created the first computers, well before ENIAC or the Harvard Mark I or maybe even Colossus.
Starting point is 00:03:55 But is that actually true? In this episode, we're going to be tackling that question. Zuse is one of those topics I've avoided for a number of years. As with all my procrastinations, there is a good reason. All my reasons are good and just, after all. I was concerned that there would be a profound lack of sources in English. You see, Zeus was German. All his papers and notes contemporary to the supposed first computers were written in German. All his papers and notes contemporary to the supposed first computers were written
Starting point is 00:04:26 in German, and many of them were actually lost during wartime. But as it turns out, that's only partly an issue. You see, Zeus wrote an autobiography. It's called The Computer, My Life, and an English edition was published in 1993. It gives all the details I was looking for and raises some concerns. Zeus was active in Germany during the Second World War. That's when he was actively building some of his first computers. Most of his notes and even most of his machines were destroyed during allied bombing raids. So we have little to go off in terms of the most contemporary sources.
Starting point is 00:05:15 In his autobiography, Zeus does present some of the notes and papers that have survived, but we're still on thin ice. So we have something, but there's gaps that can never be filled in. My main source for this episode will be Zeus' autobiography, supplemented where I can with some contemporary sources and with later papers on Zeus' work. We'll see how far that can get us. But there is one big elephant in the room. That is, we have an engineer working in Germany during the lead up and the events of World War II.
Starting point is 00:05:51 Zeus was a soldier in the Wehrmacht, despite never completely making it into active service. He did work as an engineer at a weapons manufacturer. He eventually received funding for computer research from the Third Reich directly. According to Zeus, that was the extent of his involvement with the regime. I haven't seen any sources that state the contrary or point to some deeper, more active connection. I'm sure this could be litigated more thoroughly, but this isn't the place for that sort of discussion. I just feel I need to mention that at the top to set some expectations. We'll be largely focusing on the computing and engineering aspects here, and less on
Starting point is 00:06:25 the political ramifications, even though those are crucial to the story. I just feel that others are more equipped for that sort of discussion than Mr. Computer Man over here. So what exactly are we going to be talking about today? In this episode, we'll be looking at three of Zeus's machines, the Z1, Z2, and Z3. These machines are intimately related. In many ways, they represent the evolution of a single design. By looking at these machines and their history, I hope we can answer the main question of the day.
Starting point is 00:07:00 Did Zeus really invent the computer? And perhaps there'll even be an extension in next episode that completes a series here. Along the way, I want to take technical stock of these early machines. Zeus's designs are so early that they don't look like anything else. But despite that, there are still many similarities to later computers. Zeus is a hard person to sum up. Formally speaking, he was a civil engineer. He earned his degree in that field in 1935.
Starting point is 00:07:37 More practically speaking, he almost talks like a mathematician. Over his career, he would use his engineering skills to create physical analogues of mathematical systems. So perhaps that's no surprise. Zeus is also an artist. During his early years in university, he was part of this fraternity that put on plays, read poems, and generally, it sounds like caused problems in town and around the university. He would act, produce, write, and do set decorations for an innumerable number of plays in that period. He also painted, sketched, and even did woodcuts, and some photography when he had the time.
Starting point is 00:08:18 I think it's this artistic flair that makes his autobiography so interesting. He has a very particular way of writing that we will encounter throughout the episode. His autobiography is also illustrated by himself. We get everything from woodcuts to oil paintings of different stages in his life. Now, according to Conrad, he first started thinking of computers in 1933. Something crucial here is that he was working in near total isolation. He admits as much in his writings to quote, As is often the case in the history of inventions,
Starting point is 00:08:55 very similar ideas now developed independently in different places. For instance, at the same time I started in Germany, Aiken, Stibitz, Eckart Mauchli, von Neumann, and a few others began their work in the United States." Since a young age, he had been fascinated with all things mechanical. This ranged from building a giant crane in his childhood bedroom to constructing an automatic change machine. As for the date of 1933, well, as will become a trend, Zeus doesn't really explain much.
Starting point is 00:09:27 He just kind of drops the fact. He says he started dreaming of computing in 1933, but it's not until 1935 that he takes any concrete steps. Zeus also doesn't really explain his initial motivations here. It seems that deeper motivations are a mystery even to the man himself. Here's a passage that I think is illustrative of this point. To quote, 1. One can then ask oneself why the modern history of the computer begins in the third decade of our century.
Starting point is 00:09:58 Was the time ripe for a new start only then? The technical difficulties that were Babbage's downfall were already overcome by 1910. Was there perhaps a certain inhibition about making a critical study of the intellectual capabilities of man and taking systemic steps in the direction of amplifying intelligence?" It's almost as if the stage was set and Zeus's mind just ran wild. We've seen this before. When Stibitz built his tabletop logic circuit from tin cans, he isn't starting out with plans and ideas for a grand computing machine.
Starting point is 00:10:36 He was thinking about how to make a neat little calculating circuit and hey, maybe that'll be useful at work. He caught some bug and set down an ever accelerating path. This seems to have been what happened to Zeus. Sometime in the middle of the 30s, he gets this idea of a machine that can do math and make decisions. He doesn't know exactly where that idea came from. He just grapples with it for maybe even half a chapter in his autobiography. But he can set the stage. He can explain what was going on.
Starting point is 00:11:08 He can explain why it seemed so interesting. That very idea would consume the rest of his life. As I said before, Zeus was working in isolation from other digital developments. But this is really early, so what does that even mean in this period? By 1935, there was actually nothing published about digital computing. Stibitz hadn't published anything about binary adders. No other work was really ongoing. Colossus, Antiac, and the Harvard Mark I don't really start development until the 1940s.
Starting point is 00:11:45 And even then, we have a shroud of secrecy. Work on ABC doesn't start until 1937. But what's interesting is Zeus doesn't even know about Charles Babbage's machines. He doesn't learn about those until, I think, the late 40s. So this isolation isn't just a fact of the period. Babbage's engines were about as close as you could get to a digital programmable computer in this era, both physical and theoretical. And there are published works, Zeus just
Starting point is 00:12:14 hasn't read them. So he's very much starting from square one. So in 1935 there isn't much to go from and Zeus doesn't know about what there is in print. We only have precursors to the digital computer. There are publications and established bodies of work on analog computers and on mechanical calculators. In fact, both were fairly common. Although, fairly is carrying a lot of weight there.
Starting point is 00:12:44 Analog computers were used in research as tools, so there was a good level of knowledge and reliability. And desktop mechanical calculators were used in a lot of offices, so that's also a known element. Simple analog computers were also used in weapons platforms. This is where Zeus would have the most exposure to computers. In 1934, Zeus had been enlisted and trained in the Reichswehr, the German armed forces
Starting point is 00:13:11 during the Weimar period. Training would only last a few months, but while in one training camp, he was shown an analog calculator used in an anti-aircraft gun. Thus, Zeus knew about analog computation when he caught the bug, but he didn't know that much. That was the state of things
Starting point is 00:13:32 when he set to work on his first machine. The entire world was analog and mechanical, so perhaps it's no surprise that the civil engineer decided to stay in the mechanical world. His first computer would be purely mechanical, but would store numbers in binary. This is also where we run into a recurring problem for the episode. The language around Zeus's work is non-standard. This is old stuff, so there weren't standards for him to work up. This is complicated by the
Starting point is 00:14:05 fact that Zeus is working in German and working in Germany. Names and phrases are often German and some names had to be changed over time. For instance, the name of this first machine is initially Verschuchsmodell 1, which translates as Experimental Model 1. It's abbreviated as V1. That abbreviation, however, is later used by the Nazi regime for a flying bomb that would kill thousands of civilians. So the name gets tweaked later on to Z1. Luckily, translations of Zeus' work are all post-war, so we don't
Starting point is 00:14:48 run into that exact gotcha, but it's something we need to be aware of. Another gotcha that we do run into is the phrasing around binary. Zeus initially used the word secundal to describe the base-2 counting system we all know and love. That translates as secondary, so this isn't just a matter of translation. The reasoning here is simple. We didn't have the term binary yet. At least it wasn't in common use. This is also one of the few places where Zeus wasn't working in isolation, so it's just
Starting point is 00:15:23 kind of weird. He got on the binary tip, in part, so it's just kind of weird. He got on the binary tip, in part, from reading Leibniz. Leibniz was a mathematician who, among many other things, had developed a system of math around base two numbers. Many attribute the binary system itself to him, but the actual history is a little more complicated. Now in a bit of a twist here, even Leibniz has his own word for binary. He uses the term dyadic in his papers.
Starting point is 00:15:54 Zeus even makes note of this in his autobiography. The binary system wasn't really new, but it hadn't been used in very many places. It was this super specialized theoretical form of mathematics. So the language around it was still kind of up for grabs. Construction of the Z1 would start in 1935. This appears to be where the trend of building computers in garages began, at least in a manner of speaking. Zeus would take over a room in his parents apartment in Berlin to construct this machine.
Starting point is 00:16:28 Over the course of the next few years that room would be filled with a giant mechanical beast. This was done through begging, borrowing, and perhaps a little bit of stealing. I don't even mean that as hyperbole. Zeus wasn't working a regular job in this period. He had briefly worked at an engineering firm earlier in 1935, but had left to work on his grand machine. He was able to get funding from his family, friends and colleagues. Friends would volunteer to help with manufacturing and manual labor.
Starting point is 00:17:01 But when that wasn't enough, he turned to, in some cases, a little bit of petty theft or at least activities on the verge of theft. This will become a theme, especially during wartime. At one point in the 40s, some friends worked at a telephone exchange and would deliver some gently-loved relays to Zeus's workshop. Sheet steel would go missing from nearby scrap yards or factories. Nothing major but a little pinching around the edges to feed the computer gods. That's one of my favorite parts of the history of Zeus in this period. As for the Z1, well, it's a really
Starting point is 00:17:41 wild machine. Zeus's first computer was fully mechanical, the only electronic part was a motor. While strange to the modern mind, this is very in line with early analog machines. Most analog computers were fully mechanical, and while some very early machines were driven by a hand crank, by the 1930s, it was common to drive them using a motor and a clutch. Given that context, Zeus wasn't so much jumping to a whole new device. He was adapting established practice.
Starting point is 00:18:16 That happens to make the Z1 a very rare type of machine. It's a mechanical, digital computer. That's pretty uncommon to say the least. I don't think I've ran into another machine like this. Part of that weird combination is the whole context of the time. There weren't any other designs to borrow from. But part of it also comes down to Zeus' idiosyncrasies. He admits as much readily.
Starting point is 00:18:44 I'm paraphrasing here since this comes from a few different places, but Zeus describes himself as a visual person. He even explains that he was never interested in radio because it wasn't a visual medium. So when he starts designing a computer, he was thinking in purely visual terms, levers and pulleys and gears. Even when he finally learned about vacuum tubes, it would take him years to adopt the technology. It just wasn't a visual device. He didn't really get it. In a similar vein, Zeus also didn't use relays at first. He thought they were a little too complicated for him to understand that 2 would have to change with time.
Starting point is 00:19:26 This leaves us with a very different approach to computing than anything we're used to. That said, Z1 is recognizably a computer, at least in some ways. It has separate computing elements, or computing organs to use the older term. These include memory, arithmetic logic unit, input and output. They're even recognizable buses and decoders. It's just that everything is made from little moving mechanisms. Let's start with the heart of the computer, its memory. That should give us a good feel for what's going on inside Z1. From a purely theoretical standpoint,
Starting point is 00:20:08 this is gonna sound boring. Z1's memory is binary. It's broken up into chunks of binary digits, words, each being 16 bits wide. There were 34 addresses exposed over a six bit numeric address bus. That's really normal, right? If I felt like it, I could find a RAM chip with those exact specs on Jamco or something, like today. But this is 1930s technology.
Starting point is 00:20:40 Zeus ends up trying a number of ways to store numbers. He initially plans to use decimal memory, but figures that secundal was much easier to represent. So the crucial part becomes how a bit is stored. In the Z1's memory, a bit isn't coded as a little metal pin. It's pushed out to represent a 1 and pushed in to represent a 0. This is moved by a series of sliding steel plates and it's read by a similar mechanism. That should sound a little less normal. But once again, when we get out of that micro view, things appear very, well, very familiar. Bits are grouped into words. A few words are bundled together into these physical memory planes. Those planes are sandwiched between sheets of glass and stacked to form a stack of memory. That's the same physical construction that
Starting point is 00:21:40 would be used by magnetic core memory decades later. This kind of connects up to the larger trend of weird memory devices. It turns out that memory is one of the most complicated aspects of a computer, so there aren't very many ways to sort information that work for computer memory. So we get spinning capacitor drums, electrostatic tubes, magnetic flux flipping donuts, and weird little metal pins. The mechanical memory unit was hooked into a bus. An actual bus that connected up the rest of the machine.
Starting point is 00:22:20 And oh boy, was it a beast of a machine. The memory unit was actually pretty small, well, comparatively speaking. Zeus had calculated that an electromechanical memory system of similar capacity would have used upwards of 4,000 relays. So the little metal pins and sliding sheets saved some space and money. The physical bulk of the computer was dedicated to the control and arithmetic device. Now, keep in mind, these aren't circuits. I say that partly to remind myself.
Starting point is 00:22:53 I keep wanting to call these mechanical circuits, but that's not a real thing. Zeus devised a purely mechanical logic gate that was used as the building block of this machine. Z1 uses three categories of logic gates, the AND, the OR, and the NOT. That's a very usual compliment, especially for the period. Ah, but remember our rule for the day! Zeus's work all sounds normal from the outside, but the implementation is not normal. These are physical gates made from little metal rods and sheet steel. I've
Starting point is 00:23:34 seen them described in some papers as three-dimensional mechanical gates. Despite the fact that there are only three types of logic gates, Zeus actually used a number of different physical implementations for each gate. That means an OR in one part of the machine may be built differently than an OR in another region. Zeus gives a full description of how these gates function in his autobiography, but it's a little hard to understand. I've been referring to the paper The Z1 Architecture and Algorithms of Conrad Zuse's First Computer by Raoul Rojas,
Starting point is 00:24:13 published in 2014, which is working using a modern implementation of the Z1. It has illustrations that really help me understand the gates a little better. The basic operation of the Z1 relies on a clock cycle, but this isn't an electric clock cycle. No, it's mechanical. The machine is filled with these things called actor plates that move back and forth linearly in time with the great cycle. That linear motion is transferred to other layers of the machine through small vertical pins. That connection, however, is a little tenuous. Actor plates have notches cut in them such that, depending on the position of that transmission pin, the actor plate can either move freely or engage with plates below it through contact with that pin. The pin's position is controlled by so-called data plates which can slide the pin around in
Starting point is 00:25:12 the actor plates notch. That allows for a 1 or a 0 to be represented based off how the transmission pin is moved. If that sounds a little vague then don't worry. The details aren't super important for our discussion. If you want more detail, I'll link to the Rojas paper. What I do want you to take away here is this. There's a certain amount of chaos and majesty inside the Z1. It's a giant piece of meticulous clockwork that somehow functioned. And what did it do exactly? Well, it ran programs. At least, it kinda ran kinda programs. The Z1 operated by reading in a punched tape and executing instructions from that tape. So, we aren't talking about a stored program machine, but it is programmable.
Starting point is 00:26:06 It could be programmed to load and print numbers to carry out simple arithmetic, but it couldn't do conditional execution. That puts it on tenuous ground. To be Turing-complete, to be a fully functioning computer up to modern standards, you have to have conditional execution. The Z1 didn't. That means that, by strict definition, it's not a computer. That said, it's clear to see just how sophisticated the machine was.
Starting point is 00:26:36 I'd probably call it as close to a computer as you can get without crossing the threshold. Maybe we should look at the Z1 as a computer, but not a general purpose one. Either way, this puts Zeus's work incredibly early in the history of computing. The question becomes, where does he go from here? The 1930s was a momentous decade for computing. It's in this period that the final groundwork is laid that would help create the modern computer. One of those fundamental stones is called switching theory. It's a pretty simple idea on paper. In this period, researchers around the world realized that a switch could be represented mathematically.
Starting point is 00:27:23 That's it. Okay, maybe that's a reduction. Specifically, it was discovered that a switching element, be that relay, mechanical latch, vacuum tube, or just a household light switch, could be modeled using Boolean algebra. Any programmers in the crowd should know that name. Boolean algebra is a field of mathematics where you work only with two values, true and false. All operations are defined in relation to those values.
Starting point is 00:27:53 The core operations here are, well, maybe you know them already, and, or, and not. These are sometimes known as logical operators or logic gates. Boolean algebra has existed since the middle of the 19th century, so mathematically speaking, it's very new. It wasn't until the 1930s that it was applied in full effect.
Starting point is 00:28:18 Multiple researchers all put the puzzle together around the same time, all in isolation of each other. It's one of those trends and forces kind of things. The most well-known of the bunch is Claude Shannon. He gives us a name for this new field, switching circuit theory,
Starting point is 00:28:36 or as someone would later call it, switching algebra. Shannon first published on switching theory in English in 1938, with a few papers in Japanese and Russian published by different authors around the same year. Remember one of the themes here? Zeus worked in isolation from the outside world. He and his colleague, Helmut Schreier, worked out switching algebra on their own sometime around 1938.
Starting point is 00:29:05 This may have actually stemmed from an argument between the two. At least, its application came from a friendly disagreement. Schreier and Zeus were both in the same fraternity during their college days. Zeus even commented that Schreier played a mean King Kong during one of the frat's many stage productions. commented that Schreier played a mean King Kong during one of the frat's mini stage productions. Schreier also helped Zeus build the Z1, and apparently, Schreier tried to convince Zeus to switch to vacuum tubes in the 1930s. In hindsight, that's a stroke of genius foresight. Of course, tubes would make better switching elements than steel plates.
Starting point is 00:29:46 Tubes, in fact, are one of the best switching elements for computers. But we must steel ourselves. We know how the story ends. Zeus decides against using vacuum tubes. He doesn't know that the future of computing would be housed in little evacuated ampules of glass. Of course, he had his reasons. He just didn't like vacuum tubes. Now, let me explain, because it's pretty wacky and I think it's emblematic of Zeus's methods. As I've said before, he's a visual person. At one point in his autobiography, he explains how he never got into amateur radio because he couldn't see radio.
Starting point is 00:30:32 He was an engineer who liked to paint, act, and develop photos. Perhaps he was something of a caricature of himself at times. Because he never got into radio, he never worked with vacuum tubes. He didn't know how they worked, he didn't understand them, so he didn't want to work with them. He just didn't see any potential. Schreier, on the other hand, was an avid amateur radio man. So there's a bit of contention there. Now, Zeus's aversion started to change. The realities of an all-mechanical computer did wonders for his worldview. The Z1's construction had some huge limitations.
Starting point is 00:31:11 The machine was inflexible, hard to expand, and had physical constraints dictated by things like friction. The actual dimensions of the device were limited by physical laws. An electronic solution could solve many of these problems. This is where a switching theory comes into play. Zeus had been working up his own mathematics to explain computing since the mid-30s. It was rudimentary and a little confusing, and actually very visual. He has some notes in his autobiographyography and his early attempts are these wild diagrams with differently shaped plugs that zip around on a grid.
Starting point is 00:31:49 It was while working with Schreier that things snapped into focus. Zeus's biography is a little cagey here and Schreier seems to be somewhat unknown outside of German sources. From what I understand, the two reached the conclusion that Boolean algebra could be used to describe binary logic values. They discovered switching algebra again. Why is that such a big deal? Well, simply put, switching algebra lets you model logic devices mathematically. You can take a digital device and convert it into an equation. That plugs you into the mathematics superhighway.
Starting point is 00:32:28 Once your circuit is an equation, you're free to use all kinds of mathematical tricks and methods. This hooks you into hundreds of years of mathematical proofs, theorems, and techniques. It also means you can convert equations into circuits. Once you get switching algebra figured out, you can do actual computer science instead of just messing around. The trick to all of this is in that conversion. You have to know some way to turn physical devices into math equations and vice versa. In other words, you need an AND, OR, and NOT
Starting point is 00:33:03 gate. But that's simple enough. As Zeus describes in his autobiography, there was a period where he and Schreier were both working on their own sets of gates. Zeus, at that point, had finally given relays a shot. So he was working with relays. Schreier, on the other hand, was a devotee of the tube. The two were able to show that the same equations
Starting point is 00:33:26 could be constructed in either tube logic or relay logic. It would be possible to design a computer in the abstract and then implement it using any available technology. This gets us up to 1939 and back into the physical world. Z1 was more or less completed. Zeus wanted to move from mechanical to electronic logic elements. To do so, he needed money and he needed to build a new computer. That would be tricky. It turns out that folk in the late 1930s didn't really get the idea of a binary programmable machine. I know, I'm stupefied as well. At one point, Schreier would present his work on vacuum tube circuits to a crowd that was completely unresponsive. Zeus would, eventually, convince
Starting point is 00:34:20 a calculator company to help fund the construction of his next computer. That new machine is called the V2. But keep in mind the whole naming switch thing. It's better known as the Z2. And it...existed? Kind of. Seriously though, we don't have all that much information on this machine. Part of this is due to Allied bombings of Germany during World War II.
Starting point is 00:34:49 The Z-1 and Z-2 were both destroyed along with many related documents. We know so much about the Z-1 partly due to restoration efforts. The machine was recreated in the 1980s with help from Konrad Zuse himself. The Z2, however, hasn't received so much attention. I think this is partly because the Z2 is something of a stepping stone. On my way to explain. Zuse had all kinds of wild ideas about computers. It's unclear when certain ideas pop into his head, and his autobiography is a little non-linear, so that doesn't help matters. He thought that a computer could be made to beat humans at games like chess.
Starting point is 00:35:31 He dreamed of artificial intelligence. He even developed something similar to the Church-Turing thesis. But perhaps crucially, he started farming the idea that for a computer to be truly useful, it would need to store program instructions in its memory. This was all done in isolation from the rest of the world, and it was all done in some unknown order. This isolation would only grow deeper as the Third Reich came to power and World War II
Starting point is 00:36:01 truly began. Experience with Z1 showed that a much more sophisticated machine would be needed to attain any of those dreams. So, Zeus would wind up working in steps. Each new machine was a leap in technology. Z2 was a leap from purely mechanical to electro-mechanical. That was a huge jump in methods, but not necessarily a leap in capabilities. From what I've read, the Z2 sounds like something of a re-implementation of the Z1, but using relay-based logic. Zeus wasn't quite yet using switching algebra to its full extent, so the machine was still somewhat ad hoc. The computer was built with a mix of handmade and secondhand
Starting point is 00:36:45 relays, all in his parents' apartment, of course. But this wasn't a purely relay machine. This new computer used mechanical memory. More specifically, it used the Z1's mechanical memory. And I don't just mean the same technology, I mean the Z2 actually used this memory module that Zeus built for the Z1, as in it was ripped out from the earlier computer. So maybe the Z1 was trashed before Allied bombs ever fell. The Z2 was a bit of a troubled machine. It would work on rare occasion. This would lead to one of those more tense chapters of Zeus's saga. You see, to keep moving up to bigger and better machines, you would need more funding. It's a fact of life for many intrepid researchers.
Starting point is 00:37:38 The Z2 would have to serve as a demonstration unit, a proof of concept so he could jump to the next source of cash. To quote, The Z2 was more or less ready to demonstrate in 1940. I contacted the German Aeronautics Research Institute in Berlin-Alzhof, the DVL, and Professor Teichmann informed us that he would be visiting my workshop. Just hours before then, I was still frantically trying to get the machine to run, but it was useless. The guests arrived, I was sweating blood, and behold, my machine performed flawlessly. And afterwards, I hardly ever got the Z2 to run smoothly." So hey, a year or so of work for one good demo.
Starting point is 00:38:27 Perhaps that makes the Z2 a stepping stone, but it was a useful paver. Off the back of this demo, Zeus secured funding from the DVL to create a new computer, which would become known as the Z3. Keep the year in mind here, This is well into World War II. The Z-3 became a military project under control of the Reich Air Ministry. Zeus' work was being folded into the Nazi regime. This is where structure and organization gets a little complicated. In this period, Zeus actually worked a day job as an engineer at Hinshel Aircraft. He spent evenings and weekends working on various computers.
Starting point is 00:39:10 He also spun off a company, Zeus Apparatabao, as a legal entity to manage his digital research. In order to secure funding, he had to prove that one of these computer things would be useful for the war effort. The DVL was the only group that was willing to foot the bill, prove that one of these computer things would be useful for the war effort. The DVL was the only group that was willing to foot the bill, at least partially. His work was seen as useful but not essential to the war effort. Zeus would get partial funding, but didn't necessarily get a level of access and materials that would have actually helped him.
Starting point is 00:39:43 Rationing would affect his work in many key ways. He was competing against aircraft and weapons manufacturers for crucial components like relays and copper wiring. His supplies were always at risk. Zeus himself was also at physical risk. He was almost enlisted and sent to the front not once, but twice. He was only able to escape
Starting point is 00:40:07 fate because his work at Hinshull was deemed critical to the war effort. His computer was not. So even as he became more and more devoted to computing, he had to keep up a connection to Hinshull or keep fighting to prove that computers were a critical weapon of war. keep fighting to prove that computers were a critical weapon of war. In that capacity, Zeus was forced to remain engaged with the Nazi war machine to survive and continue his research. During this period, he also had to contend with supply shortages. His new machine, the BZ-3, had funding, but was still very low on the list of wartime necessities. Luckily, Zeus had friends that worked at a Berlin telephone exchange, so he was able
Starting point is 00:40:50 to procure some gently used relays from there. We aren't quite yet up to the full heights of rationing and scrounging, but by the Z3, we start to see things fraying on the edges. Z3 would be completed in 1941 and it represented a major step forward for Zeus. It was a fully electronic computer but crucially it could not handle conditional execution. Zeus keeps getting so excruciatingly close to a computer and then not quite going over the finish line. But what about
Starting point is 00:41:26 timeline here? What's the larger context? Well, um, there's the Bell Model 1 relay calculator that Stibbitt's built in the States. That's not programmable exactly, but it can do math using binary logic. Atnasoff is working on ABC at this point. I think he's already had his scotch and honky tonk fueled revelations. ENIAC is just starting to be drafted. So if we're being strict about turning completeness then the Z1 is not the first electronic digital computer. If we loosen things a bit then yeah the Z3 is still like a computer but it just doesn't quite meet that last requirement. But what about the weird things? There have to be a few features that make the Z3
Starting point is 00:42:18 particularly strange. First of all it isn't purely electronic, it's electromechanical. The logic is composed entirely of relays. In that sense, Z2 works as a testbed to help Zeus become more comfortable with the idea of the relay. As for memory, that's kinda less strange. A bit. I don't know, it's kinda complicated when it comes to memory elements. With Z3, Zeus finally ditches that same old mechanical memory module from the Z1. This new computer uses relays for memory storage. The machine
Starting point is 00:42:56 used some 1,400 relays to represent 64 22-bit numbers. That works out to just one relay per bit, so I think Zeus was using some kind of fancy latching relay here. This is a bit of a strange thing because not many computers end up with relay-based memory. That's mainly due to reliability and speed. Relays aren't very fast, and they also tend to break down over time. In most later machines, one technology would be used for logic and a different technology for memory. Many early vacuum tube machines, for instance, use some type of drum for memory. The symmetry here with the Z3 is a little quirk in that context.
Starting point is 00:43:42 Additionally, we're still not dealing with a stored program machine. This may come as no surprise given the tiny memory space. Programs were still fed in using a punched tape. But this wasn't just any old punched tape. It actually couldn't be. Wartime rationing meant that Zeus couldn't get his hands on normal paper tape. That was reserved for things like telegraph offices. So programs for Z3 were actually punched into rolls of celluloid film. Zeus actually used celluloid film for programming all his early computers. It was just easier to get a hold of at the time. Part of me wonders if that contributed to some of the issues with preservation here. Celluloid is notoriously combustible. There are a few cases of entire
Starting point is 00:44:32 film vaults incinerating themselves. A lot of old silent films have actually been lost due to that phenomenon. It very well could be the case that if Zeus used paper tape, maybe more would have survived bombings. But I could just be reading tea leaves here. Now, the lack of conditional execution is related to the programming method. It's very hard to implement something like a conditional jump using tape. You don't have the concept of a line number to jump to. Once we get to stored program computers, it's a lot easier to implement conditionals.
Starting point is 00:45:08 So maybe the real thing that's missing is stored procedures, and the lack of conditionals are just a symptom of that omission. Yet again, we're really close to a full-on computer. But there's something I want to discuss about the Z3. That is, how it was actually programmed. While we aren't up to conditionals yet, the Z3 still has some interesting tricks worth looking at. Old machine architectures are a guilty pleasure of mine. As a programmer, I find it fascinating to watch how my craft developed over time.
Starting point is 00:45:49 So where better to start than the earliest beginnings? This is especially interesting because the Z3 wasn't just any old computer. It was a stack machine. For this discussion to make sense, let me first give the modern definition of a stack machine. That will give us a background to work from. In a stack machine, you don't have many registers. Instead, you work directly from memory. You'll have a small set of registers for pointing at a location in memory and often a register or two
Starting point is 00:46:18 for the arithmetic circuits. That's it. Memory is treated as a stack, meaning a construct that has a bottom and a top. You can do two operations to the stack, push and pop. Push lets you put a new value on the top of the stack, updating the relevant pointers along the way. Pop is the inverse, it lets you take the top value off the stack.
Starting point is 00:46:40 Stack machines allow for very small instruction sets. In a register-based machine, like most modern computers, the processor has to support all kinds of variations on instructions to account for working with different destinations and sources, different combinations of registers or different combos of registers, memory addresses, and constants. It balloons the number of things the processor needs to keep straight, which makes the processor much more complex. On a stack machine, however, you only have to have a few ways to operate on data. The processor may need to know 5 or 6 instructions
Starting point is 00:47:17 with basically no variations or masks or prefixes or other complications. Thus, things can be radically simplified. So when you see the Z3 called a stack machine, that makes it sound like Zeus was pulling some kind of sagely trick. It's a very early computer, he has limited resources and limited time to appease his Nazi overlords, so he simplifies things. By building a stack machine, he's able to make a functioning computer and an efficient computer while working under extreme conditions. Thus, he's able to not only advance his research, but prevent being sent to the Eastern Front and his doom. That would be such a slick story, but that's not the reality of the matter.
Starting point is 00:48:06 When the Z3 is called a stack machine, that does not line up with the modern concept. A modern stack machine is all about memory. The Z3 had 64 addresses and memory. It also didn't store code in memory. It read code from tape. Usually when we talk about stack machines, execution and operation go hand in hand. Code is stored in memory and traversed, just as data is stored in memory and traversed. Z3 couldn't do any of that. So why is Z3 called a stack machine at
Starting point is 00:48:40 all? I mean, it's not even called a stack machine everywhere you read about it, it's just sometimes referred to that way. Well, it does have a stack. It's a really small stack, like maybe about as small as a stack can be. The Z3 stack has two elements called R1 and R2. To run arithmetic operations, you first load data from memory into the stack. This works kind of like a push. You tell Z3 to load an address in memory, the first load instruction pushes that data into R1. Then all subsequent load instructions move data into R2.
Starting point is 00:49:24 That means, in kind of a weird twist, if you run three load operations, the second and third of those operations will move data into R2. In a modern stack machine, you'd have more space, but Z3 is super limited. So the implication here is just kind of strange, but hey, there wasn't any precedent here.
Starting point is 00:49:44 Maybe it's not even really fair to call it a stack machine, The application here is just kind of strange, but hey, there wasn't any precedent here. Maybe it's not even really fair to call it a stack machine, just note that it's similar to later stack designs. You may ask at this point, how do you get data back into R1 after that first push? This is handled in a very non-intuitive way. There are two output instructions, one to store the contents of R1 in a very non-intuitive way. There are two output instructions, one to store the contents of R1 in a memory location and another to display the contents of R1 on some blinking lights.
Starting point is 00:50:14 When you run an output instruction, the stack pointer gets cleared, meaning that the next load instruction will be pointing to R1. Why is the stack only two values and why is r1 treated specially? Well, that has to do with how the Z3 handles math. The machine can run addition, subtraction, multiplication, division, and square roots. All of those, except the root, we're not talking about that, take two arguments and return one result. Those arguments are always R1 and R2, and the result is always stored in R1.
Starting point is 00:50:54 So you just give the instruction to add, and Z3 would run something like R1 equals R1 plus R2. It's easy to chain operations, since the stack just overwrites R2 until you output the value of R1. You could, say, implement an average algorithm by adding a bunch of values to R1, then dividing by the number of values added. Then at the end, you can output the calculated average. You may have noticed something about the pattern of operation here. Z3 operates less like a computer
Starting point is 00:51:31 and more like a calculator. Calculators often operate with hidden registers. For this, let me use the example of a reverse Polish notation calculator, since that's the closest to this operation method. When you use one of those calculators, you first load an initial value by typing in the number and hitting a button to store that value.
Starting point is 00:51:54 Usually it's called enter or something. That number is loaded into a register, let's call it R1. Then you type out the next number you want to work with, and then hit the operation you wish to perform. Once you do that, the second value is transferred into another register. We can call it R2. Then the operation is performed. The result of that operation is stored in the first register and displayed.
Starting point is 00:52:22 Since R1 is loaded up with your result, you can chain operations. You just input a number and hit the next operation. You could add another number to R1, then another, then another, then divide by however many numbers you added, and get an average. The value of R1 remains until you hit the clear button and everything resets. That's basically just how Z3 worked. In fact, many earlier mechanical calculators that existed worked in the same manner. You load up two registers and run an operation, your result is stored in one of those registers for later operation. In that light, the main innovation by Zeus are all in regards to speed and automation.
Starting point is 00:53:06 You tell Z3 how to run a calculation, then leave it to spin. At first, that may make Z3 sound unimpressive, right? I mean, what's a calculator compared to an actual computer? But we must remember that in this early period, computers really were just fancy calculators. Take ABC as the legally mandated example. That machine could do one trick. Solve systems of linear equations. It's a matrix solver. That's not very general purpose and not very exciting to the modern mind. It's a souped-up calculator.
Starting point is 00:53:46 We can even look further ahead. ENIAC, a computer that could do conditionals and everything, was designed to calculate firing tables. This was done by solving quadratic equations. It ends up being used for Monte Carlo simulations, this super intensive mathematical model. It's a souped up calculator. That's about all computers do for, well, maybe a decade or so. It's not until the 50s that we start to see anything that really pushes those fringes.
Starting point is 00:54:18 And even then it's proposals for things like aircraft trainer or a demo of a bouncing ball. Not super profound stuff. What I'm getting to here is a question that we grapple with often on the show. Where do you make that cutoff? When is a machine a computer? When is a calculator more than just a calculator?
Starting point is 00:54:43 We have hard and fast compsci rules about that, but those rules get, well, a little wiggly when we look at very early machines. The reason we digital nerds care about Turing completeness is similar to why Zeus cared about switching algebra. If a machine is Turing complete, then it can simulate any other Turing-complete machine. It can compute anything computable. Some restrictions apply, void where prohibited see your local laws and regulations. That hooks you into a pile of proofs, theorems, and well-loved tricks and methods. Just like how switching algebra allows you to apply all these existing mathematical methods
Starting point is 00:55:24 and techniques to physical switches. But what does Turing completeness actually give you when there have been no Turing complete machines? The body of work in 1941 included some papers by Alan Turing, some of the work of Charles Babbage and Ada Lovelace, and, well, the rest gets complicated. The Church-Turing thesis says that a Turing-complete system can calculate any algorithm. Once again, some restrictions apply, void where prohibited. Being Turing-complete
Starting point is 00:55:59 in 1941 would hook you into that world of mathematical proofs, but you can already get a lot of that by being a fancy calculator. Besides, it's still years until we start seeing algorithms that can only be practical on a computer. The Monte Carlo method, for instance, doesn't really come into use until 1945. There is a bit of a chicken and egg problem here, but still, maybe Turing Completeness isn't as valuable in the early 40s as it is in the 1950s or today. That said, I do want to complicate the story a little bit more, because there's an interesting tag here. Earlier, I pulled some of the implementation details of Z1 from a paper written by Rojas.
Starting point is 00:56:46 Well, Rojas has actually published quite a bit on Zeus's work. In 1998, he put out a truly spectacular paper about the Z3. That paper, How to Make Zeus's Z3 a Universal Computer, proves that Z3 is actually Turing complete. I bring this up because if you read around enough, you're bound to see someone cite this work and wag one or two fingers and say, oh ho ho, I knew all along the computer was invented in Germany. This is part of a larger genre of comp-sci papers, usually titled in the form of Proof that X is Turing Complete.
Starting point is 00:57:27 Let me be clear, no shade, I love this genre. It's the perfect mix of hook and bait for a nerd like myself. My favorites are probably the proof that Magic the Gathering is Turing Complete and that the x86 move instruction is, on its own, fully universal. The best part of these papers is that their methods are both mind-blowing and usually physically impractical. I'll link to Rojas' paper for you to read since his method is very complex, but it boils down to including every possible branch of a program on a tape and using some tricky multiplication to invalidate the result of some branches
Starting point is 00:58:12 after the results have been calculated. To make this work, Rojas has to use a truly huge program. The tape itself would be impractically large, since you're basically unrolling all your possible logic. It also relies on another trick of the Z3, the infinite loop. You can make the Z3 loop by turning the tape into a physical loop. You just splice the two ends together, and boom, the Z3 will spin and spin and spin. While possible, this method isn't actually useful. Rojas even says as much, to quote, I can therefore say that from an abstract, theoretical perspective, the computing model
Starting point is 00:58:58 of the Z3 is equivalent to the computing model of today's computers. From a practical perspective and in the way the Z3 was really programmed, it was not equivalent to modern computers. Alright, this brings us to the end of this episode. But we aren't done with Zeus. The Z3 may not have been a modern computer, but it did represent a very large step forward. Next episode, we'll be looking at where that step went. Namely, we're going to be discussing the Z4 computer, a machine that was Turing complete after a fashion. Along the way, we'll reach into the dark depths of wartime rationing and looting, one of the earliest origins of programming languages,
Starting point is 00:59:47 and perhaps get to the bottom of what really makes a computer a computer. Thanks for listening to Advent of Computing. I'm very happy to be back to my normal schedule, even though it's taking a little extra work this time. If you liked the show, then please take a minute to share it with a friend. Word of mouth is one of the best ways to grow a podcast. You can also rate and review the show on Apple podcasts and Spotify. If you want to support the show directly, you can do so with Admin of Computing merch or by signing up as a patron on Patreon.
Starting point is 01:00:22 Patrons get early access to episodes when I have time to record them a little bit early. They get polls for the direction of the show and bonus episodes. You can find links to everything at my website, AventOfComputing.com, and as always, have a great rest of your day.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.