Sunday, February 4, 2024

January 2024 Analytical Engine Project Report

Project Report to Computer Conservation Society Committee for meeting 18 January 2024

Work continues apace on defining which of Babbage’s Analytical Engine designs would be meaningful to build. Tim Robinson’s extensive description and analysis of Babbage’s range of designs provides the stimulus and knowledge-base for this process. Len Shustek and Tim have been digging deeper into the algorithms and mechanical design implementation of some of Babbage’s computational processes. Their experiences are both sobering and heartening. Heartening because these are the conversations we have been waiting to have. Sobering because of the complexity of what is involved in reverse engineering detailed intention and algorithmic principles from the mechanisms depicted in the drawings and their accompanying notations.  

Specifically, Tim and Len have been examining Plan 27 and Plan 28a, two advanced Babbage designs, for their viability as a build target. One outcome has been Tim’s written analyses of the levels of completeness of each of these Plans. A collateral prize has been a piece of bibliographical reconstruction to inform understanding of Plan 27. The Buxton papers held at the History of Science Museum, Oxford, contain material Babbage wrote in Florence in 1841 while he was working on Plan 27. The Buxton manuscripts are unsympathetically bound: folios are out of order, contain revisions, and material in the gutters of the spine is difficult to read. Tim has revisited the images of these manuscripts, and our transcriptions of them, to reconstruct the likeliest linear account from the patchwork quilt of the primary sources. He writes that ‘the result turns out to be one of the most coherent pieces he [Babbage] ever wrote on the Engine.’  

Devices Len and Tim have explored include the anticipating carriage mechanism, the method of division and the operation of the barrels used for ‘microprogramming’. The anticipating carriage was an early breakthrough for Babbage who wrote that the invention ‘produced an exhilaration of the spirits which not even [his host’s] excellent champagne could rival’. Len has been experimenting with algorithmic simulations, component-level simulations, and some 3D printing. These investigations deepen and extend understanding. They also agitate and inform an ongoing debate about trade-offs between manufacturing costs, historical fidelity and what is practically realisable in a foreseeable timescale.  

Reflecting on Babbage’s failure to complete any of his engines Babbage’s son wrote:

The History of Babbage's Calculating Machines is sufficient to damp the ardour of a dozen enthusiasts.

Major-General H. P Babbage, 12 September 1888.

I wonder if we can prove him wrong.

Doron Swade

