# How does the floating point conversion in Zuse's machines work?

Can someone please help me understand the floating point to readable decimal conversion algorithms of the Z1 and Z3? There is a patent in German containing all the information but I can't speak German.

• @wizzwizz4 What the heck? Would you mind to let people write pointers to help him? The question is quite clear, he's looking for informations about the workings of the Z1, especially the FP to readable conversion. Feb 1 '19 at 16:44
• But why did I get a pointer? @Raffzahn clearly understood what I was trying to mean with no misunderstandings at all Feb 1 '19 at 16:45
• @wizzwizz4 done now please put it back as a normal one Feb 1 '19 at 16:49
• @wizzwizz4 Still the same question - as clear as before. Feb 1 '19 at 16:59

Actually, mechanical translation by Google works remarkably well. I found that I needed to first copy the text to my text editor (emacs, in my case) in order to convert the umlauts into proper Unicode characters, but then I just pasted the paragraphs one at a time into Google, and got the following, which is quite idiomatic. I have not touched up the results at all except for some punctuation.

Note that "secondary system" should probably read as "binary system". And "games" should be "rounds" or "cycles".

Here are two pages starting with section 3.5. Someone with greater interest than I can do the rest — so far, this looks like a fairly obvious approach.

EDIT: OK, I've made it a community wiki entry, and made some of the more obvious tcouh-ups to the translation. Feel free to add to what's here.

3.5 Übersetzung vom Dezimal- ins Sekundalsystem

3.5 Translation from decimal to binary system

Beim Übersetzen der auf Z–K (Abb. 2) eingestellten Zahl wird zunächst unabhängig von der Lage des Kommas der auf Z eingestellte vierstellige Dezimalwert als ganze Zahl übersetzt. Dies geschieht im Teil B entsprechend der Anmeldung Z23624, indem die Dezimalziffern für sich ins Sekundalsystem übersetzt werden und als solche, angefangen von der höchsten Stelle, nacheinander auf das Additionswerk übertragen werden und zwischen jeder neueingestellten Ziffer das bisher aufgebaute Resultat mit 10 multipliziert wird.

When translating the number set to Z-K (Fig. 2), the 2-digit decimal value set to Z is first translated as an integer, regardless of the position of the comma. This is done in Part B according to the application Z23624 as the decimal digits are translated into the binary system and as such, starting from the highest digit, are successively transferred to the adder and between each new digit the result so far is multiplied by 10.

Die Multiplikation mit 10 geschieht durch Einstellen des doppelten und achtfachen Wertes auf das Additionswerk, also dadurch, daß das Resultat einmal eine Stelle aufwärts und einmal drei Stellen aufwärts verschoben wird.

The multiplication by 10 is done by setting the double and eightfold value to the adder. To put it differently, so that the result is shifted once upwards and once upwards three times.

Abb. 19 zeigt die Zifferneinstellungsvorrichtung Z für eine Stelle. Sie besteht im wesentlichen aus einer Tastatur mit durch Tasten betätigten Kontakten, durch die die Dezimalziffer ins Sekundalsystem übersetzt wird. Durch die Relais Za, Zb, Zc, Zd werden dann diese Kombinationen auf die Relais Ba−10, Ba−11, Ba−12, Ba−13 übertragen. Die durch den Steuerschalter Ud (nicht gezeichnet) bewirkten Einstellungen sind für die einzelnen Spiele folgende:

Fig. 19 shows the digit setting device Z for one digit. It consists essentially of a keyboard with key-operated contacts, which translate the decimal digit into the binary system. By means of the relays Za, Zb, Zc, Zd, these combinations are then transferred to the relays Ba-10, Ba-11, Ba-12, Ba-13 transmitted. The settings made by the control switch Ud (not shown) are as follows for each cycle:

Im Spiel 8 muß die so übersetzte ganze Zahl auf die Form y = 2a · b gebracht werden. Da die Einer auf die Stelle −13 eingestellt werden, muß in Teil A zum Ausgleich +13 addiert werden17 (LL0L). Ferner muß die Zahl entsprechend der Lage der ersten von Null verschiedenen Ziffer ausgerichtet werden. Dies geschieht, genau wie bei der Subtraktion, durch die in Abb. 18 dargestellte Teilschaltung über die Relais Bm, Bn und As. Uc bewirkt die zur Berücksichtigung des Kommas erforderlichen weiteren Operationen.

