Computer Organization
Computer Organization is one of the core courses in the computer science and technology major.
Computer organization mainly studies the composition, working principles of the various hardware components inside a computer system, and how they cooperate to complete program execution.
By studying computer organization, you will understand why the CPU can execute programs, how memory stores data, how instructions run, and the whole process of a computer from power-on to running a program.
This tutorial uses many examples and diagrams to help readers build a complete knowledge system of the computer's underlying layers, laying a solid foundation for studying operating systems, compiler principles, databases, computer networks, and other courses.
What is computer organization?
Computer organization mainly studies the compositional structure and working mechanisms of computer hardware systems; it sits between digital circuits and computer architecture, and is an important foundation for understanding how modern computers run.
It focuses on how the various components of a computer work together, including core components such as the central processing unit (CPU), memory, input/output devices, buses, and control units.
- Understand the internal hardware structure of a computer
- Master the execution process of programs in a computer
- Learn the working principles of core components such as the CPU, memory, and buses
- Understand key technologies such as the instruction set, pipelines, interrupts, and Cache
- Lay the foundation for studying operating systems, compiler principles, and embedded development
Who should read this tutorial?
This tutorial is suitable for students in computer-related majors and developers who want to deeply understand the underlying principles of computers.
- Computer science and technology students
- Software development engineers
- Learners preparing for postgraduate entrance exams, civil service exams, or computer rank examinations
- Developers who want to deeply understand how the CPU and memory work
- Engineers working on operating systems, compilers, and embedded development
What you need to know before studying this tutorial
Before studying this tutorial, it is recommended to have some basic computer knowledge, which will help in better understanding computer hardware systems.
- Basic computer knowledge
- Basics of C language or Python
- Binary, decimal, and hexadecimal representation
- Simple digital logic basics (a basic understanding is enough)
- Being able to skillfully use a computer for program development
Composition of a computer system
A complete computer system usually consists of a hardware system and a software system, where the hardware system mainly includes the following parts:
计算机系统
│
┌────────────┴────────────┐
│ │
硬件系统 软件系统
│
┌──────┼──────────────┐
│ │ │ │
CPU 存储器 输入设备 输出设备
│
├── 运算器(ALU)
├── 控制器(CU)
└── 寄存器(Register)

A first example of computer organization
Below is a simple C program; it looks like only one line of code, but inside the computer it goes through many processes such as compilation, loading, fetch, decode, and execute.
Example
#include
int
main
(
)
{
printf
(
"Hello World!\n"
)
;
return
0
;
}
During program execution, it roughly goes through the following steps:
- Source code compiled into machine instructions
- Program loaded into memory
- CPU fetches instruction from memory (Fetch)
- Control unit decodes (Decode)
- Arithmetic unit executes the instruction (Execute)
- Result written back to register or memory (Write Back)
Reference Documentation
- "Computer Organization and Design" David A. Patterson, John L. Hennessy
- "Computer Systems: A Programmer's Perspective (CSAPP)" Randal E. Bryant, David R. O'Hallaron
- "Computer Organization (Tang Shuofei)"
- Intel® 64 and IA-32 Architectures Software Developer's Manual
- ARM Architecture Reference Manual