
Kiến trúc máy tính - Câu hỏi luyện tập
Computer architecture is the backbone of every modern computing system, from tiny embedded devices to massive data‑center servers. This course breaks down the essential ideas that appear in…

Bốn chức năng cơ bản của một hệ thống máy tính là gì?
Trong CPU, thành phần nào chịu trách nhiệm thực hiện các phép tính số học và logic?
Khái niệm 'Stored‑program concept' được áp dụng lần đầu trên máy IAS gắn liền với nhà nào?
Định luật Moore ban đầu dự đoán gì về số lượng transistor trên một chip?
Công thức tính Speedup theo Định luật Amdahl là gì?
Trong bộ nhớ Cache, thành phần nào dùng để so sánh nhằm xác định dữ liệu có trong dòng không?
Kỹ thuật ánh xạ trực tiếp (Direct Mapping) có ưu điểm gì nổi bật nhất?
Trong RAID 5, dữ liệu chẵn lẻ (parity) được lưu như thế nào?
Phương pháp Write‑Back trong Cache có ưu điểm gì so với Write‑Through?
Understanding Computer Architecture: Core Concepts and Fundamentals
Computer architecture is the backbone of every modern computing system, from tiny embedded devices to massive data‑center servers. This course breaks down the essential ideas that appear in typical quiz questions, providing clear explanations, real‑world examples, and SEO‑friendly terminology to help you master the subject.
1. What Is the Main Aspect of Computer Architecture?
The term Computer Architecture primarily refers to the functional blocks of hardware and the way they are interconnected. These blocks include the CPU, memory hierarchy, I/O subsystems, and the buses that link them together. While programmers often see only the instruction set or software‑visible attributes, architects focus on how the hardware components collaborate to execute programs efficiently.
- Functional blocks: ALU, control unit, registers, cache, main memory, and I/O controllers.
- Interconnection: System bus, point‑to‑point links, and network‑on‑chip (NoC) fabrics.
- Design goals: Performance, power consumption, cost, and scalability.
Understanding this definition helps you answer questions that ask which element is the "main aspect" of computer architecture.
2. The Four Basic Functions of a Computer System
Every computer, regardless of size, performs four fundamental operations:
- Data Processing – arithmetic and logical operations performed by the ALU.
- Data Storage – retaining information in registers, cache, main memory, or secondary storage.
- Data Transfer – moving data between components via buses, DMA engines, or interconnects.
- Control – sequencing instructions, managing resources, and handling interrupts.
These functions are often phrased as "Processing, Storage, Movement, and Control" in textbooks and exam questions.
3. The ALU: Arithmetic‑Logic Unit
Within the CPU, the Arithmetic‑Logic Unit (ALU) is the dedicated hardware that carries out all arithmetic (addition, subtraction, multiplication, etc.) and logical (AND, OR, NOT, XOR) operations. The ALU works closely with the register file, fetching operands, performing the operation, and writing the result back to a register or memory location.
Key points about the ALU:
- It is separate from the Control Unit, which orchestrates the sequence of operations.
- Modern CPUs may contain multiple ALUs (superscalar designs) to execute several instructions in parallel.
- Specialized ALUs exist for floating‑point arithmetic, vector processing, and cryptographic functions.
4. The Stored‑Program Concept and the IAS Machine
The stored‑program concept—the idea that instructions are stored in the same memory as data—was first realized in the IAS (Institute for Advanced Study) computer. This machine was designed under the direction of John von Neumann in the late 1940s. The von Neumann architecture introduced a single memory space for both instructions and data, simplifying program execution and paving the way for modern programmable computers.
5. Moore’s Law: Predicting Transistor Growth
Gordon Moore, co‑founder of Intel, observed in 1965 that the number of transistors on an integrated circuit roughly doubles every 18–24 months. This empirical rule, known as Moore’s Law, has driven semiconductor innovation for decades, influencing everything from processor performance to device miniaturization.
While the original statement focused on transistor count, its broader impact includes:
- Increasing computational power.
- Reducing cost per transistor.
- Enabling new form factors such as smartphones and wearables.
6. Amdahl’s Law and Speedup Calculation
Amdahl’s Law provides a formula to estimate the theoretical speedup of a system when a portion of the workload is parallelized. The classic expression is:
Speedup = 1 / [(1 − f) + f/N]
where:
- f is the fraction of the program that can be parallelized.
- N is the number of processing units (cores, threads, or processors).
- The term (1 − f) represents the serial portion that limits overall performance.
This equation highlights why adding more cores yields diminishing returns when the serial part dominates.
7. Cache Memory: Tag Comparison
In a cache hierarchy, each line (or block) stores a Tag that uniquely identifies the memory address of the data it holds. When the CPU issues a memory request, the cache controller compares the requested address’s tag with the stored tag to determine whether the data is present (a hit) or absent (a miss).
Other cache fields include:
- Offset – selects the specific byte or word within a cache line.
- Dirty Bit – indicates whether the line has been modified and needs to be written back to main memory.
8. Direct Mapping in Cache Design
Direct‑mapped cache is the simplest mapping scheme: each memory block maps to exactly one cache line. Its most notable advantage is hardware simplicity and low cost. Because the location is deterministic, the cache can quickly determine a hit or miss with minimal circuitry, making it ideal for low‑power embedded systems.
However, direct mapping can suffer from conflict misses when multiple frequently accessed addresses map to the same line. Designers often balance this drawback against the reduced complexity compared to set‑associative or fully associative caches.
9. Putting It All Together: A Mini‑Course Recap
To reinforce learning, review the key takeaways:
- Computer architecture focuses on hardware functional blocks and their interconnections.
- The four basic computer functions are processing, storage, movement, and control.
- The ALU executes arithmetic and logical operations, while the control unit directs the flow.
- John von Neumann’s IAS machine introduced the stored‑program concept.
- Moore’s Law predicts a doubling of transistor count roughly every 18–24 months.
- Amdahl’s Law quantifies speedup limits: Speedup = 1 / [(1‑f) + f/N].
- Cache tags are used for address comparison to detect hits.
- Direct‑mapped caches offer simple, low‑cost hardware with fast hit/miss detection.
By mastering these concepts, you’ll be well‑prepared for quizzes, interviews, and deeper study of computer systems and embedded architectures.