In cycle 8, the integer thus translated must be put on the form y = 2a · b. Since the ones are set to the position -13, it is necessary to add +13 to the compensation in part A 17 (LL0L). Further, the number must be aligned according to the location of the first nonzero digit. This happens, as with the subtraction, through the partial circuit shown in Fig. 18 via the relays Bm, Bn and As. Uc causes the further operations required to take the comma into account.

Abb. 20 zeigt die Teilschaltung K zur Einstellung des Kommas. Es wird die der Lage des Kommas entsprechende Taste gedrückt. Der den Tasten zugeordnete Index gibt an, mit welcher Potenz von 10 die bei Z eingestellte Zahl zu multiplizieren ist. Ist Tk0 gedrückt, so ist eine Korrektur der übersetzten Zahl nicht nötig. Liegt das Komma weiter rechts, so muß der übersetzte Wert entsprechend oft mit 10, liegt er weiter links, mit 0,1 multipliziert werden. Die Multiplikation mit 10 bedeutet in halblogarithmischer Form (10 = LOLL · L,0L ), die Addition von LL im Teil A und im Teil B die Addition von b + b/ 4; sie läßt sich also in einem Spiel erledigen. Die zugehörigen Einstellungen Fc , Fd , Ec 18 , Ei , Ab 0 , As , Fh , Fi , Fk , Fl bewirkt das Relais Ug (nicht gezeichnet). Ug schaltet ferner Br ein, wodurch der Wert ausgerichtet wird (vgl. Seite 13). Die Addition von 3 wird durch Subtraktion von −3 bewirkt, der Grund wird weiter unten angegeben (Einstellung von LLLLL00 über Ei und von Ab 0 ).

Fig. 20 shows the subcircuit K for setting the comma. The key corresponding to the position of the comma is pressed. The index assigned to the keys indicates with which power of 10 the number set at Z is to be multiplied. If Tk0 is pressed, a correction of the translated number is not necessary. If the comma is further to the right, then the translated value must be multiplied by 10, if it is further to the left, multiplied by 0.1. The multiplication by 10 means in semilogarithmic form (10 = LO LL · L, 0L), the addition of LL in part A and in part B the addition of b + b / 4; So it can be done in a cycle. The associated settings Fc, Fd, Ec 18, Ei, Ab 0, As, Fh, Fi, Fk, Fl causes the relay Ug (not shown). Ug also turns on Br, which aligns the value (see page 13). The addition of 3 is effected by subtracting -3, the reason given below (setting LLLLL00 above Ei and from 0).

Die Multiplikation mit 0,1 ist etwas komplizierter. 1 / 10 hat im Sekundalsystem die Periode 0,0 00LL bzw. in halblogarithmischer Form mit 16 Stellen hinter dem Komma:

Multiplication by 0.1 is a bit more complicated. 1/10 has in the binary system the period 0.0 00LL or in semilogarithmic form with 16 digits behind the comma:

Diese Multiplikation läßt sich in 4 Spielen wie folgt durchführen: Ist x0 der zu multiplizierende Wert, so wird
- im ersten Spiel x1 = L, L · x0,
- im zweiten Spiel x2 = L, 000L · x1,

This multiplication can be carried out in 4 cycles as follows: If x0 is the value to be multiplied, then

• in the first cycle x1 = L, L · x0,
• in the second cycle x2 = L, 000L · x1,
• There are a few obvious translation problems (Zuse used "Sekundalsystem" by analogy to "Dezimalsystem" to mean what we call "binary" today, "Spiel" is not "game" in this context, etc.), but the general outline of the algorithm should be clear. If you make this answer editable for everyone, and Yin Xuan Yang edits his question with pointers to details he doesn't understand, I can fill in those if necessary (I am a native German speaker). Feb 3 '19 at 17:35
• @dirkt I found a very bad version in English of the algorithm. It says that the number must be converted to decimal from BCD (for the mantissa) and I am not sure about the exponent. So if we had 5 * 10 ^ 4, we would convert 5 to 0101 at position -13 of the Mantissa while we add 13 for compensation on the exponent. Then it says that the mantissa must be multiplied with 10 as many times as the exponent says? But that makes no sense, atleast to me. Feb 4 '19 at 15:28

