DEV Community

Cover image for CPU Instruction Cycle Simulator
Lorelei
Lorelei

Posted on

CPU Instruction Cycle Simulator

I am definitely more of a software than a hardware person, but it's always good to step out of your comfort zone.

This project was a portfolio assignment from the Computer Architecture course on Codecademy. The assignment required that I "research, design, and build a Python program that simulates the functionalities of a CPU." Which sounded quite simple, it's such a little piece of hardware, but as soon as I started really researching I discovered more of a mountain range than a mountain of information. I applaud you hardware people, I had no idea how complex the physical components of a computer were.

The assignment was very open-ended as to how and in what way the program simulated a CPU, but did come with two text files to use for testing, one containing data, and the other instructions. Using those files and my research as a guide, I decided to simulate the stages in the CPU instruction cycle:
-Fetch
-Decode
-Execute
-Memory Access
-Registry Write-Back

Was this my favorite project? No. Did it challenge me and give me a deeper understanding of the inner workings of this wonderful machine I type away at all day? Yes.

Good assignment Codecademy.

Top comments (0)