Preamble

This summer I found Virtual Circuit Board - a drawing based digital logic simulator (available on Steam) that allows you to simulate everything from simple circuits to full scale computers. I found myself quickly putting time into it every day and ended up with a functioning 8-bit CPU that supports a handful opcodes, and allows very simple programs to be run.


Overview

Overall, this is what it looks like. Let's break it down.

overview

The Fetch-Decode-Execute Cycle

The engine of any instruction set is the fetch-decode-execute cycle. Tom Scott has an excellent video of this on Youtube. This is what allows a computer to execute instructions one after another; running programs from start to finish.

2-to-4 encoder

encoder

Multiplexer


ALU

D Flip-Flop