THE MILL:
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.
- The sign on the result of the equation is different then the sign on the first number in the equation, on Ingress Axis 1. Thus, if you do the equation 4 – 9, the run up lever will be set because the result (-5) has a different sign then Ingress Axis 1 (the number 4.)
- The resulting answer is greater than 50 digits long. If you try and divide a 100 digit number by a 2 digit number, the run up lever will be set.
*The cards used to program the engine were based upon
those by 18
- Operation Cards –
- Basic Operation Cards : used to set up the mill to perform the specified arithmetic operation (+, -, x, %).
- Combinatorial Cards + Index Cards : used to perform loops and jumps in the program.
- Special Cards : used to halt the engine, ring a bell, or give comments to the engine operator.
- Number Cards –
- used to put numerical values in the store
at the specified wheel number. Each card
can represent a number from -9.999x10
^{49}to 9.999x10^{49}. - Variable Cards –
- Normal Variable Cards - used to transfer values from the Store to the Mill, or from the Mill to the store. The machine can either erase the number as it transfers it, or leave it intact to use again.
- Special Variable Cards – in case the Store is full, or the mill needs a special variable, special variable cards can be used to either punch a result on a card, or read in a variable from a card instead of the store.
- Operation Cards – require only 4 holes to represent +, -, /, x. Combinatorial cards will be shown later.
- Number Cards – require 50 columns of 10 possible punches, to represent a 50 digit numeral, plus one column to express whether the number is positive or negative. Three more columns of 10 possible punches are necessary to express the address in the store at which the number should be placed.
- Variable Cards - One column of 5 possible punches, representing whether a number should be read from the store, read from the store and erased in the process, read from the mill and put in the store, read from the card reader, or punched onto the card reader. Three more columns of 10 possible punches would be needed to express the destination if a number is being put in the store.
*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.
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. **Simple Computation**- Compute 500 / 30- N001 +500 // Puts 500 into memory
address 001 in the store
N002 +30 // Puts 28 into memory address 002 in the store / // Sets the machine to divide L001 // Loads the number at 001 in the store on Ingress Axis 1 L002 // Loads the number at 002 in the store on Ingress Axis 2 // operation is commenced once Ingress Axis 2 is set P // Prints the current value on the Egress Axis S003' // Stores the primary result on the Primed Egress Axis // at address 003 in the store. S004 // Stores the remainder from the division at memory // address 004 in the store. B // Rings a bell to tell operator that it is finished H // Halts the engine. **Introducing Loops**– Compute 4!
a) Without Loop :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.)
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
" if (x > 0) " letting x be 10 for this example. N000 10 N001 0 + L001 L000 CF?2 P H B H
*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. |