Programming a PayrollProgramming a Payroll

We will start with the first stage: a matter of adding up the hours worked by Duncan MacKenzie in the past week. The times at which MacKenzie enters the plant and leaves it have been noted with the aid of a punchclock and control card at the doorkeeper's office. The electronic computer has been informed of these times automatically. They are noted every week in the storage under the same address. MacKenzie's work on Monday is always noted under address 1007, his working hours Tuesday under 1008, those on Wednesday under 1009 - and so on until Saturday, for which day (if he works) address 1012 is reserved. Address 1013 covers Mondays performance for the next worker on the list, Jonathan Martin.

Our program must first of all calculate the hours worked for the whole week. For this it will have to add together the "contents" of addresses 1007 to 1013. The first instruction is: "Add the contents of address 1008 to the contents of address 1007." The second: "Add the contents of address 1009 to the result." And so on.


Now we have spoken repeatedly of "commands," "orders" or "instructions" without having made it quite clear just what such an instruction looks like, how it is formulated and how the computer interprets it. Quite simply: every instruction is a number with several digits. In the "ER 56" computer, which we shall frequently use in the following pages as an example, the instruction number has seven digits. The first few are called the "address part" If they are "3762," for example, this means that something must happen to the number held in the address with that number. The two last digits in the instruction number are the "operation part." They note what is going to happen to the number in address 3762. A "45" in the operation part means "Add the number to the number in the accumulator." A "46" signifies "Subtract the number from the contents of the accumulator," A "47" means "Multiply the number by the contents of the accumulator."

(A quick recapitulation: Do you remember what the accumulator is? It is - in the "ER 56" and some other computers - the high-speed storage which has a direct connection to the arithmetic unit and which on each occasion holds on to the last intermediate result, when numbers are progressively added.)

There is of course also a command which moves the very first number of a calculating process direct from the number's address into the accumulator, and there is yet another which removes the number at the end of the calculation in the accumulator - namely, the final result - and deposits it at a definite address. These two commands are "41" and "42." If we want to instruct the computer when it has finished adding up MacKenzie's working hours: "Now forward the final result from the accumulator to address 4001 (which is always kept free for the weekly result of MacKenzie's toil)" the command looks like this:

Index Registers >>>>

© by PhiloPhax & Lauftext & Redaktion Lohberg
Kybernetik - Was ist das?

First printed in Germany: 1963


Cybernetic Computer and Electronic Brain

The fascinating story of how computers work in clear, non-mathematical language