How Computers Work
Jan 5, 2022
2 minute read

Let’s breakdown how a computer actually works when running and compiling a program. I want to learn all the levels of abstraction that are involved in running a single computer operation.

Similar to the OSI model concept for networking applications. What’s a similar thought model for the CPU?

Software Software Application
Programming Language
Machine Code
ISA (Instruction Set Architecture)
Hardware Digital Micro Architecture
Analog Devices (Transistors)

ISA (Instruction Set Architectures)

Is ISA the same as Assembly?

No, Assembly is a higher level abstraction on top of the ISA. The ISA defines what operations are avialable on the hardware. Assembly operations will be converted to compatible ISA operations for the given architecture.

Is there a compiler for mapping assembly to valid ISA instructions?

Yes, this is known as the assembler.

Machine Code/Microcode/Architecture

What’s the difference between machine code and microcode?

Fetch Decode Exec Write Cycle

Physical Transistor Switching

Transistors (specifically MOSFETS?) are wired together to create small circuits or gates. As an example you can create an AND gate and now that’s your next level of abstraction.


comments powered by Disqus