Richard's Journal

Running a little late this week on 15 Feb 2012 23:31

Unfortunately a certain romantic date got in the way of preparations this week. You will, however be glad to know that SWMBO had a great time.

I've not put up anything more on the history of computers yet, instead I've posted a little something on Binary Logic. I'll get back to the computer stuff soonish, but I wanted to lay some foundations a little wider than I have been. There's also a brief post on What is Binary? That links to some superb pedagogy from CS Unplugged. At long last, that's two subjects that actually have an impact on the syllabus. (I said I'd get there eventually ;-) )

In other news, the practical examples now get you up to running Python. SILIAC is in our sights.

A fun little project on 30 Jan 2012 11:09

"Would you like an exercise on programming something like ENIAC?" I asked.

Of course, the only thing like an ENIAC simulator out there is an ENIAC simulator. I'm sure it was possible to program ENIAC once you'd had a week or two's training. But at least the simulator manual gave me some idea of how it worked. Then with a couple of days musing about how to simplify it down I had a basic idea.

And so I spent a couple of really enjoyable hours last night building a simulator for something at least somewhat similar to ENIAC. One of those hours was building the basic program, the other was programming it to produce the Fibonacci sequence and adding features to the program that I needed.

I've called is SILIAC.

Tonight (if I have time) I'll be writing a front end for it, so the students don't have to write Python in order to write SILIAC wiring charts. So instead of writing:

acc1 = accumulator(m, "acc1")
acc1.when("fred", action("george", "add"))

The required instructions will be something more like:
ACCUMULATOR acc1
IN RESPONSE TO fred, acc1 DOES add AND SENDS george

Nobody said it was going to be easy :-)
In comparison, a similar instruction to the ENIAC operators would look something like:
On Accumulator 1:
    Channel α connects to data tray I          (Data is coming in on tray I and we connect it to input port α)
    Channel A connects to data tray II         (We send the result to data tray II)
    Operation Switch 4, to α, clear off        (This will be triggered by program input 4, and will use the number on input port α)
    Repetition switch 4, to 1                  (Only do it once)
    Program Input 4, connects to A-1           (Do it when we get a signal on A-1 ("fred"))
    Program Output 4, connects to A-2          (When we've done it send a signal on A-2 ("george"))

But it did take around two weeks to program it.

Educational points to be covered:

  • Installing and running Python (version 3)
  • Using the command-line
  • Writing programs in text files
  • The Edit-Compile-Execute cycle
  • Programming an ENIAC-type machine
  • Introduction to named variables and labels
  • Designing an algorithm and converting it to code
  • Debugging

The SILIAC is a simplified version of ENIAC.

  • I have not bothered to limit the number length to ten digits, or to allow it to be reduced. Numbers in SILIAC are Python integers.
  • A SILIAC program can use any number of any type of unit. ENIAC was limited to 30 accumulators, 1 multiplier, 1 divider, etc.
  • There is one signal bus capable of carrying an infinite number of different signals with arbitrary names, rather than a limited number of data and control buses with fixed labels.
  • A unit can have an unlimited number of different responses to signals, rather than a limited number of input and control ports.
  • An ENIAC accumulator only adds, but outputs both the result and its complement. A SILIAC accumulator only outputs the result, but can subtract.
  • The ENIAC multiplier and divider units were separate and worked by being connected to dedicated accumulator units. The SILIAC multiplier is an independent unit and it can divide.
  • ENIAC did conditional branching by placing data on the control bus. This is confusing. SILIAC does conditional branching by sending a different signal depending on the sign of the result. It's the same capability, just more logical.
  • SILIAC does not have the equivalent of ENIAC's repeated operations switches.
  • SILIAC does not have look-up tables
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License