Share |
Login Form
Newsletter



Receive HTML?

Latest Members


The Life and Work of Konrad Zuse (Part 5) Hot

 
User rating
 
0.0 (0)

Konrad Zuse developed the world's first mechanical and electromechanical computers called the Z1, Z2, and Z3. Written by Konrad's eldest son, Horst, this article features many hitherto unpublished photographs from Horst's private collection. In this installment we take a look at the architectures of the Z2 and Z3 computers.

The Z2 Computer
Unsatisfied with the reliability of the binary switching metal sheets used in the Z1, Konrad Zuse next constructed the Z2 computer. The Z2 used the same type of mechanical memory as the Z1, but he used 800 old relays from phone companies to construct the arithmetic and control units.

The Z2's arithmetic unit consisted of a 16-bit fixed-point engine, because he wanted to test the reliability of relays for arithmetic calculations. Unfortunately, photos and plans of the Z2 were destroyed by allied air raids during the war. However, the Z2 served its purpose, because it convinced my father that relays were indeed reliable, and he subsequently built his Z3 computer completely out of relays (600 for the arithmetic unit and 1,800 for the memory and control units).

The Z3 Computer (1939-1941)
Helped by friends and with some small support from the government, Konrad Zuse constructed his Z3 machine from 1939 to 1941 in the Methfesselstraße 7 in Berlin-Kreuzberg. He wanted to use the Z3 to demonstrate that it was possible to build a reliable, freely programmable computer based on a binary floating point number and switching system, which could be used for very complicated arithmetic calculations. For reliability reasons he used relays for the entire machine.

The original design of the Z3 is illustrated in Figure 5-1. Unfortunately no photos of the original Z3 exist, because all documents and photographs were destroyed by allied air raids during the Second World War.

The original design of the Z3 drawn by Konrad Zuse in 1939
Figure 5-1. The original design of the Z3 drawn by Konrad Zuse in 1939.

Konrad Zuse rebuilt the Z3 at his Zuse KG company between 1960 and 1961 (Figure 5-2) in order to demonstrate the performance of this machine to justify his patents and to show the world his creation (and also to demonstrate the machine for advertising purposes).

Figure 5-2. The Z3 that was rebuilt by Konrad Zuse in 1960/61.
Figure 5-2. The Z3 that was rebuilt by Konrad Zuse in 1960/61.

Like the original machine, the rebuilt Z3 is completely constructed from relays. The Z3's memory (64 words, each comprising 22 bits) is seen on the left-hand side of Figure 5-2; the console is at the front; while the binary floating point arithmetic unit appears on the right-hand side. The Z3 is about five meters long, two meters high, and 80cm wide.

Note: As an aside, the Zuse KG (where "KG" means a special type of company in the form of a limited partnership) was founded in 1949 in Neukirchen (Kreis Hünfeld). This is about 120km north of Frankfurt.

In 1957, the Zuse KG was moved to Bad Hersfeld, which lies 15km north of Neukirchen. This move was prompted by the lack of space for rooms and the cramped production facilities.

The 1961 photograph shown in Figure 5-3 shows Konrad Zuse with the rebuilt Z3. The memory is on the left (note the "Z" logo Z of the Zuse KG company). The arithmetic unit with the stepwise relays are on the right, and the console with punch tape reader is on the front left.

Figure 5-3. Konrad Zuse with the rebuilt Z3 in 1961.
Figure 5-3. Konrad Zuse with the rebuilt Z3 in 1961.

As a special note of historical interest, Figure 5-4 shows a page from Konrad Zuse's diary from May 12, 1941, when he presented the original, working Z3 to scientists in Berlin.

A page from Konrad Zuse's diary from May 12, 1941
Figure 5-4. A page from Konrad Zuse's diary from May 12, 1941.

It is now undisputed that the Z3 was the first reliable, freely programmable, working computer in the world based on a binary floating-point number and switching system. As far back as 1941, the Z3 contained almost all of the features of a modern computer as defined by John von Neumann and his colleagues in 1946 [BURK46].

The only exception was the ability to store the program in the memory together with the data. Konrad Zuse did not implement this feature in the Z3, because his 64-word memory was too small to support this mode of operation. Due to the fact that he wanted to calculate thousands of instructions in a meaningful order, he only used the memory to store values or numbers.

