About EDSAC

This is a very brief description of the EDSAC architecture. Much more information can be found in the references listed below.

Memory

The main memory consists of 1024 words of 18 bits each. It can be accessed as short words of 17 bits or long words of 35 bits (one bit of each word being unused for timing reasons).

Registers

Name
Size Usage
Program Counter
10 bits
Address of next instruction to be executed
Accumulator
71 bits
Holds results of arithmetic and logical operations
Multiplier
35 bits
Holds one of the operands for a multiplication

The original machine had some other registers that are not listed here beause they were not directly visible to the programmer. It is possible that they will not have direct equivalents in my version.

Data Formats

Short and long words can represent integers or fractions. Fractional numbers are assumed to be in the range -1 <= x < 1, with an implied binary point between the sign bit and the most significant bit. Negative numbers use two's-complement representation.

Additions, subtractions and logical operations operate on the most significant 17 or 35 bits of the accumulator. Multiplication assumes both operands are fractions as above. Short multiplication produces a 35 bit result, and long multiplication produces a 71 bit result.

Instruction Format

All instructions occupy one short word and have the following fields.

Field
Opcode
Spare
Address
Length
Bits
5
1
10
1

The Opcode indicates the operation to be performed. Many of the opcodes are chosen to have mnemonic value when interpreted as 5-bit teleprinter character codes (e.g. "A" = add).

The Spare bit was unused in the original (1949) version of the machine.

The Address field contains the absolute address of the operand in memory.

The Length bit indicates whether a short word (0) or a long word (1) is to be operated on. Long words occupy an even-odd address pair with the least significant half at an even address.

Instruction Set

Notations used in this table:

n

Address field of the instuction
C(n)
Contents of memory location n
f

Length indicator
k

A shift amount, encoded by setting bit number k-1 of the instruction

Instruction Description
A n f
Add C(n) to the accumulator
S n f Subtract C(n) from the accumulator
H n f Load C(n) into the multiplier register
V n f Multipy C(n) by multiplier and add result to accumulator
N n f Multipy C(n) by multiplier and subtract result from accumulator
T n f Transfer accumulator to memory location n and clear the accumulator
U n f Copy accumulator to memory location n
C n f Logical AND ("collate") C(n) with contents of accumulator and add result to accumulator
R k
Shift accumulator right (see below)
L k Shift accumulator left (see below)
E n
If accumulator is positive or zero, jump to location n
G n If accumulator is negative, jump to location n
I n Read a character from paper tape into the least significant 5 bits of location n
O n Print character in the most significant 5 bits of C(n)
X
No operation
Y
Round the accumulator to 34 bits
Z
Halt

I/O Devices

The following devices were attached to the EDSAC for input and output.
To read input from the telephone dial, the machine was halted with a Z instruction. Dialling a digit caused it to be added to the accumulator and the machine restarted.

A bank of uniselectors was used to load the "Initial Orders" (boostrap in today's terminology) into main menory.

There were also some cathode ray tubes capable of displaying register values and the contents of parts of the main memory. These were mainly for diagnostics, but the memory display could be used as a simple form of bitmap output.

Operator Controls

Clear Button
Clears all registers and main memory locations
Start Button
Loads the Initial Orders into memory and begins executing them
Stop Button
Manually stops execution
Reset Button
Continues execution from where stopped

References

EDSAC Simulator for Windows - includes documentation providing more architectural details.

The Preparation of Programs for an Electronic Digital Computer - lots of very detailed information about a later version of the machine.

The EDSAC Wikipedia article lists many other useful references.