From code to electrons

From code to electrons

Go on a journey & see what happens when our source code runs, right down to the electrons moving around the CPU.

Ultimately a book, but initially shared through my newsletter and blog.

About

Let's go on a journey & see what happens when our source code runs, right down to the electrons moving around the CPU.

As software developers, we miss out on the amazing things that happen inside the computer when we run our code.

From the parsing and compiling of the code, to the way the computer executes the code in a safe way, to how the CPU actually works to do the amazing things it does, right down to the electrons flowing around the silicon of the processor.

My aspiration is to produce an e-book, but initially I will be sharing sections through my newsletter and blog.

Sign up to my newsletter to join me on the journey and let’s explore all the way from our code to electrons.

Let's Go

Join my substack to follow along

The journey: outline

A rough outline of the journey we will be taking:

  • Introduction
    • Our journey
    • Preparing to launch
  • Running a chunk of Ruby code
    • Our Ruby code that launches our journey
    • The Ruby interpreter
  • Going deeper: from Ruby code to the interpreter
    • The Ruby parser & IR
    • The Ruby VM
  • From C to assembly to machine code
    • Levels of abstraction
    • Assembly language
    • Machine code
  • Data, memory & garbage collection
    • Memory organisation
    • Garbage collection
  • Our operating system
    • A high-level view & the 'kernel'
    • Processes and protection
  • The high-level architecture of a computer
    • RISC vs CISC
    • Dissecting a central processing unit
    • Making CPUs fast & more code translation
      • The CPU cache
      • The CPU pipeline
  • Diving into digital electronics
    • Logic gates and NAND
    • Calculating in the arithmetic logic unit (ALU)
    • Our ALU out of NAND
  • Entering a new plane: physics!
    • The world of electrons
    • Conductors and insulators
  • Semiconductors and the diode
    • Going deeper into the MOSFET: Our digital 'switch'
    • How to create a NAND gate out of MOSFETs
    • The ALU out of MOSFETs & simulation
  • Taking a step back to look at the big picture
  • Our return journey