As seen in Figure 5-5, the block structure of the Z3 is very similar to a modern computer. The Z3 consisted of separate units, such as a punch tape reader, control unit, floating-point arithmetic unit, and input/output devices. With respect to this theme, Burks et al. [BURK46] wrote as late as 1946, "In as much as the completed device will be a general-purpose computing machine it should contain main organs relating to arithmetic, memory-storage, control and connection with the human operator. It is intended that the machine be fully automatic in character, i.e. independent of the human operator after the computation starts."

A block diagram of the Z3
Figure 5-5. A block diagram of the Z3.

It is important to note that the Z3 fully met Burks' requirements. Also, the Z3 supported a special operating mode, because the Lu instruction stopped the program and activated the input device. The human operator could check, among other things, the contents of the Registers R1 and R2 in the arithmetic unit, he or she could perform intermediate calculations using the Registers R1 and R2, then the operator could continue running the program.

The rebuilt Z3 (1961)
Figure 5-6. The rebuilt Z3 (1961).

Now let us consider the discussion of floating-point numbers in Burks' paper [BURK46], which states "It would therefore seem to us not at all clear whether the modest advantages of a floating binary point offset the loss of memory capacity and the increased complexity of the arithmetic and control circuits." (Also note that the use of the binary system for computers was proposed in John von Neumann's "First Draft of a report on the EDVAC" [NEUM45])

It is very important to note that floating-point numbers were discussed as late as 1946 by Burks et al., at which time they were still not convinced that this was a good concept. By comparison, Konrad Zuse described the concept of a floating processor in 1934 and implemented such a unit in 1936, fully ten years before Burks' paper postulated it as a concept for modern computers and not as a built machine.

Now let us consider the logical concepts of the Z3 in detail:

Parallel Machine: The Z3 was a parallel working machine. A 22-bit word of data could be moved from the memory to the Register R1 and vice versa in one step (clock cycle). The same holds true for the arithmetic unit, where, amongst other things, parallel adders were used.

Memory: The memory of the Z3 consisted of 64 words, each containing 22 bits. Each word was directly addressable by the instructions Pr z or Ps z, where z is the address in the range: 64 <= z <= 1. A relay was needed for each bit.

Floating Point Numbers: Konrad Zuse employed a semi-logarithm representation of numbers. Let us take the number 100. In the binary system this number can be written as:

100 = 1x26+ 1x25 + 0x24 + 0x23+ 1x22 + 0x21 + 0x20 = 64 + 32 + 4

