Principles of 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, and how the various hardware components inside a computer system cooperate to execute programs.

By studying the principles of computer organization, you will understand why the CPU can execute programs, how memory stores data, how instructions run, and the entire process of a computer from power-on to running a program.

This tutorial uses numerous examples and diagrams to help readers build a complete knowledge system of computer fundamentals, laying a solid foundation for studying courses such as operating systems, compiler principles, databases, and computer networks.


What is Principles of Computer Organization?

The principles of computer organization mainly study the composition and structure of computer hardware systems and their working mechanisms. It lies between digital circuits and computer architecture, and is an important foundation for understanding the operating mechanisms of modern computers.

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 controllers.

  • 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 CPU, memory, and bus.
  • Understand key technologies such as instruction set, pipeline, interrupts, and Cache.
  • Lay the foundation for learning operating systems, compiler principles, and embedded development.

Who should read this tutorial?

This tutorial is suitable for students majoring in computer-related fields and developers who wish to gain a deep understanding of computer underlying principles.

  • Students majoring in computer science and technology.
  • Software Development Engineer
  • Learners preparing for postgraduate entrance exams, civil service exams, or computer level exams.
  • Developers who wish to gain a deeper understanding of the working mechanisms of CPU and memory.
  • Engineers engaged in 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 you better understand computer hardware systems.

  • Basic computer knowledge
  • C language or Python basics
  • Binary, decimal, and hexadecimal representation methods.
  • Basic digital logic fundamentals (just need to understand).
  • Be proficient in using computers for program development.

Computer system composition

A complete computer system usually consists of a hardware system and a software system. The hardware system mainly includes the following parts:

                 计算机系统
                     │
        ┌────────────┴────────────┐
        │                         │
    硬件系统                  软件系统
        │
 ┌──────┼──────────────┐
 │      │      │       │
CPU   存储器   输入设备  输出设备
 │
 ├── 运算器(ALU)
 ├── 控制器(CU)
 └── 寄存器(Register)


First example of composition principles

Below is a simple C program. It looks like only one line of code, but inside the computer it goes through multiple processes such as compilation, loading, instruction fetch, decoding, and execution.

Example

#include <stdio.h>

int main()
{
    printf("Hello World!\n");
    return 0;
}

During program execution, the process generally goes through the following steps:

  • The source code is compiled into machine instructions.
  • Program loading into memory
  • The CPU fetches instructions from memory (Fetch).
  • The controller decodes (Decode).
  • The arithmetic unit executes instructions (Execute).
  • The result is written back to a 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
  • Principles of Computer Organization (Tang Shuofei)
  • Intel® 64 and IA-32 Architectures Software Developer's Manual
  • ARM Architecture Reference Manual
other extensions