The Analytical Engine was to have a startling resemblance to modern computers. Charles Babbage managed to divine a number of features for his Engine that today we take for granted when programming. Here’s a list of some of the cards that could be used in programming the Engine, some of which should be startlingly familiar to a programmer:

  • Number cards — assign a constant to a location in the Store (memory)
  • Variable cards — move data between the Mill (processor) and Store; these came in three flavors:
    • Transfer a number from the Store to the Mill
    • Transfer a number from the Store to the Mill, but zero that location in the Store afterwards
    • Transfer the contents of the last operation in the Mill to a location in the Store
  • Operation cards — perform the specified operation on the specified data. The base operations were addition, subtraction, multiplication, and division, although extraction of roots was to be standard, and previously-programmed algorithms could be reused if the cards were handy
  • Decimal expansion cards — recast a number with a different precision (each of the 1000 numbers in the Store could have up to 50 digits)
  • Stepping up/stepping down cards — multiply or divide a number by 10, which is pretty easy in base 10
  • Combinatorial cards — repeat steps:
    • Move backwards by several cards
    • Move forwards by several cards
    • Always perform the specified movement
    • Perform the specified movement if (essentially) the program has not reached a specified number of cycles
  • Advancement cards — perform one set of instructions if a statement is true, and another if it is false
  • Inclusion request cards — specify a previously-programmed algorithm that should be imported into the program and used later
  • Bell card — ring a bell on the Engine in order to to alert the operator
  • Halt card — halt execution of the program. Used in conjunction with the advancement cards, this could be programmed to occur if (for example) one tried to divide by zero
  • Trace cards — begin or end tracing, which is to say, have the operator crank through the program manually, noting the results of each individual calculation
  • Comment cards — these are skipped during program execution, but can contain, of course, comments on the algorithm
  • Plotter control cards — these controlled the built-in grapher for the Engine:
    • Change X-coordinate of the pen to the result currently in the Mill
    • Change Y-coordinate of the pen to the result currently in the Mill
    • Raise the pen
    • Lower the pen
  • Printer control cards — these controlled the built-in printer for the Engine:
    • Print the contents of the Mill
    • Print a comment
    • Print a number to a specified precision
    • Print a number with a specified formatting (e.g., periods and commas)

As you can plainly see, Babbage was a visionary. The above list contains loops, shifts, program tracing, commenting, include statements, system alerts, and other programming tools we see in modern development programs. Many of the cards in the list above were not the direct inspiration for their modern-day equivalents — we are left to wonder what the world would be like if Babbage had actually completed his Engine 150 years ago.


Source: http://www.fourmilab.ch/

Node Your Homework