EDSAC | 6 May 1949

EDSAC

 


The Electronic Delay Storage Automatic Calculator (EDSAC) is an early British computer. Inspired by John von Neumann's initial report on EDVAC, it was built by Maurice Wilkes and his team at the Mathematics Laboratory of the University of Cambridge. EDSAC was the second electronic digital stored-program computer to operate regularly, following the Manchester Mark 1.

Later, the project aimed to develop a commercially viable computer with the support of J. Lyons & Co. Ltd., resulting in the creation of LEO I based on the EDSAC design. Work on EDSAC began in 1947, and it executed its first program on May 6, 1949, calculating tables of squares and lists of prime numbers. EDSAC was finally decommissioned on July 11, 1958, and replaced by EDSAC 2, which continued in use until 1965.

As soon as EDSAC became operational, it was used to meet the university's research needs. The computer utilized mercury delay lines for memory and damped vacuum tubes for its logic circuits, consuming 11 kW of power. The cycle time for all standard instructions was 1.5 ms, while multiplication took 6 ms. Input was provided via a 5-hole punched tape, and output was produced by a teleprinter.

Initially, only an accumulator and a multiplier register were registered. In 1953, David Wheeler returned from the University of Illinois and designed an index register as an extension of the original EDSAC hardware.

In 1952, a magnetic tape drive was added, though it did not function reliably enough to be truly useful.

By 1952, the main memory (for instructions and data) was limited to just 512 18-bit words, with no backup storage available. The delay line (or "tank") was arranged with two batteries, each providing 512 words, with the second battery becoming operational in 1952.

The full 1024-word delay line memory was not available until early 1955 or 1956, and until then, programs were limited to about 800 words.

John Lindley, a student in the 1958-1959 academic year, remarked on how difficult it was to create a single accurate tape with the crude and unreliable handmade equipment available in the late 1950s.

EDSAC's main memory consisted of 1024 locations, but initially, only 512 were installed. Each location contained 18 bits, but due to timing issues, the highest bit was always unavailable, meaning that effectively only 17 bits were used. An instruction comprised a 5-bit opcode, one extra bit, a 10-bit operand (typically a memory address), and a length bit that indicated whether 17 or 35 bits were used for the operand (two contiguous words in little-endian format). Each opcode was represented by a mnemonic character; for example, the Add instruction used the letter 'A' for its EDSAC code.

Internally, EDSAC employed binary numbers in two's complement format, with numbers being either 17 bits (one word) or 35 bits (two words) long. Uniquely, the multiplier was designed to treat numbers as fixed-point fractions, with a range of −1 ≤ x < 1, meaning the binary point was positioned just to the right of the sign bit. The accumulator could store 71 bits, including the sign, ensuring that even the multiplication of two long (35-bit) numbers did not result in a loss of precision.

Available instructions included:

  • Add
  • Subtract
  • Multiply-and-add
  • AND-and-add (named "Collate")
  • Shift left
  • Arithmetic shift right
  • Load multiplier register
  • Store (optionally clearing the accumulator)
  • Conditional goto
  • Read input tape
  • Print character
  • Round accumulator
  • No-op
  • Stop

While there was no division instruction, various division subroutines were provided, and there was no direct way to load numbers into the accumulator (after a "Store and zero accumulator" command, an "Add" instruction was necessary). There was also no unconditional jump instruction, nor were there procedure call instructions, as these had not yet been invented.

In a paper published in 1953, Maurice Wilkes discussed EDSAC's relative addressing mode, which aimed to facilitate the use of subroutines.

Initially, instructions were hardwired to a set of uniselectors and loaded into the lower words of memory at startup. By May 1949, the initial instructions provided a primitive relocatable assembler comprising 31 words, leveraging the described mnemonic design. This was the world's first assembler and is considered the beginning of the software industry. Full descriptions of EDSAC's simulation, initial instructions, and first programs were provided.

The first computation performed by EDSAC was a program to calculate squares on May 6, 1949, written by Beatrice Worsley, who came to study the machine from Canada.

The machine was used by other members of the university to solve real problems, and many early techniques have been incorporated into modern operating systems.

Users prepared their programs by punching them onto punched tape in assembly language. Soon, they became adept at reading the code by shining light through the tape. Once a program was prepared, it was hung on a line near the paper tape reader. Machine operators selected the next tape from the line during the day to load into EDSAC, akin to a task queue known today. When a program printed output, the tape and printout were returned to the user; otherwise, they were notified of the halted memory location. Debuggers only appeared much later, but cathode-ray tube screens could be set up to display specific memory contents, for example, to check if a number was converging. Through a speaker connected to the sign bit of the accumulator, experienced users could distinguish between healthy and unhealthy sounds produced by the program, particularly when a program was "looping."

As working hours progressed, certain "approved users" could operate the machine themselves, often working late into the night, which sometimes ended with a bulb blowing out, as one user noted. This was also mentioned in Fred Hoyle's novel The Black Cloud.

Early programmers had to use techniques that are now considered undesirable, particularly self-modifying code. The introduction of the index register later on meant that the only way to access arrays was to modify the memory location referenced by specific instructions.

David Wheeler worked on this project and became the first person to earn a PhD in computer science, known for inventing the concept of subroutines. Users wrote programs that jumped to a subroutine, storing the return address (i.e., the position of the jump + 1) in the accumulator before making the call (referred to as the "Wheeler jump"). Conventionally, subroutines anticipated this and, as their first action, modified the return address to the jump instruction. Users had to know the lengths of their subroutines, enabling multiple nested subroutine calls but prohibiting recursion. Users copied the subroutine code from a master tape at the end of their programs. However, Alan Turing had discussed subroutines in his 1945 paper on the design proposal for the NPL ACE, inventing the concept of a return address stack that could allow recursion.

The absence of an index register posed challenges for subroutine writers as they could not know where a subroutine would be loaded in memory in advance. This made it difficult to access the code area used for data storage (the so-called "pseudo-instructions"). To solve this, early input routines were employed, responsible for loading subroutines into memory from punched tape. Upon loading a subroutine, the starting position was recorded, and internal memory references were incremented as needed. As Wilkes wrote, "the code representing commands externally differs from that used internally, a difference determined on one hand by the programmer's needs and on the other by the requirements of the machine's control circuitry."

EDSAC programmers employed special techniques to optimize the limited memory. For example, when loading a subroutine from punched tape that required specific constants to be calculated, these constants needed not be recalculated later. In such cases, the constants were calculated in an "intermediate stage." The code required to calculate the constants was included with the entire subroutine. After the initial input routine loaded the calculation code, control was passed to this code. Once the constants were calculated and recorded in memory, control returned to the initial input routine, adjusting the starting point to overwrite the code that had computed the constants while loading the remaining subroutine into memory. This complex adjustment allowed general-purpose subroutines to be tailored to specific situations without increasing the final memory footprint.


이 블로그의 인기 게시물

콜러서스 컴퓨터 [Colossus computer | December 1943]

NTDS [Naval Tactical Data System | 1961]

에니악 [ENIAC | December 10, 1945]