CPUs are Underrated (Mechanical Sympathy)

aboh Israel
2 min readJan 24, 2024

Was listening to Signals & Threads S3E3 with Andrew Hunter and he mentioned “mechanical sympathy”. This felt like an epiphany of what I’d been experiencing in the last few weeks.

Over the past few weeks, I’ve been exploring how CPUs work, this complex black box that forms the foundation of any computing device. How are complex programs broken down into 1's and 0’s, what’s the CPU actually doing ? Trying to scratch this intellectual itch has made me develop mechanical sympathy.

Mechanical Sympathy
Instructions can take more or fewer clock cycles to execute, thinking or knowing about this and trying to make the CPU execute instructions with fewer clock cycles is what I’d term as “Mechanical Sympathy”

You can think of mechanical sympathy while dealing with caches. Imagine computing the same thing over & over again when you don’t have to. I don’t want my CPU to go through extreme measures to compute what she has already computed and consume resources so I introduce a cache.

Over the next series of posts, I’d be exploring building a CPU with Logism(open source program that helps you make and simulate logic circuits) which is really visual. See how most of the components of a CPU work individually and collectively. And who knows, we might build an assembler on top of the minimal CPU we create.

See you soon :)

Cheers 🥂

--

--

aboh Israel

Software Engineer, Passionate about Technology and Artificial Intelligence