Breaking Abstractions: Computers

December 24, 2024

When I think of a personal computer, I typically have the following picture in my head:

computer architecture diagram
  • There is permanent storage (HDD [hard disk drive], SSD [solid state drive]) which stores the code (eg MacOS, Chrome) and data (eg bitcoin.pdf, llm.png)
  • Electrons flow into the circuit bringing the OS code into temporary storage (main memory)
  • The CPU executes code
    • code = bunch of instructions CPU understands, ie opcodes
    • fetchexecute cycle
    • fetch instruction, decode it, execute it, store the result
    • ALU = bunch of circuits manipulating electricity in a way that has meaning for us, eg adding two numbers
  • Monitors read the data from memory to decide which pixels to set to which colour
  • When you type on a keyboard or use a mouse, signals are sent to the OS program which decides what other programs to run or data to read/write
  • Everything is computed using an on and off electricity signal (ie electrons flowing or not)
  • Conceptually we represent one unit of digital information as 0 or 1, a "bit"
  • This machine is an information machine, computing with bits

Future abstractions to break

  • We write code using a high level language, how does that turn into opocodes? ie compilers
  • How does an electronic device exactly store a bit? ie how does permanent and temporary storage work? what exactly is a register?