**The 1949 EDSAC**

This information has been taken from the

EDSAC explanatory poster produced by Cambridge university. I have added some of my own notes for clarity.

The 1949 Instruction set EDSAC’s instructions in 1949 was very simple and were executed at a rate of about 600 per second. They were as follows:

AnS: A += m[n] AnL: AB += w[n]

SnS: A −= m[n] SnL: AB −= w[n]

HnS: R += m[n] HnL: RS += w[n]

VnS: AB += m[n] * R VnL: ABC += w[n] * RS

NnS: AB −= m[n] * R NnL: ABC −= w[n] * RS

TnS: m[n] = A; ABC = 0 TnL: w[n] = AB; ABC = 0

UnS: m[n] = A UnL: w[n] = AB CnS: AB += m[n] & R

CnL: ABC += w[n] & RS

RnS, RnL: Shift ABC right arithmetically by the number of places corresponding to the position of the least significant one in the shift instruction. For example, R0L, R1S, R16S and R0S shift by 1, 2, 6 and 15 places, respectively.

LnS, LnL: Shift ABC left arithmetically by the number of places corresponding to the position of the least significant one in the shift instruction. For example, L0L, L1S, L16S, L64S and L0S shift by 1, 2, 6, 8 and 13 places, respectively.

EnS: if A >= 0 goto n

GnS: if A < 0 goto n

InS: Place the next paper tape character in the least significant 5 bits of m[n].

OnS: Output the character in the most significant 5 bits of m[n].

FnS: Verify the last character output.

XnS: No operation.

YnS: Add a one to bit position 35 of ABC, counting the sign bit as bit zero. This effectively rounds ABC up to 34 fractional bits.

ZnS: Stop the machine and ring a bell.

The EDSAC Instruction Set (1949)

What caught my attention is that the instructions use a single character mnemonic – taken directly from the upper case characters available at that time from the 5-bit “Murray” teleprinter code – which was in common use in the Creed teleprinters used at that time.

The mnemonics were chosen to give a reasonable amount of readability such as A for ADD and S for SUBtract.

This makes common sense to make it as easy as possible and is a simple first stage mapping of human readable mnemonic characters to a 5 bit binary teleprinter code, which was used directly as the 5 bit instruction.

There were only two register spaces accessible from the instruction – visible to the user:

The 71-bit Accumulator

The 35-bit Multiplier Register

Further more there were 1024 18-bit words of delay line storage

The contents of the Order Register (Instruction Register) and Sequence Control Tank (Program Counter) as well as the multiplicand register were viewable on the operator’s console.

For my own clarification – so as to build up a simple model of the EDSAC, I have attempted to group the instructions into:

**Accumulator and memory only**

A n Add the number in storage location n into the accumulator

S n Subtract the number in storage location n from the accumulator

T n Transfer the contents of the accumulator to storage location n and clear the accumulator

U n Transfer the contents of the accumulator to storage location n and do not clear the accumulator

**Accumulator, Multiplier and Memory**

H n Copy the number in storage location n into the multiplier register

V n Multiply the number in storage location n by the number in the multiplier register and add the product into the accumulator

N n Multiply the number in storage location n by the number in the multiplier register and subtract the product from the accumulator

C n Collate [logical and] the number in storage location n with the number in the multiplier register and add the result into the accumulator

**Accumulator and Shifter Operations**

R 2n-2 Shift the number in the accumulator n places to the right

L 2n-2 Shift the number in the accumulator n places to the left

**Conditional Jumps**

E n If the sign of the accumulator is positive, jump to location n; otherwise proceed serially

G n If the sign of the accumulator is negative, jump to location n; otherwise proceed serially

**Input-Output**

I n Read the next character from paper tape, and store it as the least significant 5 bits of location n

O n Print the character represented by the most significant 5 bits of storage location n

F n Read the last character output for verification

**Misc Operations**

X No operation

Y Round the number in the accumulator to 34 bits

Z Stop the machine and ring the warning bell

The numerical values in the accumulator and multiplier registers are normally thought of as signed binary fractions, but integer operations could also be done easily. For example, the order V1S can be interpreted as adding the product of the 17-bit signed integer in m[1] and to the 17-bit integer in RS and adding the result into bits 0 to 32 of the ABC. With a suitable shift, the integer result can be placed in the senior 17 bits of A ready for storing in memory

**Teleprinter and perforated tape for Input Output**

EDSAC used 5-bit integers (0 to 31) to represent characters using two shifts: letters and figures.

In letter shift the codes 0 to 31 respectively represented: P, Q, W, E, R, T, Y, U, I, O, J, figs, S, Z, K, lets, null, F, cr, D, sp, H, N, M, lf, L, X, G, A, B, C and V.

In figure shift the encoding was as follows: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ?, figs, “, +, (, lets, null, $, cr, ;, sp, £, ,, ., lf, ), /, #, −, ?, : and =.

In these tables, figs, cr, sp and lf denote figure shift, carriage return, space and line feed, and on the paper tape perforator their keys were labelled π, θ, φ and ∆, respectively.

In this document, these codes correspond to the ASCII characters #, @, ! and &.

The paper tape reader complemented the high order bit of each 5-bit character, so the rows , and are read as codes 0(P), 7(U) and 27(G), respectively. The machine could read paper tape at a rate of 50 characters per second and output to a Creed teleprinter at nearly 7 characters per second.

The 5-bit Murray code used by the paper tape perforator and teleprinter was somewhat different to the familiar ascii character set. I have tried to sumarise it here

Table 2 Edsac Character and Instruction Codes
Letter Shift Figure Shift Binary Decimal Instruction
P 0 00000 0 PLACE
Q 1 00001 1
W 2 00010 2
E 3 00011 3 JUMP IF EQUAL
R 4 00100 4 RIGHT SHIFT
T 5 00101 5 TRANSFER & CLEAR
Y 6 00110 6 ROUND
U 7 00111 7 UPDATE & !CLEAR
I 8 01000 8 INPUT
O 9 01001 9 OUTPUT
J 01010 10
# FS 01011 11
S " 01100 12 SUBTRACT
Z + 01101 13 STOP
K ( 01110 14
DEL LS 01111 15
NULL . 10000 16
F $ 10001 17 VERIFY
@ CR 10010 18
D ; 10011 19
! SP 10100 20
H £ 10101 21 COPY TO MULT
N , 10110 22 NEGATE THROUGH MULT
M . 10111 23
& LF 11000 24
L ) 11001 25
X / 11010 26 NO OP
G # 11011 27 JUMP IF GREATER
A - 11100 28 ADD
B ? 11101 29
C : 11110 30 COLLATE (AND)
V = 11111 31 ADD THROUGH MULT
Notes
1 Erase (DEL) is represented by an asterisk (“*”) in the simulator. When this character is output, it sets the
teleprinter into letter shift.
2 Blank tape is represented by a period (“.”). This character has no effect on output.
3 The personal computer text environment has only a “newline” character. On the Edsac simulator,
the line-feed character is interpreted as a newline character, and carriage returns are thrown away.
4 The symbols ?, f, ? or p are typed as @, !, & and #, respectively.
Some capital alphas unused B,D,J,K,M,Q,W