Table of Contents

History

I've wanted to build my own educational computer since the late 1980's when the old departmental Strowger relay based telephone system was thrown out. I asked my PhD professor if I could take it out of the skip, he very sensibly said “no” quite firmly.

Since then I've thought about many designs: some have been relay based, some transistor; some have included memory and other have been CPU only. Notably:

2012 Minimal Computer - a 4th year project proposal

The aim of this project is to build a minimal computer with as much as possible of the processing visible so that people can see how computers work. It will be constructed either out of relays or transistors and use LEDs to show the state. The switch count is to be minimised so that it can be easily understood by school children and so that it is affordable to reproduce. The clock rate should be low enough so that it can be seen how the next state arises from the current state and so it can be seen how operations such as addition and memory access work, as well as constructs such as registers and program counters. Efficiency is not a major issue although the aim is that it will run small programs in a few minutes which may involve an adjustable clock rate.

The provisional design is to have a four bit instruction set and a twelve bit address space accessing four bit words. Perhaps one quarter will be RAM or 4096 bits and so the memory design will be critical. Current thoughts are to use a square grid of capacitors indexed by two address decoders or core memory. Core memory would be preferable as the memory contents are visible. The lower bank of memory may be defined by DIP switches to store boot code and commonly used subroutines.

The project requires a wide range of skills:

Ideally the project would not use silicon for the switches but use relays which would demonstrate that it would have been possible to build a computer in the late 19th century. This limits the memory capacity and design, electrolytic capacitors and micro-relays.

If time permits then some I/O will be added. Ideally the machine could be loaded remotely and the operation tracked with a webcam.

Interested students should look at:

The plan is that the final machine would be demonstrated in local schools before being donated to The National Museum of Computing at Bletchley Park.

The budget for this project is £400 donated by Cantab Research.

2017 16bit with stack instructions and a Raspberry Pi

In 2017 I started the parent of this design on hackaday.io. I planned on a 16 bit processor: instructions, memory, busses, everything was 16 bits wide. There was five conventional registers, a program counter and two constants addressing 64k words of RAM. I expected to build it in discrete components using less than 1,000 transistors running at maybe 50kHz, so everything was very tight. Instructions were one of only three forms:

Form Example
ALU A = B + C
READ A = *B, B +-= C
WRITE *A = B, A +-= C

A Forth like language was implemented and about four thousand lines of code was written, including floating point operations and random numbers. The code, compiler and emulator is on github. The idea was to use a Raspberry Pi for external memory and to sanity check the computations. In the end this ran out of steam because:

2019 Dippy

Even with only five registers the design of each memory cell is critical because the majority of the transistors (and other components) are taken by the memory cells. This led me down a long random search of weird memory cells and dippy which used DIP switches for ROM/program memory. In the end this ran out of steam because DIP switches didn't make cost efficient storage.

2021 Very long instruction word

If the program memory was a tape loop, like printed A4 pages taped up into a loop, then there's enough width in A4 paper to have a very long instruction word (and labels) so that it doesn't require much decoding. Given 32 words of RAM it may look a bit like Colossus.

There is an emulation with some example code in Google sheets

All instructions really are if(cond) Mi = Mj OP Mk, however the assembly language can be more more flexible and compile in constants, writing to high bit addresses and the like. We can split the generic instruction into the left hand side, Mi = and the right hand side, Mj OP Mk

human readable machine readable comment
Ri = Ri = the general case for 0 <= i < 32
JUMP R32 = writing to M32 is trapped and a JUMP is made to the RHS
OUT R48 = output the RHS
*R01 R56 = output the RHS to the 16 bits in (R0,R1)
FREQ R62 = set the system clock frequency
CPU R63 = other CPU behaviour (e.g. set flags)
HCF R63 = every homebrew computer needs this instruction!
human readable machine readable comment
Rj OP Rk Rj OP Rk the general case for all OPs except LSL
Rj » 1 Rj »1 Rk k is ignored in the case of LSL
Rj Rj | M32 OR with zero (M32) results in only Rj
Rj OP c Rj OP Rk c is a constant in the set (0, 1, … 16, 32, 64 … 240), k selects
Rj OP c Rj OP Rk c is a constant in the set (0, 1, … 16, 32, 64 … 240), k selects
c OP Rk Rj OP Rk c is a constant in the set (0, 1, … 16, 32, 64 … 240), j selects
k Rj & Rk any 8 bit number, j is from (0, 16,…240), k from (0,1,..15)
IN wait for input from toggle switch
*M01 input from address (M0, M1)

'cond' is probably the standard 3bits/8 values: Always, Never, =0, !=0, >0, >=0, 0⇐, <0. However, look at the 6502 flags, Carry, Overflow, Negative and look at what values of 'cond' were used in 'third' code.