How a CPU works: Bare metal C on my RISC-V toy CPU
I always wanted to understand how a CPU works, how it transitions from one instruction to the next and makes a computer work. So I thought: let's implement one and run a C program on it.