1946 Computer Design

Lecture 37

9th August 1946

Code and Control -- II. Machine Design and Instruction Codes

J.W.Mauchly(Electronic Control Company)

Introduction

This lecture discusses the design of a general purpose computer, suitable for general classes of problem.

Influence of Available Components

There can be a major influence on the design due to the characteristics of available components for building the computer. For example, different designs could be appropriate depending on whether the input-output device was fast or slow. Again there is a significant influence if the memory is an electrostatic one rather than a Mercury Acoustic Delay Line, with its consequent delays in memory access.

Kinds of Instructions

One could devise a minimum set of instructions that could carry out general computations, e.g. providing for arithmetic with only addition, subtraction (or just a complementer) and a conditional test on the sign of a value. However a minimal instruction set is not convenient or efficient. Conversely providing too many instructions could be expensive and a strain on the effectiveness of the programmer.

In considering the design of a first machine, one would tend towards requiring less rather than more equipment and design. Multiplication is an obvious instruction that though expensive should be cost effective; division is less obviously so, as it is used less frequently and can be programmed satisfactorily using multiplication. Should we provide both floating-point and fixed-point numbers? For a first machine, fixed-point should be sufficient. Again floating-point can be programmed acceptably using fixed-point. A shift instruction is not essential, but is cheap to provide. Store-to-store instructions might be useful. Some basic input-output instructions are essential.

It is assumed that control will start at an address specified on the input device and will continue following successive locations except where diverted by control transfer instructions. A single conditional order on the sign of a number would be sufficient, but a separate order for unconditional jumps would be worthwhile. Particularly if a Mercury Acoustic Delay Line store is being used it may be sensible to have each instruction contain the address of the next instruction to be obeyed. This would enable the programmer to reduce the waiting time before obeying the next instruction (since in general by the time one instruction has been executed the instruction following it will have already passed by, so the standard time of instruction execution would otherwise tend to the full cycle time of a Delay Line).

Form of Instructions

It is sensible that instructions are stored in the same memory as numerical information :

  1. To simplify machine design and construction
  2. To allow flexibility between different programs as to how much store is used for instructions compared with numbers
  3. To allow the standard instruction set to be used for operating on instructions (e.g. to alter address fields for general store access)

It is sensible to standardise instructions so that they all have the same length (in bits), and this length should be that of the standard number, or a simple multiple or fraction of it. Of course a sensible size for a number has to be considered also.

There is a major choice affecting the length of instructions. The natural arithmetic instruction is to apply an operation between two numbers to produce a third. This suggests the form of an instruction containing three address fields. However a one-address scheme is arguably more efficient, since it is frequently the case when accumulating simple sums and products, or computing expressions, that the result of one basic calculation is used immediately in the next, and does not have to be remembered after that. This suggests that an accumulator register is implicit in the instruction and only one store address is sufficient.

A Specific Design

To make the discussion more concrete, consider a hypothetical machine, operating in decimal for convenience. It has memory addresses 0 to 999 and each store address holds 10 decimal digits plus a sign. If we use a further decimal digit to hold the sign, this gives a standard word size for a number of 11 digits. With a three-address code, this gives an obvious division of three digits for each of the three addresses, leaving two digits for the instruction code. For a one-address machine, only five digits are required, so using a full word would be a waste. But there is no reason why we could not store two instructions in a store word, and the control would take instructions from store in pairs, obeying a pair in a set order. (A dummy instruction that does nothing would be useful to fill unused half words.) The 11th digit could be used to distinguish instructions from numbers, e.g. if the first digit value was a 0 it would be a positive number, if a 9 (say) a negative number, otherwise an instruction. If the store is a Mercury Acoustic Delay Line, then we could use the 11th digit to give the relative address of the next instruction pair, e.g. digit values 1 - 8 being used for this purpose (although presumably some minimum value for the time taken to obey two instructions might need to be added).

Input-Output Instructions

If we assume magnetic tape (or wire) is the input-output medium, then obviously it is not sensible to have it running continuously. So we must have instructions to stop and start the tape, and specify which direction. Furthermore, if we are stopping and starting the tape, then there is a problem with the time taken for the tape to get up to speed, so instructions that transfer a word at a time between tape and memory would be uneconomic. This suggests that transfers between memory and input-output should be made in units of a standard block of consecutive words.


\