Projects · Tools & libraries

Von Neumann Machine Simulator

Active 2026 Co-author (with Krisunio)

A teaching simulator for a simple Von Neumann machine, with a native GUI showing the CPU, registers, memory, data bus and console while programs step through.

A two-person Rust project that makes the fetch–decode–execute cycle visible. Programs are 16-bit words (opcode in the high byte, operand in the low byte), and the GUI shows the accumulator, program counter, instruction register, MAR and MBR changing as each instruction runs.

  • Views for the CPU, registers, memory, console, data bus and the instruction set.
  • Sixteen instructions: LOAD, STORE and arithmetic, jumps, input and output, plus INC, DEC, NULL and TST (skip the next instruction when a memory cell is zero).
  • The instruction set is data, loaded and saved as JSON, so exercises can change it. Programs are saved and loaded as JSON too.
  • Run at 1 to 10,000 instructions per second, or step through one instruction at a time.
  • A data bus between memory and the CPU, with buttons to move a value across it by hand.
  • A debug console (a build feature) for setting memory, the accumulator and the program counter directly.
  • Arithmetic saturates instead of overflowing (values stay between 0 and 19,999), and division by zero halts the machine with an error in the console, the way a student would expect.