How Computers Work
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?
|ISA (Instruction Set Architecture)|
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.
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.
- No Starch - Introduction to Computer Organization - (2022) https://learning.oreilly.com/library/view/introduction-to-computer/9781098130183/
- Youtube: Intel: Architecture All Access Series: https://www.youtube.com/watch?v=vgPFzblBh7w This is an EXCELLENT 2 part series that explains the abstraction levels in a CPU.
- How Computers Work - Sebastian Lague - https://www.youtube.com/playlist?list=PLFt_AvWsXl0dPhqVsKt1Ni_46ARyiCGSq
- From Transistors to Functions - https://www.cs.bu.edu/~best/courses/modules/Transistors2Gates/