How Programming Has Influenced The Design Of Hardware

Posted 05 Jul 2024

In 1953 Grace Hopper (COBOL) and John Mauchly (ENIAC) wrote a paper on how programming influences the hardware design of computers. There were so many good comments in it, that I wanted to summarize them here.

The Paper

“Influence of Programming Techniques on the Design of Computers”

Available only to IEEE members, alas. I’m really not sure why the IEEE wants to keep ancient documents locked up – the ACM opened up all materials published prior to 2000.

Figuring It Out

In the early days of computers, it wasn’t clear what the “best” structure would be. The initial goal was to perform complex calculations faster than was currently possible. Some machines were purpose-built to solve specific problems. ENIAC has the place in history that it does, because it could solve many types of problems. It was a “general purpose” computer.

As these machines were designed, it was obvious that reducing the manual labor (like connecting components via patch cables), and substituting a list of logical operations would be needed to get the job done. So computer designers thought in terms of machine instructions, or “orders” as they were first called.

Once those first machines were in use, and programmers started building programs for them, some changes to the hardware became desirable. This is why the paper’s title emphasises “programming techniques”; it was about using the hardware to enable better algorithms for solving problems.

Observations From The Paper

“… the techniques evolved in response to the challenge of each new task may bring about improvements comparable to those which the engineer achieves by changing circuitry and hardware.”

“For many users, one of the important economic factors is the cost associated with the programming staff needed to secure effective use of the electronic equipment. Special instructions designed for the greater convenience of the programmer, are likely to increase initial cost.”

“A general-purpose computer, however, must be designed on the assumption that new problems or variations of old ones will be rather common, and the ease with which programs may be created or modified is therefore an important factor to be reckoned with.”

Hardware And Software Co-Design

“While the engineer is developing new components and better ways of using such components, the programmer is likewise developing new techniques for the application of computers and is continually enlarging the range of applications as well. Hence, it must not be expected that, as the art of programming advances, there will be a gradual but certain convergence upon some optimum instruction code defining the ideal computer toward which engineering designers should strive. The development of new techniques in programming may have as profound an influence on computer design as would be produced by an entirely new type of memory or switching element.”

Automation

“Electronic computers are now being used to create their own sequence of instructions. … The fact that any general-purpose automatic computer could be made to do this has been known for a long time, but, as in many engineering developments, there has been a lapse of time between the first glimpse of the theoretical possibility and the reduction to actual practice.”

“It is reasonable to expect, and it has been found in practice, that an automatic computer is much less likely to make mistakes than a human doing the same work.”

“Ridding a new program of errors turns out to be a costly job when done by human labor, and may be almost as costly when computer time is used for this purpose.”

Subroutines

“The differences in approach by these separate groups is partly a result of differences both in central and auxiliary equipment and in other characteristics such as the instruction code peculiar to a particular system. In view of this, there is some satisfaction in noting that, just as there are some characteristics which are similar in all automatic computers, there are also elements common to all of these diverse efforts toward automatic programming. One such universal element is the subroutine.”

“Not long after Mark I started running in the spring of 1944, disadvantages were discovered in this subroutine method. Once a subroutine had been called into action, no other operation could be performed because the main bus was tied up. Then subroutines could not be abridged; they always computed to full computer precision. They could not make use of approximations which sometimes are available in the computation. Each used largely its own separate hardware. Left idle, they developed bugs when increasingly infrequent calls were made on them.”

“A “coding machine” was provided for Mark III. Now the subroutine was stored in the relays of the coding machine which automatically inserted the proper memory location. Still the subroutines available were limited to those built into the hardware of the coding machine.”

“Defining certain standard methods of locating arguments and results, and standard procedures for transferring control to and from the subroutines, they developed the first easily used and referenced library. Fortunately, they also wrote a book discussing their methods.”

Automatic Programming

This is not what you might think, in these days of asking an AI prompt to write a program for you. Instead, these were the first steps towards programming languages. Coding everything by directly writing the “orders” a machine has built in was becoming too time-consuming (hence, expensive), and solutions were sought. This also came from a desire to reduce human error in the preparation of programs.

“During the same period [starting in 1949], a “short code” was developed for UNIVAC to speed the programming of mathematical problems. This was the first pseudo code for UNIVAC. The original conception of an “interpretation” routine for UNIVAC was suggested by Dr. John W. Mauchly, who proposed that the UNIVAC should be programmed to accept, as nearly as possible, the mathematical symbols as written by the mathematicians, including the significant parentheses and juxtaposed characters for multiplication.”

First Steps In Languages

“Three types of routines compilers, generators, and operators, and three techniques-subprogramming, pseudo coding, and coded coding, required definition. These terms have acquired quite specific meanings within the group.”

“A pseudo code is a symbolism other than the instruction code of the computer for presenting the information defining a problem to the computers.”

Compilers prepare programs. They accept information in pseudo code, decode it, search for the appropriate subroutine, adjust the subroutine addresses to the position of the subroutine in the programs, select and insert the memory locations of the arguments and results, arrange control transfers, and write the finished program on tape.”

“The term “subprogramming” has been applied to the technique of requiring the computer to “unwind” iterative control loops and produce straight line programs for often repeated problems.”

‘A generator is a special type of compiler designed for data processing. If only a limited number of operations are to be performed upon each item of a large amount of data, the required program may be generated rather than pieced together from subroutines. The subroutines are reduced to “coded coding.”’

Designing For Users

” A low-cost computer probably means a low-cost installation which cannot afford a large programming staff. Such a computer, if designed with a very large, comparatively slow, internal storage (magnetic drum) to contain a compiler or interpreter and a library of subroutines, would require very little input and output and an extremely small instruction code. Compilers and subroutines could be programmed once and for all by expert programmers. … All problems would be entered in suitable pseudo codes, adaptable, flexible and suited to the particular user.”

Grace Has A Vision

It is well known that Grace Hopper greatly influenced COBOL, which was intended to be used by business people with no particular skill at computing. COBOL was designed in 1959 (6 years after this paper), yet we can see where language design was going with the comment at the end of the paper:

“It may be anticipated that simple English will be the best pseudo code for commercial problems.”

A Densely Packed Set Of Ideas

This paper covers so much of the transition from early computers to computers as a product, that it’s hard to include all of the important ideas contained in it. But I hope the above will give a flavor and suggest the scope of the paper, and motivate at least some of you to get and read the original. Perhaps the easiest way is to find a University library with an IEEE subscription that can provide access to this paper, and so many others from the foundation of our calling.