My German is rubbish. However, I know enough to make liberal use of Ctrl + F and a dictionary using this PDF version of the patent to hopefully extract the information you want. Page numbers are ignoring the title page added by zuse.zib.de, and all translations are rubbish except where specified otherwise:

On page 37, I found a table:

Comments. The overview drawing on the following page shows the following circuits:

| *snip* .................................................................................|
| U .......... Reading in a decimal number from the console |
| D .......... Output of decimal result (lamp display) ............ |
| *snip* .................................................................................|

I'm guessing that D is what you want to know about. This is what I can find on page 38:

The ↘ arrow (line 3) symbolizes the operation "show decimal result". The mantissa is shifted to the left by two places – this corresponds to a shift of the comma by two places to the right (see explanation in section 3.6).

Now I suspect that this might be the wrong thing, but I'm going to have a look at section 3.6 to make sure.

Section 3.6 is on page 25, and is entitled "Translation from the binary to the decimal system". That looks like it's what you want, but I can't be sure without reading it further.

Unfortunately, machine translation isn't designed for programmer jargon (what's a "heated full-toothhand"?), so I'll have to crack out a dictionary. Unfortunately, the dictionary is also not designed for programmer jargon. Help!

## 3.6 Translation from the binary to the decimal system

The return translation from the secondary system to the decimal system occurred in accordance with the principle set out in the application Z23624. By multiplying with 10 or 0.1 and aligning, the number must first be brought to a form where the a-value is zero and the b-value is between zero and 15. It will then be the integer part of the number in front of the comma (decimal point) transferred to the corresponding decimal number and multiplied the rest behind the comma by 10, then the part in front of the comma is transferred back into the second decimal number, the rest multiplied by 10, etc.. Part B requires four jobs in front of the comma for this procedure. Since the Additionswerk (adder?) B has only two places in front of the comma, for the reverse translation the comma is moved from the front behind the fourth place (see Figure 3), thus moving the b-value down 2 places. Accordingly, the associated a value must be increased by two, i.e. with the finished number, a = L0 must hold.

• Page 25 through 28 contain all the information about the conversion algorithms. The pages are very long but contain all the info Feb 1 '19 at 18:10
• I need to know about sections 3.6 and 3.7 which are U and D Feb 1 '19 at 18:11
• @YinXuanYang Thanks; that gives me confidence. I'm trying to translate it now! Feb 1 '19 at 18:16
• many thanks! That is the section that I got a bit lectured on by a friend and 3.6 and 3.7 are what I'm looking for Feb 1 '19 at 18:18

This might be not the detailed explanation asked for, but some usable pointers I hope:

A perfect hit might be Raul Rojas book Die Rechenmaschinen von Konrad Zuse describing the workings in great detail. Sorry, again just German. It would be most definitive worth a translation.

Then there is a somewhat compact (25 pages) version in The First Computers a collection of descriptions of very early machines edited by him. A worthwhile read to understand what was archived in the 1940s and early 1950s world wide.

Further his web page about working on the Z1 reconstruction might offer additional information, some links as well.

• Thank you, but all the other inner workings of the Z1 and Z3 are already available in 2 documents written by himself in English. Unfortunately, he does not devote any time at all to the conversion algorithms. I do not want to buy a 40 euro book in a language I don't even understand and might not contain exactly what I'm looking for - the conversion algorithms. Feb 1 '19 at 17:01
• This is not an answer to the question. It's actually a link-only answer, albeit one that goes into detail about the links. Feb 1 '19 at 17:04
• @wizzwizz4 yes, I am, and I do see quality in this question. It's exagtly the type of question I would love to see more. One that can't be answered by clicking on the top entry of a google search. Feb 1 '19 at 17:19
• @wizzwizz4 Well, Mr. Rojas did need like 30 pages, I'm most definitly not the guy to reduce this to two. So above are the indicators I can give - and I'd be quite pleased if someone does comes up with a better answer. So far, none has. I do well understand that it's easy and tempting to pick on a answer one doesn't deem the best possible - but wouldn't it be way more appropriate to strive for a new, improved one instead? Or in more simple words Don't complain about inferior research of others - Do research instead! Feb 1 '19 at 17:32
• @wizzwizz4 Hey, than this is your chance. Ignore all the stupid filler words (not to mention articles) and go for the technical terms, then it becomes easy anyway. Looking forward to your upcoming answer :)) Feb 1 '19 at 17:36