| THE MILL: Basic Parts : The basic parts in the mill that were to be used in most of the action are called Ingress Axis 1, Ingress Axis 2, and the Egress Axis. An axis is simply a column that represents a 50 digit number, just as are found in the store. The engine could only perform arithmetic on two numbers at a time. The Ingress Axis 1 would store the first value, the Ingress Axis 2 would store the second, and the Egress Axis would store the result from the desired operation. So, if we wanted to perform the equation 15+17, we would first set up the machine for addition (as will be explained later), load 15 onto Ingress Axis 1, load 17 on Ingress Axis 2, and the result would appear on the Egress Axis. Primed Axes : On top of these axes, both Ingress Axis 1 and the Egress Axis had an additional primed axis. Ingress Axis 1's Primed Axis was used because Babbage wanted to make it possible for the machine to compute the quotient of a 100 digit number divided by a 50 digit number. The result of such an equation is still a 50 digit number. The first 50 digits of the 100 digit number would be stored on the normal Ingress Axis 1, and the second 50 digits would be stored on the Primed Axis of Ingress Axis 1. The Primed Axis of the Egress Axis makes it possible to store remainders of division. If the machine were told to calculate 20 / 7, it would not give 2.85714. It would give 2 as the answer on the Egress Axis' Primed Axis, and leave 6 as the remainder on the Egress Axis. Run-Up Lever : The Run-Up Lever is important for evaluating booleans and loops. The lever switches from its normal down position into its up position in either of the following two cases :
Basic Diagram of parts :
PROGRAMMING CARDS *The cards used to program the engine were based upon those by 18th century French inventor, Jacques Jacquard. 3 different kinds of cards :
*Each card was to have its own kind of reader, but Babbage never fully decided as to how he was going to integrate the separate readers. EXAMPLE PROGRAMS AND HOW THEY WORK Brief Lexicon : This code is modeled off of the code examples found at www.fourmilab.ch/babbage, where the author has constructed a wonderful JAVA emulator of the difference machine. L001 : (Variable Card) The L means that the value at the following memory address, (001 in this case), should be loaded onto either Ingress Axis 1, or Ingress Axis 2, depending on which is available. Once Ingress Axis 2 is filled, the calculation specified is begun automatically. S002: (Variable Card) The S commands the engine to save the current value on the Egress Axis at the specified memory location in the store. S002': (Variable Card) The apostrophe transfers the value on the Primed Egress Axis onto the the specified location in the store. P : Special Operation Card to print the result on the Egress Axis. H: Halt the engine. CF?5 : The C means this is a combinatorial card. The F tells the card reader whether to move forward or backward if the run up lever has been set. The ? checks to see if the run up lever has been set, and the 5 tells the card reader how far to go in the case that the lever is up. CB?5 : This is the same as above, but this will go backwards if the run up lever has been set.
N000 4 N002 1 x L002 L000 S002 - L000 L001 S000 x L002 L000 S002 - L000 L001 S000 (etc on down until 4 x 3 x 2 x 1 has been calculated. It should be seen how the code repeats.) b) With loop, compute n! In this case, n = 4. N000 4 N001 1 N002 1 x L001 L000 S001 - L000 L002 S000 L002 L000 // of n, when subtracted from 1, results in a negative // number. So, in the case of 4!, 1-4 will set the lever, // 1-3 will set the lever, 1-2 will set the lever, and 1-1 // will not set the lever. So, 4 x 3 x 2 x 1 will be // calculated. B H 3) Evaluating booleans. Perform the following line of C code : " if (x > 0) " letting x be 10 for this example. N000 10 N001 0 + L001 L000 CF?2 P H B H CURVE DRAWING APPARATUS *Babbage conceived that the machine could have a curve drawing apparatus, to plot the points of functions it computed. The apparatus was never submitted in any sort of final form, though occasional notes refer to the possibility of it. |