4129

I'd like to make a device that demonstrates in the simplest way possible how a computer works. It should be of interest to elektorists (both present and aspiring), and people interested in general and technological culture. I'm getting too old to do this myself!

The Simplest Possible Computer

This project proposal was inspired by two questions:

  • A perspicacious 12-year-old asked why you need a computer running an IDE to program an Arduino.

  • A schoolteacher, while installing Linux on some old Windows PCs, asked how could we explain to pupils not particularly interested in the technology what’s the difference between a computer and an operating system. In other words: what constitutes a computer.

My way of beginning to answer these questions would be to make a device that’s optimised to demonstrate in the simplest possible way how a stored program does arithmetic and logic, and makes decisions. The earliest computers were already too complicated for that. 

The computer would have to be emulated using a microcontroler, perhaps an Arduino because nearly everyone likely to be interested will have one. As I imagine it, the only additional hardware would be an array of LEDs, one for each memory bit. The bits at a certain number of addresses would be provided with a button or touch-switch, allowing the user to input machine code and data directly, while allowing the ALU to change the state. There would be rows of LEDs to display the accumulator (if there is one) and any other registers. The LEDs of the opcode being executed could be highlighted. The clock might be a pushbutton.

It may be instructive to allow the user to define the start address, perhaps with dipswitches, in order to introduce the notion that a computer starts by “assuming” that the content at that address is an opcode.

Some early machines (PDP8…) and “retro-computers” used a row of toggle switches or a keypad to input the bootstrap and patches, but only one memory location could be displayed.

That’s all I’m qualified to contribute to the idea, apart from a few points for discussion:

  • No architecture can be described as the unique precursor of subsequent developments. There’s a free choice, and the same applies to the instruction set.

  • Word length: 4 bits, though sufficient for the Intel 4004, are probably not enough here. Eight bits are too many for easy reading. I’d propose 6 bits, which line up with quaternary and octal; at this stage we don’t need to be hooked on hex, and juggling with several number systems may be instructive. I guess 64 addresses would be enough for some interesting code.

  • How can we present opcode, operand and address together but without confusing the user with long words (or 2 - 3 words at the same address displayed with gaps between them)? The long words could be provided only at memory locations intended for opcodes, but then we would lose the simplicity of having all memory locations identical and unallocated. Otherwise, opcode, operand and target address might be placed at consecutive addresses, but then we’d need more addresses, and program flow would be less visible.

  • While the basic device could have no input or output ports, users from Arduinoland with its ecosystem of I/O modules would not be happy with that. Perhaps the I/O ports could be addressed on a separate (4-bit?) bus, though it may be simpler to use a couple of memory locations. For teaching purposes the interfaces would best be properly multiplexed / demultiplexed and not implemented by setting individual bits; these logic operations are among the easiest ones for a beginner to follow.

Boolean logic

Linked to this project would be one that provides means of playing around with boolean logic. Presently, only students of digital electronics learn how the binary numbering system connects arithmetic with the three fundamental logic operations, which in turn can be mapped to simple physical devices. It’s easy enough to set up demonstrations using CMOS DIL components of the 4000 series. Unfortunately, wiring them up using the usual kind of inexpensive breadboards is distractingly messy for beginners, even if you were to mount individual gates on modules, with input and output on opposite sides. I’m looking for a neater yet inexpensive solution that retains the direct contact with electronic components.