The First Computer Program

Raúl Rojas
2023-03-24
Abstract:In 1837, the first computer program in history was sketched by the renowned mathematician and inventor Charles Babbage. It was a program for the Analytical Engine. The program consists of a sequence of arithmetical operations and the necessary variable addresses (memory locations) of the arguments and the result, displayed in tabular fashion, like a program trace. The program computes the solutions for a system of two linear equations in two unknowns.
General Literature
What problem does this paper attempt to address?
This paper mainly discusses the first computer program designed by Charles Babbage in 1837, which aimed to solve a system of linear equations with two unknowns. In that era, computers had not yet been built, only the concept of the Analytical Engine. The paper provides a detailed description of the architecture of the Analytical Engine, including the processor (referred to as the "mill") and separate memory (referred to as the "store"), and notes that the program was encoded using punched cards rather than stored in memory. Babbage wrote 26 programming examples, and currently these archives have been digitally archived. The paper focuses on the first program, numbered "BAB L1", which is used to compute the solutions of two linear equations. The program is implemented through a series of arithmetic operations and variable addresses, involving addition, subtraction, multiplication, and division. During the computation, Babbage employed variable reusing and sometimes needed to restore variables, which was later simplified in subsequent programs. The paper also mentions a second code table used to compute the value of y once the value of x is found. Here, Babbage explicitly states the need to refresh the values of coefficients a, b, and c, and stores their complements in auxiliary variables. Finally, the program computes the value of y in 13 steps. In summary, this paper primarily addresses the problem of solving a system of linear equations using Babbage's Analytical Engine concept and punched card programs in the absence of modern computers. It demonstrates the fundamental ideas and methods of early computer program design.