
Kiến thức cơ bản về máy tính
Welcome to this comprehensive course on the fundamentals of computers. Designed for beginners in computer science and programming, this module covers the essential concepts that form the…

Ví dụ nổi bật của máy tính thế hệ đầu tiên là?
Thế hệ máy tính nào bắt đầu sử dụng hệ điều hành?
Khi tăng số lượng transistor, hiệu năng vi xử lý sẽ:
Trong kiến trúc Harvard, khi lệnh được lấy từ bộ nhớ chương trình, dữ liệu được lấy từ:
Khi số lượng transistor giảm, kích thước transistor sẽ:
Trong hệ thống bù 2 8-bit, số -128 được biểu diễn bằng:
Khi cộng hai số nhị phân 1010101 và 1101011, kết quả là:
Trong thuật toán Booth, nếu các bit Q0 và Q‑1 là 01, bước tiếp theo là:
Trong mạch NAND, hàm logic tương ứng là:
Basic Computer Knowledge
Welcome to this comprehensive course on the fundamentals of computers. Designed for beginners in computer science and programming, this module covers the essential concepts that form the backbone of modern computing. By the end of the lesson you will understand what an electronic computer is, the history of early generations, the role of operating systems, transistor scaling, Harvard architecture, binary arithmetic, and two's‑complement representation.
1. What Is an Electronic Computer?
An electronic computer is a device that stores and processes information. It receives data, retains it in memory, and performs calculations or logical operations on that data to produce useful results. In simple terms, a computer is a combination of storage + processing.
- Storage: Memory components such as RAM, ROM, and secondary storage keep data safe until it is needed.
- Processing: The central processing unit (CPU) executes instructions, performing arithmetic, logical, and control operations.
Remember the key phrase: "lưu + xử lý = máy tính" (store + process = computer).
2. First‑Generation Computers
The first generation of computers (late 1940s – early 1950s) used vacuum tubes and were massive, power‑hungry machines. The most iconic example is the ENIAC (Electronic Numerical Integrator and Calculator). ENIAC was the first large‑scale electronic computer that could be programmed to solve a variety of numerical problems.
- Built in 1945, ENIAC occupied a whole room and contained about 18,000 vacuum tubes.
- It performed up to 5,000 additions per second – a remarkable speed for its era.
- ENIAC’s success paved the way for subsequent generations that moved from vacuum tubes to transistors and integrated circuits.
Mnemonic tip: ENIAC = “Electronic Numerical Integrator and Calculator”.
3. The Advent of Operating Systems – Third Generation
Computers of the third generation (mid‑1960s to early 1970s) introduced the operating system (OS). Unlike earlier machines that ran a single program at a time, third‑generation computers could manage multiple tasks, handle I/O devices, and provide a user interface.
- Operating systems abstract hardware details, allowing programmers to write portable code.
- Examples include early versions of UNIX and IBM’s OS/360.
- The OS also introduced concepts such as multitasking, file systems, and security controls.
Remember: 3 = OS bắt đầu (generation 3 marks the start of operating systems).
4. Transistor Scaling and Processor Performance
Transistors are the fundamental switching elements inside a CPU. When the number of transistors on a chip increases, the processor’s performance generally increases. More transistors mean more parallel execution units, larger caches, and richer instruction sets.
- Moore’s Law historically observed that transistor counts double roughly every 18‑24 months.
- Each additional transistor can be thought of as an extra worker on an assembly line, speeding up production.
- However, beyond a certain point, factors such as heat dissipation and power consumption become limiting factors.
Mnemonic: transistor = công nhân (transistor equals worker).
5. When Transistor Size Decreases
As manufacturing technology advances, the physical size of each transistor shrinks. This trend, known as scaling down, leads to:
- Higher transistor density – more transistors per unit area.
- Lower power consumption per transistor, enabling faster clock speeds.
- Reduced overall chip size, which translates to smaller, lighter devices.
Thus, when the number of transistors is reduced (or rather, when each transistor becomes smaller), the size of individual transistors decreases over time.
6. Harvard Architecture – Separate Program and Data Memories
In the Harvard architecture, the CPU has two distinct memory spaces:
- Program memory – stores instructions (code).
- Data memory – stores the data the program manipulates.
When an instruction is fetched from the program memory, the corresponding data is retrieved from a separate data memory. This separation allows simultaneous access to both instruction and data, improving throughput compared to the von Neumann architecture where a single bus is shared.
7. Two’s‑Complement Representation (8‑bit)
Two’s‑complement is the most common method for representing signed integers in binary. For an 8‑bit system, the range is –128 to +127. The value –128 is represented by the binary pattern 1000 0000, which is the most negative number possible in this format.
- Positive numbers are encoded as usual binary.
- Negative numbers are obtained by inverting all bits of the absolute value and adding 1.
- Because the most significant bit (MSB) serves as the sign bit, 1000 0000 corresponds to –128.
8. Binary Addition Example
Let’s add two 7‑bit binary numbers: 1010101 and 1101011. Aligning the bits and performing column‑wise addition with carries yields the result 11000000 (8 bits). Here’s the step‑by‑step process:
- Write the numbers with the same length: 01010101 + 01101011.
- Add each column from right to left, remembering that 1+1 = 0 with a carry of 1.
- The final sum is 11000000, which in decimal equals 192.
This example demonstrates how binary addition works and why carries propagate to higher‑order bits.
9. Summary of Key Concepts
- Electronic computer: Stores and processes information.
- First generation: ENIAC as the hallmark machine.
- Third generation: Introduction of operating systems.
- Transistor count: More transistors → higher performance.
- Transistor size: Shrinking size → more density and efficiency.
- Harvard architecture: Separate program and data memories.
- Two’s‑complement (8‑bit): -128 is represented by 1000 0000.
- Binary addition: 1010101 + 1101011 = 11000000.
10. Further Reading and Practice
To deepen your understanding, explore the following resources:
- History of Computers – detailed timeline of computer generations.
- Harvard Architecture – technical overview and examples.
- Khan Academy Computer Science – interactive lessons on binary arithmetic and logic.
Practice by creating your own binary addition problems, converting decimal numbers to two’s‑complement, and researching how modern CPUs implement multiple instruction and data caches.
