DEV Community

Brandon(Zoobob5)
Brandon(Zoobob5)

Posted on

CPU SIMULATOR

I was given the task of making a program or code of sorts that mimics how a CPU would work. I was really confusing to start it off with because it was a fairly short topic but I think it worked out okay and was a lot more simple than i thought. I put it in my GitHub below.

examples of then outputs and there many of them:
Image description

ADD: $r3 = $r1 + $r2 -> 15
Program Counter (PC): 3
Registers:
$r0: 0
$r1: 5
$r2: 10
$r3: 15
$r4: 15
$r5: 10

https://github.com/Zoobob5/CPU-Simulator

Top comments (4)

Collapse
 
fjspitz profile image
Fernando J. Spitz •

Nice done! Remembered my days in college on Computer Architecture first lessons.

Collapse
 
zoobob5 profile image
Brandon(Zoobob5) •

It was a lot to read through but very insightful.

Collapse
 
zoobob5 profile image
Brandon(Zoobob5) •

Let me know what you think.

Collapse
 
martinbaun profile image
Martin Baun •

Good job! Reminds me of my first simulator.