Hi Friends,
If you are a developer who wants to take your expertise to the next level, there are system design concepts you need to know.
But why does a software engineer need to understand computer architecture at all?
If you want to learn system design, scalability, reliability, and data flow, understanding the foundation of a machine will put everything else into perspective.
So, let’s dive in.
The Binary
-----------
Computers only understand binary, sequences of 0s and 1s. As developers, we do not write in binary, though; that is what high-level languages like JavaScript and Python are for. When your code runs, it gets compiled down into binary so the CPU can actually execute it.
Long Term Storage
-----------------
Computers also have long-term storage, either an HDD or SSD. SSDs are faster and more common in modern machines, while HDDs tend to offer more storage at a lower cost. Both are non-volatile, meaning they hold onto data even when the power is off. This is where your operating system, applications, and files live.
Short-Term Storage
-------------------
But why does RAM exist if we already have SSD storage? Speed. SSDs are fast, but RAM is significantly faster. When you open an application, your computer loads it from the SSD into RAM, so the CPU can access it quickly. RAM is volatile, though, meaning when the power goes off, everything in it disappears. It is your computer’s short-term working memory, not its long-term storage.
The Cache
----------
You may have heard of cache before, but here is what it actually is. Cache is a small but extremely fast type of memory that sits as physically close to the CPU as possible. Because the CPU operates so quickly, even RAM can become a bottleneck. Cache exists to keep the most frequently used data right at the CPU’s doorstep. When the CPU needs data, it checks L1, L2, then L3 cache first, then moves to RAM, and finally SSD if it has to.
The CPU
--------
The CPU executes the binary instructions that the compiler generated from your high-level code. To do this as efficiently as possible, it pulls data from cache first, then RAM, then storage as a last resort. The entire hierarchy we just walked through exists because the CPU operates so fast that every layer of memory is designed around keeping up with it. This is the foundation of computer architecture, and everything we cover in this series builds on top of it.
Connecting It Together
-----------------------
The motherboard connects all of these components together, allowing power and data to flow between them. Without it, none of these parts can communicate.
See, you now know the computer architecture behind system design on a higher level. This is your foundation, and I will be building on it in the weeks to come. Being an engineer is more than just writing code; mastery of the full stack of knowledge is what separates good from great.
Did you feel unsure about this topic at first? Let me know in the comments.
Let’s Build It Beautifully,
Fab