The BX-4 is a 4-bit CPU built entirely from 74-series TTL logic chips. No arithmetic chips like the 74LS181, no programmable logic, just simple gates like AND, OR, and XOR wired together to make everything work.
Instructions are a fixed format with a 4-bit opcode and up to 3 operands each 4 bits wide. The CPU has 4 general purpose registers, R1 through R4, connected through a single shared bus, and supports 15 instructions covering register to register moves, immediate loads, addition, complement, compare, and jump.
The ALU handles addition and bitwise complement. There are no flags, no carry, no zero. At that point I did not really understand flag logic yet so it just was not part of the design.
The control unit is hardwired and the instruction decoder is a dedicated decoder chip that takes the opcode and drives the control signals for the rest of the CPU directly. Instructions take between 2 and 5 clock cycles depending on what they are doing.
The clock is a 555 timer running at a maximum of around 1 kHz. At that speed propagation delay through chains of TTL gates becomes a real problem, and a big chunk of the debugging time on BX-4.1 was spent tracking down racing signals caused by paths through the logic that took slightly different amounts of time to settle.
Program memory is simulated by an Arduino acting as both the ROM and the program counter. On each clock pulse it outputs the current instruction to the data bus. Jump instructions work by latching the 12-bit target address directly onto 12 of the Arduino's I/O pins, which the Arduino reads to update its internal counter.
The physical BX-4.1 uses somewhere between 20 and 30 TTL chips. The only output is 4 LEDs connected to one register. There is no external memory interface and no real output, partly because of the architecture and partly because at the time I did not really understand how to implement either of those things yet. The LEDs were enough to verify that the right values were ending up in the right place.
Video I made a few years ago.
Bohan Xu
Brandon Reinhart
kaimac
zaphod
Tim