Next: Arithmetic Exception Handling Up: Instructions Previous: Translation

Arithmetic Unit and Carry Ahead

The arithmetic unit of the Z3 is Konrad Zuses masterstroke. He reduced all the arithmetic operations to addition or substraction. For the realization of the addition (subtraction is an addition of the complement of one number and the number) Konrad Zuse implemented a special switch because he wanted to avoid too many cycles for the addition of two binary floating point numbers. Using the special switch, he could reduce the addition from at least 14 cycles with a serial addition down to three cycles with a parallel addition. Although there were only five instructions (Ls1, Ls2, Lm,Li, and Lw) for arithmetic operations, some more operations were implemented which could be called from the input device. He also simplified the execution of the arithmetic operations with micro-sequences controlled by stepwise relays. Konrad Zuse used a self developed carry look-ahead circuit of relays for the addition of floating point numbers. With this concept he could add two floating point numbers in three cycles. Assuming the numbers to be added were still in the memory, then he needed five cycles, two for the instructions Pr and three for the instruction Ls1. With the first cycle, the first operand was transferred to Register R1 and with the second cycle, the second operand was transferred to Register R2. Then, the exponent and mantissa were added and the result was stored in Register R1. After this Register R2 is set empty. We write this as: Ls1: R1 := R1 + R2. 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 get a higher accuracy of his results.

The multiplication algorithm of the Z3 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 didgits of the multiplicand.

The division algorithm is similar to the multiplication one, but the repeated substraction is used.

The instruction algorithm behind the instruction Lw is a jewel of the Z3. The main idea is to reduce the square root operation to a division (See also the Machine Z4).


Slav Petrov 2001-07-02