15 comments:

  1. I wish to report that the ardour of at least this enthusiast remains undamped...so we only need another eleven and we're good to go!

    ReplyDelete
  2. Count me in! Eleven minus one equals ten, according to my organic analytical engine.

    ReplyDelete
    Replies
    1. Oh oh...if just two more people report undamped enthusiasm, the carry mechanism will be tested and THEN we'll probably need another 19 enthusiasts!

      Delete
    2. Thank you to Doron for an inspiring update.

      Fully undamped enthusiasm here.

      Delete
  3. Here, in fascinating and informative context, is the remark from Major-General H. P. Babbage which is cited above by Doron -

    https://www.fourmilab.ch/babbage/hpb.html

    ReplyDelete
    Replies
    1. That's an awesome read! Thanks for posting it. It's captivating to read things like the "Directive Card" and realize that he's talking about a memory address (in modern terms). What continues to surprise me though - is this idea of requiring 25 decimal digits of precision! I suppose that's reasonable on a machine without floating point arithmetic. One wonders how much simple/cheaper the machine had been with some kind of exponent wheel.

      Delete
  4. Any attempt at historical accuracy is doomed due to complexity
    An Analytical Engine could be built using 3D printed parts "in the style of Babbage" for data processing.
    The complexity mainly lies in the control systems. The controlling drums could activate push switches to send signals over a network of microcontrollers operating servos and steppers to make things happen.
    A machine to demonstrate Ada's famous program could be done with about 16 memory locations of 8 digits.

    See BabbageComputes.ca for my working model of a 3 digit memory store. (on the right under videos)

    ReplyDelete
  5. I don't think there is much doubt that a mechanical computer of some kind could be built using 3D printed parts - especially with modern knowledge of what is useful. I designed (but never built) a 100% mechanical computer based on the single-instruction-set "SUBLEQ" concept (check out Wikipedia's article "One-instruction set computer"). I didn't build it because to have any reasonable amount of mechanical memory - I'd need about $1,000 worth of Lego Technics parts. But adding servo motors and microcontrollers makes the whole exercise entirely pointless IMHO. Plan-9 isn't about "how do we make a mechanical computer?" - it's about asking the question: "If Babbage had completed the machine he planned - would it have worked?" - Doron has answered comprehensively for the Difference Engine...yes, it would have worked. But is still an open question for the Analytical Engine. The Difference Engine wasn't to be a true computer...which makes the Analytical Engine the TRUE point in question. Historical perfection is going to be tough because unlike the Difference engine, there are no complete, finalized design plans. If it's possible to build a version using 3D printed parts - then that would be enough to satisfy me - but if it's not substantially of Babbages' design - then it's a somewhat pointless exercise. Yes - we can make a mechanical computer with 3D printed parts...that's not even a question...we DEFINITELY could do that. But could Babbage have done it? **THAT** is the crucial matter here.

    ReplyDelete
  6. Can anyone direct me to detailed info about subtraction? Bromley is my main source but he is not clear. Seems either one needs an odd number of gears between the 2 accumulator columns or to run the figure wheel down to zero clockwise thus giving off the 10's complement. Thanks. [email protected]

    ReplyDelete
  7. I guess this comes down to how negative numbers are represented in the Analytical Engine. In binary, subtraction is easy because you can convert a positive number into a negative by flipping all of the bits and adding 1...and adding 1 is easy - using the otherwise unused carry-in input of the zeroth-bit of the adder. I'm pretty sure the Difference Engine can only cope with positive numbers - but 10's complement for negative numbers is easy.

    So crux of the question is probably: How did the engine convert numbers into their 10's complement equivalent?

    ReplyDelete
  8. Steve Baker’s comments are well taken but might miss some of the nuances of the question. I agree, it’s highly probable that an engine built now, or 200 years ago, from Babbage’s drawings would work. However, its almost certain that adjustments would be needed. Even Babbage could not produce the hundreds of drawings and expect the thousands of parts to fit first time. Even today with simulations some adjustments are usually necessary as assembly takes place. The question is to what extent should historical accuracy be followed.
    I read that Swade’s work at the Science Museum found one drawing back to front. Not unexpected and not, in my view, a failure. The construction of parts for the computing section needed many duplicates and so numerical controlled machinery was used. Even today, a 1979 vintage mill has mechanical positioning under 0.001”. The original Babbage parts that survived where measured to be withing 0.002” tolerance. The Museum had problems assembling. How difficult would it have been for Babbage with parts at this greater tolerance.
    No criticism is intended. Swade and many others have done an incredible job. It’s just that true historical authenticity can only be accomplished with original style machinery, hand craftmanship and metal made to original composition – including impurities.
    The idea of using switches on the barrels and solenoids for raising the pinions was first suggested by Steven Wolfram. Switches and solenoids were well known to Babbage’s collogues Faraday and Wheatstone.
    My model of 2 three-digit memory uses 4 stepper motors. 3 to move the data racks as I don’t have a card reader. The 4th replaces power taken from the steam engine. Servo motors are used to raise and lower the linkage pinions and relace cams and levers. And yes, logic is implemented in the Pico microcontrollers. I’m now starting to design the accumulator and carry mechanism. The objective is to:
    • Build the minimum engine that will demonstrate Ada’s famous program.
    • Use mechanical processes, in the style of Babbage’s design, for all movement and storage of data.
    • Implement all micro-programming through mechanical barrels.
    • Transfer instruction to move specific components by electrical wire from the barrels instead of linkage rods and gears.
    • Emulate the operation of rods and the geometry of cams through servo motors. The electronic microcontrollers will simply model the cam geometry – not engine logic.
    I’m not pretending any academic or historical expertise. I just want an engine that demonstrates Ada’a program for a modest cost and timeframe.
    I don’t want to get into a long discussion as to the merits and extent of historical accuracy, but I am looking for some help. Specific questions:
    1. Does subtraction use 10’s complement or different gearing. I have tentative designs for both approaches. Which should I use*?
    2. How many barrels are there? Is there a list describing their purpose?
    3. Division and logical compares. Don’t have a clue. This is not holding me back and likely won’t need details for several months.
    Is there any interest in setting up some ongoing cooperation? Possibly a Discord where questions and designs could be posted for review and comment. Sorry, this sounds rather one way. The Science Museum archive is, as Bromley says, “daunting.” Are there sources where these and other questions are already answered?
    I live in Toronto but will be in England April 9th till May 13th and am always available by email, phone or Zoom. Design is done in AutoCAD Fusion.

    *Note: Extracting 10’s complement from a figure wheel is simple by running the wheel down to zero in the reverse direction (through 9) thus giving off the complement. Trouble is extra gearing is needed to reverse direction, so the complement is added to the result. Much easier just add an extra gear to the linkage thus causing subtraction. I’m sure Babbage would have considered that but how do I find out?

    [email protected]

    ReplyDelete
  9. I guess it depends on your goals here. Is this about proving that Babbage's design would work? Is it about proving that machinery of the time would be capable of manufacturing the parts?

    Although switches and solonoids were "known" by a few experimenters at the time of Babbages' work. But as far as we can tell, Babbage didn't use any electrical parts at all - so adding them into the mix doesn't prove anything of Babbage's work - only that perhaps someone else of his era could have constructed an electromechanical computer using the bleeding-edge technology of the day.

    * We **know** that relay-based computers such as the Zuse Z3 can be built and do actually work...so this would not be new information. Babbage neither designed nor built one...so that's a dead-end.

    Knowing whether Babbage had in fact DESIGNED (but clearly had not BUILT) a functional computer is an important question. No end of people talk of Babbage as "The Father of Computers" - but we don't actually know whether he was or not - and it seems to me that this is an important question.

    So while your idea to build an electro-mechanical computer is a fun project - I don't see that it adds anything to our historical knowledge here.

    * We **know** that Babbages instruction set is useful - many people (including me) have written programs for it - and they are useful.

    https://www.fourmilab.ch/babbage/emulator.html

    * We **know** that the first (and probably only) program had a bug in it. We don't know if it was a programming error or a typo in the book publication chain. But it has been run on the fourmilab emulation of the Analytical Engine and with a simple sign change from the published code listing - it works as designed.

    * It's a romantic - but **unproven** - notion that Ada gets the title of "World's First Programmer". She might merely have been copying a program written by Babbage - the program might have been co-authored. We don't know - we will probably never know.

    * We **believe** that with modern fabrication - Babbages design would have worked - but that still has to be proven.

    * We **suspect** that it could not have been manufactured with the technology of the time - and that assembling it would have been a nightmare. We suspect this because the much simpler Difference Engine suffered those problems.

    ReplyDelete
  10. In response to John's comment:

    1. The result is held in complement form and has to be converted back to sign magnitude before being returned to the store. While Babbage did explore options to giver off in the reverse direction, especially in the late period, I do not think he ever figured out the details or used this method in practice. The safe and easy way is to introduce an extra stage in the gearing to reverse the direction for subtraction so there is no change to the giving off. In the case of the engines up to and including plan 27, this is most readily done using the stepping pinions, as there are two paths through there which differ in the number of gearings. See for example BAB/A/051 and the engravings of the BAB/M series which are reproduced in Babbage's Calculating Engines - in particular BAB/M/008, BAB/M/009.

    2. Babbage tried several schemes including a single large barrel or multiple smaller barrels depending on the particular version of the Engine. When using several barrels there are two options. In one case they can share a single reducing apparatus, in which case they are logically equivalent to one large barrel, but by being divided physically they can be placed closer to the specific mechanisms each is to control. However, much more powerful is to give each of them a separate reducing apparatus in which case they operate as independent but co-operating state machines. This is the option Babbage adopted for the pipelined addition/subtraction operation as analyzed by Bromley. The great Engine of Plan 13 would had at least 7 barrels, three for each half of the dual mill, and one for the printing interface. Plan 25 reduced the number because there was no longer a dual mill.

    3. Division is hard, and Babbage had a highly refined "non-restoring" algorithm in Plan 25 which delivered one digit per cycle, but it required complex dedicated hardware for the selectors. Logical compares are easy, but not particularly well defined by Babbage, so details need to be filled in.

    ReplyDelete
    Replies
    1. Thanks for the comments and links. This is turning out to be "interesting" and will keep be busy for a while!

      Delete
  11. From a modern perspective - what would help division a lot would be a "shift" mechanism - so you can do division by shift and subtract. But I'm guessing there wasn't a shift mechanism either. When you start thinking about this stuff it gives you a real sense of why binary is such a good choice!

    ReplyDelete