{
  "id": 11475454,
  "title": "Why I Built This",
  "url": "https://urgent.news/2026/10/02/why-i-built-this",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-02T16:00:15.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ikaroshunt/why-i-built-this-68p"
  },
  "original_language": "en",
  "account": "I built a CPU from scratch using Python for a computer architecture project. Before diving into the project, I realized that I had been using computers for years without truly understanding how they functioned. The challenge was to research, design, and build a Python program that would simulate the functionalities of a CPU. So, I decided to take a hands-on approach and build it myself.\n\nThe project involved simulating the functionalities of a CPU by breaking it down into three classes that mimic real hardware: MemoryBus, Cache, and CPU. The MemoryBus represented the RAM, which had 256 addressable locations and could load initial values from a CSV file. The Cache was a simple direct-mapped cache with 8 blocks and a write-through policy, which tracked hits and misses. The CPU, the brain of the simulator, had 8 registers (R0-R7) and implemented a program counter (PC) to track the next instruction. It also had a fetch-decode-execute loop that performed the necessary steps to process instructions.\n\nThroughout the project, I encountered various challenges, such as import errors, case-sensitivity issues with Git, and missing input files. However, each of these challenges taught me something valuable about real-world development, such as the importance of file structure, case sensitivity, and the strict nature of Git. By the end of the project, I had a deeper understanding of why cache exists (the CPU is fast, and memory is slow), why R0 is always 0, and how a simple ADD instruction travels through fetch, decode, execute, and writeback stages.\n\nAfter completing the project, I completed the Codecademy Computer Science Career Path (CS104: Computer Architecture) and gained a newfound appreciation for the inner workings of computers. I highly recommend this project for anyone taking CS104, as it provides an invaluable learning experience that goes beyond just reading about concepts.",
  "summary": "I Built a CPU From Scratch in Python — And Finally Understood How Computers Think When I started CS104: Computer Architecture on Codecademy, I realized I had been using computers for years without actually understanding what happens inside. We type print(\"hello\") and it works — but how? The portfolio project challenge was: \"Research, design, and build a Python program that simulates the…",
  "key_points": [
    "Built CPU simulator using Python for computer architecture project",
    "Simulated MemoryBus, Cache, and CPU with 8 registers and program counter",
    "Learned about cache importance, R0 initialization, and instruction processing"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}