The number 100 can be created by the power of 2 related to the numbers: 26, 25 and 22 = 64 + 32 + 4. In the binary representation we use the 1 or 0 in order to represent the number. (These are exactly the factors 1 and 0 before the multiplication sign. In the binary digit system the number 100 can be written as: 1100100. This is a binary number without a decimal point. The number 100.5 can be represented as:

100.5 = 1x26+ 1x25 + 0x24 + 0x23+ 1x22 + 0x21 + 0x20 + 1x2-1= 64 + 32 + 4 + 0.5

In the binary system we write this as 1100100.1, where the 1 to the right of the decimal point represents 2-1= 0.5 (this form of representation is known as "fixed-point"). Representing numbers using a binary (0 and 1) notation has big advantages for computers. This has not changed to the present day. Since only two states or two numbers are considered, we can use pair circuits to store numbers and to operate with them. In 1939, relays were such building blocks. However, the above representation of numbers has a disadvantage. Konrad Zuse used 22 bits for his numbers, but with integer representations 22 bits can only be used to represent small numbers in the range <= 222-1. For this reason, Konrad Zuse used the binary floating-point (semi-logarithmic) representation. Let us consider the number 100 again:

100 = 1x26+ 1x25 + 0x24 + 0x23+ 1x22 + 0x21 + 0x20= 64 + 32 + 4

Konrad Zuse divided the number into an exponent and a mantissa. In the case of our example of 100, he would have formed his exponent from the power of two of the highest exponent in our number (6). This number would then be converted into binary to give 110. Similarly, the mantissa associated with our example would have been the binary number 1100100. This would have resulted in a floating-point representation as follows:

00000110 110010000000000

Using this scheme the first digit of the mantissa is always 1. For this reason, the first 1 is ignored, leaving the mantissa as 100100 instead of 1100100. Using this technique, Konrad Zuse managed to gain an extra digit, which he could use to provide higher accuracy. That is, instead of 14 bits, he effectively had 15 bits for the mantissa. The end result is that our number of 100 would now be represented as follows:

00000110 10010000000000

So the number 100.5 in the binary system is represented as1100100.1, while the floating point equivalent is as follows:

00000110 110010010000000

In the Z3, this number would be represented as follows:

00000110 10010010000000

Using this concept, Konrad Zuse was able to handle very big and very small numbers in the range of approximately ± 2-63 to ± 263.

Figure 5-7 shows examples of floating point numbers of the Z3. VZ is the sign for the mantissa, E7 to E1 are the bits of the exponent, and the numbers 14 to 1 represent the 14 bits of the mantissa. (This picture is a copy of one from the Konrad Zuse Multimedia Show [ZUSE98].)

Examples of floating point numbers of the Z3
Figure 5-7.
Examples of floating point numbers of the Z3.


Instructions:
The Z3 consisted of the following instruction set and cycles. We introduce the following notation: R1 and R2 are 22-bit wide Registers. The notation R1 := R1 + R2 means "The contents of Register R1 are added to the contents of Register R2 and the result is stored in Register R1 (Register R2 is set to empty)."

The Z3's instructions, functions, and the number of cycles they consumed are as follows:

 Pr z Read the contents of the memory word z into the Registers R1 or R2 (1 cycle)
 Ps z Write the contents of Register R1 into the memory word z (0-1 cycles)
 Ls1 Addition: R1 := R1 + R2 (3 cycles)
 Ls2 Subtraction: R1 := R1 - R2 (4-5 cycles)
 Lm Multiplication: R1 := R1 * R2 (16 cycles)
 Li Division: R1 := R1 / R2 (20 cycles)
 Lw Square root: R1 := SQR(R1) (20 cycles)
 Lu To call the input device for decimal numbers (9-41 cycles)
 Ld To call the output device for decimal numbers (9-41 cycles)

The two basic arithmetic operations of the Z3 are the addition and subtraction of the exponent and signs. Addition and subtraction require more than one cycle because, in the case of floating point numbers, care has to be taken to set the size of the exponent of both arguments to the same value. This requires some extra comparisons and shifting.

The number of cycles needed for the Lu and Ld instructions is variable, because it depends on the exponent of the argument. A number can be stored in memory (Ps) in zero cycles when the result of the last arithmetic operation can be redirected to the desired memory address. In this case, the cycle needed for the store instruction overlaps the last cycle of the arithmetical operations.

You may be a little surprised to note that the conditional branch instruction is missing. In his papers between 1936 and 1945, Konrad Zuse described many scientific and numerical problems he wanted to solve with his machines, but none of these problems required the use of the conditional branch.

However, in 1944, he did mention the conditional branch when he introduced Free Programs (Freie Rechenpläne) [ZUSE45, p16]. His definition was: Bei den freien Rechenplänen beeinflussen die eigentlichen Variablen den Ablauf der Rechnung. Zunächst können die bei den quasistarren Rechenplänen besprochenen Planvariablen wie variable Operationszeichen, Strukturzeichen usw. Funktionen der eigentlichen Variablen sein. Es kann z.B. die Art der Operation in einer Rechengleichung erst errechnet werden.

This translates as: With free programs the actual variables influence the execution of the calculation. First of all the variables, like operation signs and structure signs, as defined with the quasi rigid (quasi starr) programs, etc., can be functions of the actual variable. It is, for example, possible to calculate the type of operation in a calculation equation.


Arithmetic Unit and Carry Look-Ahead:
The arithmetic unit of the Z3 was Konrad Zuse's masterstroke (Figure 5-8). He reduced all the arithmetic operations to addition or substraction (subtraction is an addition of the complement of one number and the number).

Block diagram of the Z3's arithmetic unit
Fig.5-8. Block diagram of the Z3's arithmetic unit.

For the realization of the addition he implemented a special switch, because he wanted to avoid using too many cycles for the addition of two binary floating point numbers. Using this switch, he could reduce the addition of two floating-point numbers from a minimum of 14 cycles (with a serial addition) to only three cycles (with a parallel addition).

Although there were only five instructions for arithmetic operations (Ls1, Ls2, LM, Li, and Lw), some additional operations were implemented that could be called from the input device. He also simplified the execution of the arithmetic operations with micro-sequences controlled by stepwise relays.

A relay from the Z3
Fig.5-9. A relay from the Z3.

Konrad Zuse employed a self-developed carry look-ahead circuit constructed from relays for the addition of floating-point numbers. Assuming the numbers to be added were still in the memory, then five cycles were required: two for the Pr instruction and three for the Ls1.

The first cycle was used to transfer the first operand to Register R1, while the second cycle was used to transfer the second operand to Register R2. The exponent and mantissa were then added and the result was stored in Register R1 (after this Register R2 is set empty). We write this as: Ls1: R1 := R1 + R2. (Note that Konrad Zuse used additional internal registers which are not shown on the picture above. These registers were two bits longer than the mantissa in order to provide higher accuracy results.)

The Z3's multiplication algorithm is like the one used for decimal multiplication by hand. That is, it is based on repeated additions of the multiplicator according to the individual digits of the multiplicand. The division algorithm is similar to that for multiplication, except that repeated subtraction is used.

The instruction algorithm behind the instruction Lw is one of the "jewels" of the Z3. The main idea is to reduce the square root operation to a division (see also the discussions on the Z4 Computer in Part 7 of this article).


Arithmetic Exception Handling:
The Z3 included the ability to perform arithmetic exception handling. Konrad Zuse implemented this exception handling because he wanted to be sure that the Z3 would calculate numbers correctly, even when it was working without a supervisor. Thus, the Z3 was designed to recognize the following operations:

 Underflow of the range of numbers is 0
 Overflow of the range of numbers is infinity
 For calculations involving 0:
 0 + x = x
 0 * x = 0
 x / 0 = infinity
 0 / 0 = ?
 For calculation involving infinity:
 infinity + x = infinity
 infinity * x = infinity
 1 / infinity = 0
 All operations with ? have the result ?
 0 / 0 = undefined
 infinity - infinity = undefined
 infinity / infinity = undefined
 0 x infinity = undefined

The undefined state was displayed on the left-hand side of the output device using small lights. For the numbers 0 and infinity, Konrad Zuse used special bit codes in the exponent. An exponent of –63 was used to represent decimal 0, while an exponent of –64 or +63 represented ± infinity. The Z3 always performed calculations correctly if one argument was 0 or infinity and the other argument was in the allowed range.

The Z3's input and output device
Figure 5-10.The Z3's input and output device.

In the case of the Z3's input and output device (Figures 5-10 and 5-11), numbers could be entered using four buttons for the mantissa and 17 buttons for the exponent. Results were displayed using lamps. Figure 5-11 shows the lamps for the decimal numbers (right) and the arithmetic exception handling (left).

The Z3's input and output device
Figure 5-11.The Z3's input and output device.

In order to display results, the binary floating-point numbers used inside the Z3 were converted to decimal floating-point numbers (each conversion required between 9 and 41 clock cycles, depending on the exponent). The mantissa consisted of 4 decimal digits (five digits for the 1) and the exponent was between –8 and +8. The biggest decimal number which could be shown was 19999E108.


Clocked Machine:
The speed of the Z3 was governed by the frequency of a special impulse generator (or "clock") that was used to synchronize the machine (Figures 5-12 and 5-13). In fact the clock is actually an electric motor driving a shaft/drum, upon which are attached a number of "arms" (or protruding levers). Each arm was used to close a switch, which in turn activated groups of relays. The angular separation between the arms caused different switches to be closed at different times, thereby allowing the system to control the flow of data between the various units.

The Z3's special impulse generator (clock)
Figure 5-12.The Z3's special impulse generator (clock).

Konrad obviously wanted the clock frequency to be as high as possible so as to make the Z3 perform its calculations as quickly as possible. However, there was a tradeoff to be made, because higher clock speeds caused sparking of the telephone relays. The clock frequency that was eventually used was around 5.3 Hertz depending on the quality of the relays.

The Z3's special impulse generator (clock)
Figure 5-13.The Z3's special impulse generator (clock).

In talks with Rojas [ROJA98a] and myself, my father mentioned that a multiplication of two floating point numbers took about three seconds (the Z3 needed 16 cycles for a multiplication, so 16 cycles / 5.3 Hertz = 3 seconds). In order to avoid sparking of the relay contacts when switching them, he used the drum to drop off the electricity at the switching time. This principle avoided material rust and guaranteed a long functionality of the relay contacts.


Micro-Sequencer and Pipelining:
The heart of the Z3's control unit consisted of micro-sequencers. Every cycle in the Z3 was divided into five steps (I to V). Steps IV and V are used to transfer information from one part of the Z3 to another; for example, the contents of a register to a memory cell.

During steps I, II, and III, an addition or subtraction is executed in both parts of the arithmetic unit (this is the execution phase of an instruction). A typical instruction takes the arguments of the operation, executes an operation, and writes the result back. Konrad Zuse considered minimizing execution time to be very important, so he executed instructions using an overlapping technique as illustrated in Figure 5-14.

The Z3's execution pipeline
Figure 5-14. The Z3's execution pipeline.

This overlapping of instructions is a type of pipelining. Although it is not well known, Konrad Zuse was awarded a patent for a pipelined computer on June 30th, 1949 (Figure 5-15).

Konrad Zuse's patent
Figure 5-15. Konrad Zuse's patent.

The title of this patent is: "Rechenmaschine zur Durchführung arithmetischer Rechenoperationen (z.B. Multiplikationen)" which translates as "Calculator for the execution of arithmetic operations (for example multiplication). This was a machine consisting of eight independent arithmetic units, each of which could execute partial arithmetic operations on certain data, which made it possible to execute these operations on large data sets.

The first pipelined computer in the world
Figure 5-16. The first pipelined computer in the world.

We now return to the Z3's micro-sequencers, which Konrad Zuse implemented using stepwise relays. These sequencers, which were part of the control unit, were used to enable a sequence of repeated micro-instructions. For example, the instruction Lm is realized by a sequence of additions.

The Z3's micro-sequencers realized using stepwise relays
Figure 5-17. The Z3's micro-sequencers realized using stepwise relays.

In the Z3 we find micro-sequences for the instructions Lw, Lm, Li, Lu and Ld. Note that this is not the same as the modern concept of micro-programming, but is instead an example of hard-wired micro-sequencing.

A stepwise relay
Figure 5-18. A stepwise relay.


An Example Z3 Program (Polynomial):
Let us now consider an example program for the Z3. Let us assume that we wish to calculate the following polynomial:

((a4x + a3)x + a2)x + a1

Let us further assume that the values for a4, a3, a2, and a1 would first be loaded into the memory cells 4, 3, 2, and 1 using the input device.

Lu    To call the input device for the variable x
Ps 5  To store variable x in memory word 5
Pr 4  Load a1 in Register R1
Pr 5  Load x in Register R2
Lm    Multiply: R1 := R1 x R2
Pr 3  Load a3 in Register R2
Ls1   Add: R1 := R1 + R2
Pr 5  Load x in R2
Lm    Multiply: R1 := R1 x R2
Pr 2  Load a2 in Register R2
Ls1   Add: R1 := R1 + R2
Pr 5  Load x in Register R2
Lm    Multiply: R1 := R1 x R2
Ppr 1 Load a1 in Register R2
Ls1   Add: R1 := R1 + R2
Ld    Shows the result as a decimal number


The Lu instruction at the beginning of the program instructs the input device to read a value for x. The Ld instruction at the end of the program directs the Z3 to display the result as a decimal number.


Minimal Design Principle and the Universal Computer (Turing)

Konrad Zuse followed a minimal design principle in the construction of his computers, because his goal was to build a powerful computing machine with minimal effort and cost. He really didn't have any other choice, because his parents were not rich and he didn't have much money. As far as he was concerned, the Z3 was the last in a series of trial machines (Z1-Z3) that were intended to pave the way to a machine that would be able to solve the mathematical problems of engineers and scientists.

Konrad Zuse was convinced that his computer could calculate all mathematical problems (in 1941 he told his friends that his machine was capable of playing chess), but he could not prove that this was he case. In fact it wasn't until 1998 (three years after Konrad's death) that Raul Rojas [ROJA98a] formulated the proof that the Z3 was a truly universal computer in the sense of a Turing machine.


The S1 and S2 Computers

As one final note (for this portion of the article), the S1 and S2 computers were mandated by the Henschel aircraft company in 1942/43. These were special developments for measuring the wings of airplanes. The S1 employed approximately 600 relays and had hardware-wired programs. The S2 was the successor of the S1, and consisted of approximately 800 relays and about 100 dial gages in order to measure the surface of the wings. It was used by the Henschel Aircraft Company since 1942. The S2 can be regarded as the first process computer in the world.

In Part 6 we will consider Konrad Zuse's Plankalkül programming language (see also the Main Index for a quick and easy way to navigate the entire article).

User reviews

There are no user reviews for this listing.

To write a review please register or login.
 
 
 
Written by :
Clive Maxfield
 
 






Latest Content
User rating
 
0.0 (0)