Horst Zuse (Konrad Zuse's son, a computer science professor by trade) has a homepage where he supplies (and sells) various pieces of information, booklets and CDs and DVDs about his father's work.
The Z4 had two floating point registers,
R2, that were used for calculations. Monadic operations operated on
R1 only, dyadic operations on
R2. Results always went to
R2 was deleted.
The "Instruction set" of the Z4 was as follows:
A n (e.g.
A 17) - reads a memory cell into
R1 is in use (though it is a bit blurry for me what "is in use" is supposed to mean here. It could mean there is a sort of flip-flop in here that switches between target registers on every A operation and is reset by any of the calculation instructions)).
S n (e.g.
S 18) - stores
R1 in to a memory cell.
- Dyadic operations, such as
MAJ (Maximum) and
- Monadic operations, such as
x*1/pi, performed the equivalent operations.
- Comparison operations with zero, positive, or infinite (i.e.
NaN) test the number in
R1 and return
+1 if the condition matches,
-1 if not. Note there is apparently no comparison against arbitrary constants beyond these.
- The conditional jump
SPR was a later addition and included on specific request of the Zürich University (ETH), the first commercial customer. It allows to jump forward over code sequences when
+1, the jump will not be executed when
-1. Instructions up to the instruction
ST will be skipped if the jump is taken.
SPR was normally combined with the comparison operations above.
UP (change punch reader, Unterplan) is something that might look like an I/O operation, but actually is much more. The next instructions after
UP are read from the secondary punch tape reader, until a
FIN instruction is encountered there (which switches back to the primary reader). As the Z4 didn't have loop or backwards jump instructions, this could be used to program subroutines on the secondary reader, or even loops by glueing the secondary punch tape into a (physical) loop and run it around.
- Output instructions (
L) transfer register contents into human-readable form and emit them to the "display" (a set of lamps), secondary punch tape (external storage), or typewriter.
The Z4, like the Z3, handled floating point exceptions in a pretty "modern" way. Numbers that exceed the supported floating point range (
1E20) were stored as overflow ("sehr groß") or underflow ("unbestimmt"). Once a number is stored as that, any follow-up calculation with that number was guaranteed to never reach a valid value again (just like the
NaNs in modern FPUs do).
- The ETH Zürich, the first commercial customer, leased out the machine to third parties at one Swiss Rappen per instruction.
- During its whole lifetime at ETH Zürich, the Z4 executed about 100,000 operations (although that seems highly unlikely for a total time over 5 years, but that is what the Zuse page says).
- If you want to visit the machine, it's still there in the "Deutsches Museum München" (in Munich).
- Operating frequency in today's measures was about 40Hz.
- The machine operated on 32-bit words and registers.