Manchester Mark 1 - Programming

Programming

Of the 20 bits allocated for each program instruction, 10 were used to hold the instruction code, which allowed for 1,024 (210) different instructions. The machine had 26 initially, increasing to 30 when the function codes to programmatically control the data transfer between the magnetic drum and the cathode ray tube (CRT) main store were added. On the Intermediary Version programs were input by key switches, and the output was displayed as a series of dots and dashes on a cathode ray tube known as the output device, just as on the SSEM from which the Mark 1 had been developed. However, the Final Specification machine, completed in October 1949, benefitted from the addition of a teleprinter with a 5-hole paper-tape reader and punch.

Mathematician Alan Turing, who had been appointed to the nominal post of Deputy Director of the Computing Machine Laboratory at the University of Manchester in September 1948, devised a base 32 encoding scheme based on the standard ITA2 5-bit teleprinter code, which allowed programs and data to be written to and read from paper tape. The ITA2 system maps each of the possible 32 binary values that can be represented in 5 bits (25) to a single character. Thus "10010" represents "D", "10001" represents "Z", and so forth. Turing changed only a few of the standard encodings; for instance, 00000 and 01000, which mean "no effect" and "linefeed" in the teleprinter code, were represented by the characters "/" and "@" respectively. Binary zero, represented by the forward slash, was the most common character in programs and data, leading to sequences written as "///////////////". One early user suggested that Turing's choice of a forward slash was a subconscious choice on his part, a representation of rain seen through a dirty window, reflecting Manchester's "famously dismal" weather.

Because the Mark 1 had a 40-bit word length, eight 5-bit teleprinter characters were required to encode each word. Thus for example the binary word:

10001 10010 10100 01001 10001 11001 01010 10110

would be represented on paper tape as ZDSLZWRF. The contents of any word in store could also be set via the teleprinter's keyboard, and output onto its printer. The machine worked internally in binary, but it was able to carry out the necessary decimal to binary and binary to decimal conversions for its input and output respectively.

There was no assembly language defined for the Mark 1. Programs had to be written and submitted in binary form, encoded as eight 5-bit characters for each 40-bit word; programmers were encouraged to memorize the modified ITA2 coding scheme to make their job easier. Data was read and written from the papertape punch under program control. The Mark 1 had no system of hardware interrupts; the program continued after a read or write operation had been initiated until another input/output instruction was encountered, at which point the machine waited for the first to complete.

The Mark 1 had no operating system; its only system software was a few basic routines for input and output. As in the SSEM from which it was developed, and in contrast to the established mathematical convention, the machine's storage was arranged with the least significant digits to the left; thus a one was represented in five bits as "10000", rather than the more conventional "00001". Negative numbers were represented using two's complement, as most computers still do today. In that representation, the value of the most significant bit denotes the sign of a number; positive numbers have a zero in that position and negative numbers a one. Thus the range of numbers that could be held in each 40-bit word was −239 to +239 − 1 (decimal: -549,755,813,888 to +549,755,813,887).

Read more about this topic:  Manchester Mark 1

Famous quotes containing the word programming:

    If there is a price to pay for the privilege of spending the early years of child rearing in the driver’s seat, it is our reluctance, our inability, to tolerate being demoted to the backseat. Spurred by our success in programming our children during the preschool years, we may find it difficult to forgo in later states the level of control that once afforded us so much satisfaction.
    Melinda M. Marshall (20th century)