Principles of computer composition - composition of computer systems

A complete computer consists of 硬件和软件two parts, and another part is solidified software 固件(Frimware). The firmware has the characteristics of both software and hardware. Commonly, BIOSit BIOS(Basic Input/Output System)is one of the personal computers 基本输入输出系统, which is solidified on the computer motherboard. One 程序, responsible for 开机自检、硬件初始化、系统引导a series of basic operations such as computers. When the computer is started, the BIOS will be activated first 初始化自检, and then the 引导程序core of the operating system will be loaded 内存, 启动并运行the operating system. BIOS can change hardware configuration and parameters, such as CPU, memory, boot device, etc., by modifying settings. **Its main function is to manage the interaction between computer hardware and software, and it is the basis for the startup of the operating system. **A combination of hardware and software is required for a computer to function and function properly. Therefore, the understanding of computer should not be limited to the hardware part, but should be regarded as a 软件系统和硬件系统complete system including it.

1. Computer hardware system

电子线路和电子元件The computer hardware system is a general term for components that make up a computer system 物理设备. Hardware is what makes up a computer 物质基础and is what makes up a computer system 核心.

In the mid-1940s, American scientist Von Neumann boldly proposed the theory of using binary as the numerical basis of digital computers. If you have watched the new TV series Three-Body Problem, I believe it is very clear that von Neumann in the TV series Three-Body Problem proposed this theory to Qin Shihuang, and demonstrated it with Qin Shihuang's million-strong army. Compared with the decimal system, the binary operation rules are simpler, and the two states of "0" and "1" are easier to realize with physical states, and it is suitable to use Boolean algebra to realize the operation circuit. In addition, von Neumann also put forward 存储程序和程序控制the idea. 存储程序It is to 解题的步骤compile it into a program, and then store 程序和运行程序the required data in the computer in 二进制the form of 存储器, which is convenient for execution. Instead 程序控制, it refers to 控制器taking out 存储器the instructions in the computer one by one and executing them in order, controlling each functional component to perform corresponding operations, and completing the data 加工处理. Stored program and program control are the main design ideas of Von Neumann structure computer, people call these theories of Von Neumann Von Neumann architecture .

According to von Neumann's design ideas, the hardware system of a computer mainly includes 运算器、控制器、存储器、输入设备和输出设备five major components. The arithmetic unit and the controller are collectively referred to as the central processing unit (Central Processing Unit, CPU); the CPU and the memory are generally referred to as 主机(Host); the input device and the output device are collectively referred to as the input and output device (I/O device), because they are located outside the host , so it is sometimes called 外部设备. The figure below shows the von Neumann architecture.

insert image description here

1.1 Memory

存储器的主要功能是存放程序和数据。The program is the basis for computer operation, and the data is the object of computer operation. Regardless of whether it is a program or data, it is represented in binary form in the memory, and they are collectively referred to as information. In order to realize automatic calculation, this information must be placed in the main memory in advance before it can be read by the CPU.

Currently, the main memory of a computer is both 半导体存储器. 存储器由许多个存储单元组成,信息按单元存放。Storage units are numbered in a certain order, and each storage unit corresponds to a number, which is called a unit address. There is a one-to-one correspondence between the address of the storage unit and the information stored therein. The unit address of each storage unit is only one and fixed, but the information stored in it can be changed. The figure below shows a block diagram of a memory.
insert image description here

Storing information into a storage unit or taking information out of a storage unit are called 访问存储器. When accessing the memory, first proceed with what will 地址译码器be sent to find the corresponding one ; then decide to access the memory , that is, take out (read) or store in (write); and then complete the take out or store in the prescribed manner.单元地址译码存储单元读/写控制电路方式

The components related to the memory also include the address bus and the data bus. They transmit address information and data information for accessing the memory respectively, the address bus is unidirectional, and the data bus is bidirectional.

Additional Knowledge: Memory and Registers

Both memory and registers are storage devices in a computer, but they do and are used in slightly different ways.

Memory usually refers to main memory, also known as random access memory (RAM), which is used to temporarily store data and programs needed for computer operation. The memory is usually divided into several address units, and each address unit can store one byte of data, and programs and data are stored according to addresses. Memory capacity is an important indicator of computer performance. Common memory capacity units include bytes (B), kilobytes (KB), megabytes (MB), and gigabytes (GB).

A register is a high-speed storage device that is located inside the CPU and is used to temporarily store instructions and data. The capacity of the register is relatively small, but the speed is very fast. 寄存器的作用主要是在CPU与主存储器之间进行数据传输和运算操作,以提高计算机的运行速度和效率. Different CPU models have different numbers and types of registers. Common register types include accumulator (ACC), instruction pointer (IP), flag register (FLAGS), etc.

In general, both memory and registers are storage devices in computers, but their functions and characteristics are different. Among them, memory is used to store data and programs, while registers are used to temporarily store data and instructions to improve computer operating efficiency.

1.2 Arithmetic Unit

运算器是一种用于信息加工处理的部件,它对数据进行算术运算和逻辑运算。It and the controller form the CPU, which is one of the components of the CPU.

An arithmetic unit usually consists of an arithmetic logic unit (ALU) and a series of registers. The following figure shows a schematic diagram of the simplest calculator.
insert image description here

ALU is a component that specifically completes arithmetic and logic operations; registers are used to store operational operands; in addition to storing operational operands, the accumulator is also used to store intermediate results and final results in continuous operations, hence the name of the accumulator . The raw data in the register and accumulator can be obtained from the memory or from other registers; the final result of the accumulator can be stored in the memory or sent to other registers.

Generally, the number of binary digits that an arithmetic unit can handle in one operation is called 机器字长, and it is an important performance indicator of a computer. Common computer word lengths are 8-bit, 16-bit, 32-bit, and 64-bit. Registers, accumulators, and storage locations are generally equal in length to a machine word. The arithmetic unit of a modern computer has multiple registers, such as 8, 16, 32, and hundreds of them. These registers are collectively called the general-purpose register set. Setting the general-purpose register group can reduce the times of accessing the memory and improve the operation speed of the arithmetic unit.

Supplementary knowledge: main memory and storage
主存储器通常指的是计算机中的内存,也称为随机存取存储器(RAM),用于存储正在执行的程序和数据 . The main memory is usually divided into several address units, and each address unit can store one byte of data, and programs and data are stored according to addresses. The capacity of main memory is an important indicator of computer performance. Common memory capacity units include byte (B), kilobyte (KB), megabyte (MB), gigabyte (GB), etc.

存储器是一个更加广泛的概念,它指的是任何一种能够存储数据和程序的设备, including hard drives, solid state drives, CDs, USB flash drives, and more. Unlike main memory, memory usually has a larger capacity but is accessed much slower than main memory.

In short, the main memory is a kind of memory in the computer, which is used to store the programs and data being executed, and the memory is a broader concept, referring to any kind of device that can store data and programs.

1.3 Controller

The controller (Controller) in the computer is an integral part of the CPU, which controls and coordinates various operations so that the computer can execute user programs smoothly. The controller includes important registers such as instruction registers and program counters, as well as components such as logic circuits and sequential circuits.

The role of the controller is to 将指令从主存储器中取出,解码指令,发出相应的控制信号,控制和协调CPU内部各个部件的操作continuously fetch, analyze and execute instructions during program execution, such as arithmetic units and register banks, to complete the work of the computer.

How the controller works is 通过时钟信号来驱动逻辑电路和时序电路,以协调各种操作的执行时间,保持计算机的稳定和可靠性. During the execution of the instruction, the controller reads and decodes the instruction step by step from the main memory, sends out relevant control signals and cooperates with other components to complete the execution of the instruction. The performance and capability of the controller will directly affect the working efficiency and speed of the computer.

Generally speaking, the controller is an important part of the CPU, which is responsible for controlling and coordinating the operation of various components inside the CPU, completing the execution of instructions, and maintaining the stability and reliability of the computer.

控制器是整个计算机的指挥中心,它可以使计算机各个部件协调工作,同时它和运算器的组合也被称为CPU,是CPU的组成部分之一,The essence of the controller's work is to interpret the program. It reads an instruction from the memory each time, generates a series of operation commands after analysis and decoding, and then sends them to each functional component to control the action of each component, so that the entire machine can run continuously and orderly. , to realize the functions of instructions and programs.

There are two streams of information flowing in the computer: 一股是控制流信息, that is, operation commands, which are distributed to various functional components; 另一股是数据流信息, which are controlled by control flow information, flow from one component to another, and are processed by the corresponding components during the flow.

  • Among them, 控制流主要是指CPU产生的指令流, it sends control signals from the controller to control the operation of different functional components according to the needs of the user program. Control flow information also includes some coordination information between processors, such as processor interrupt requests to external devices.
  • 数据流信息则是指在控制流的控制下,不同功能部件之间的数据传输和处理信息,而控制流信息的发源地是控制器. For example, components such as registers, arithmetic units, and caches inside the CPU complete information transmission and interaction through devices such as data buses and address buses, so as to realize data processing and storage. At the same time, the data flow also covers the data operation and transmission in the user program, such as I/O data transmission, memory data reading and writing, etc.

In general, control flow and data flow are two main information flows in a computer. They interweave, interact, and restrict each other, and together constitute an efficient, stable, and reliable computer operating mechanism.

1.4 Input Devices

输入设备是指用于将用户输入的数据或命令输入到计算机中的各种设备,以便计算机进行相应的处理。The input information has various forms such as numbers, letters, symbols, words, graphics, images, and sounds 但是送入计算机中的只有一种形式,即二进制数据. Common input devices include:

  1. Keyboard: Enter data such as letters, numbers and symbols through the keyboard.

  2. Mouse: Input control commands through operations such as mouse click and movement.

  3. Touch screen: Enter instructions and data by touching the screen with a finger or a stylus.

  4. Scanner: Used to convert paper documents, images, etc. into digital form for input into a computer.

  5. Camera: Used to capture images or record video for input to the computer.

  6. Speech recognition device: Converts speech into text or commands into a computer by speaking.

  7. Smart Card: Used to read or write data stored in a smart card.

All of the above input devices can input different data or commands into the computer so that the computer can perform corresponding processing. They are widely used in various fields, such as office, entertainment, education, security and so on. There is also an input device here 模/数(A/D)转换器, and the A/D converter (Analog to Digital Converter) is an electronic device that converts an analog signal (analog quantity) into a digital signal (digital quantity). It converts parameters such as amplitude and frequency of analog signals into digital signals for processing and storage by digital systems such as computers. Analog signals generally refer to data represented by continuous physical quantities, such as current, resistance, pressure, speed, and angle.

The input device is connected to the host through an interface. There are mainly the following reasons for setting the interface:

  1. Most of the input devices are electromechanical devices, and the speed of transmitting data is much lower than that of the host, so the interface needs to be used for data buffering.
  2. The information format used by the input device is different from that of the host. For example, the letters and numbers input through the keyboard are first converted into 8-bit binary code (ASCII code) by the keyboard interface, and then spliced ​​into a word length recognized by the host and sent to the host. Therefore, it is necessary to use the interface to convert the information format.
  3. The interface can also report the running status of the device to the host, convey commands from the host, and so on.

1.5 Output Devices

An output device refers to a device that outputs information such as data or images processed by a computer to display screens, printers, microphones, speakers, etc., so that users can observe and use them. The output device, like the input device, is also connected to the host through an interface. Common output devices include:

  1. Display: Used to display images, text, etc. processed by the computer on the screen.

  2. Printer: Used to output text, images and other information processed by the computer onto paper.

  3. Microphone and speaker: used to output sound information such as voice and music processed by the computer to the audience.

  4. Plotter: It is used to output the image processed by the computer to a plane or space.

  5. Projector: Used to display images processed by a computer on a screen or other flat surface.

The above output devices can convert the data, images, sounds and other information processed by the computer into a human-readable form, which is convenient for users to perform corresponding operations and observations. These devices are widely used in various occasions, such as home entertainment, office field, education, medical treatment and other fields.

外存储器也是计算机中重要的外部设备, it can be used as both an input device and an output device. In addition, it also has the function of storing information, so it is often used as an auxiliary storage. The computer's storage management software manages it together with the main memory as a supplement to the main memory. Common external storage devices include disks, CDs, and tape drives. Like output devices, they also need to be connected to the host through an interface.

In short, the computer hardware system is the basic component of running programs. People store programs and data into memory through input devices. When the computer is running, the controller takes out instructions one by one from the memory and interprets them as control commands to control the operation of each component. action. The data is processed in the calculator, and the processed result is output through the output device.

1.6 System interconnection

The functional components of the computer hardware system also need to be connected in a certain way in an organized manner, so as to realize the flow of data flow information and control flow information between different components and the processing of data information. The bus interconnection scheme is widely used in modern computers. This method is simple to implement and easy to expand.

总线(Bus)是连接两个或者多个设备(部件)的公共信息通路. It mainly 数据线、地址线和控制线consists of . The bus that connects the main components of the computer to the CPU is called CPU系统总线 . The system interconnection based on the single-bus structure is shown in the figure below:
insert image description here
All devices in the figure above are connected to the bus. Since the bus is a common connecting line of multiple devices, only one device can be allowed to send information to the bus at the same time, but multiple devices can be allowed to receive messages from the bus at the same time.

2. Computer software system

Computer software describes the idea, method and process of solving problems with programs. Therefore, programs are the core components of software. Programs are usually stored in a storage medium, and people can see the storage medium where the program is stored, while the program is invisible.

The collection of all programs in a computer is collectively called the software system of this computer. Computer software is divided into two categories according to its functions 应用软件and software. 系统软件Application software is some programs compiled by users to solve certain application problems, such as scientific computing programs, automatic control programs, data processing programs, information retrieval programs, etc. With the widespread use of computers, the types and quantities of application software are increasing, and the functions are becoming more and more powerful. System software is used to manage, schedule, monitor and serve computer systems, with the purpose of facilitating users, improving computer use efficiency, and expanding system functions. System software is usually divided into the following categories.

  1. Operating system
    The operating system is software that manages various resources in the computer, automatically schedules user jobs, and handles various interrupts. The resources managed by the operating system usually include hardware, software, and data information. The size and function of the operating system vary with different requirements. Common operating systems include UNIX, Windows, Linux, Android, ios, etc. At present, domestic mainstream operating systems include Deepin, Galaxy Kirin, Winning Kirin, and Hongmeng. The domestically-made embedded operating system RT-Thread has been widely used in IoT devices (such as rental power bank control devices, web cameras, smart bracelets, etc.), filling the gap in China's embedded operating system.

  2. Programming language and language processing program A
    programming language is a language used to write computer programs, based on a set of symbols and a set of rules. Programming languages ​​are usually divided into 3 categories: machine language, assembly language, and high-level language.
    (1) Machine language
    Machine language is a set of machine instructions expressed in binary code that can be directly recognized and executed by a computer. It is the operating function given to the computer by the computer designer through the computer hardware structure.

    The instruction format of each machine and the meaning represented by the code are predetermined, so the machine language is also called a machine-oriented language, and the machine languages ​​of computers with different hardware structures are generally different. The execution speed of machine language programs is fast, but due to the high degree of dependence on the machine, the programming is cumbersome, the hardware has poor transparency, poor intuition, and is prone to errors.
    (2) Assembly language
    In order to overcome the shortcomings of machine language that is difficult to read, compile, remember, and error-prone, people invented assembly language that is easy to memorize and describe instruction functions. Assembly language is a machine-oriented computer language represented by mnemonics. Compared with machine language programming, assembly language programming is more flexible and simplifies the programming process to a certain extent. The use of assembly language programming must have a full understanding of the internal architecture of the processor, and the assembly program must be converted into machine instructions by an assembler before it can be executed.
    (3) Machine language
    High-level language is a computer language that is close to human natural language and can be accepted by computers, with definite semantics, clear rules, natural and intuitive, and easy to learn. Currently widely used high-level languages ​​include Basic, FORTRAN, Pascal, C/C++, Java, Python , etc.

    A high-level language is a user-oriented programming language, which needs to be translated into a target program that can be recognized and executed by computer hardware through a corresponding language translation program. According to the execution mode, it can be divided into two types: interpretation type and compilation type. 解释型语言It adopts the method of interpreting and executing at the same time, without generating target programs, such as Basic and Java languages; the 编译型语言source program must be translated into target programs before execution, typically such as C language.

    Language translation programs mainly include compilers, assemblers, interpreters and other software operating programs. Compiler is responsible for translating high-level language into assembly code, also known as 编译器; assembler is responsible for translating assembly language into machine language target program, also known as 汇编器; interpreter is used to translate the statements in the source program into machine instructions one by one in the order of execution and execute without generating an object program, also known as 解释器. The figure below shows the process of converting a common C language source program into a final target program. In addition to common compilation and assembly, the process of preprocessing and multi-target program linking is also added here .
    insert image description here

  3. Database management system
    数据库管理系统 ( Data Base Management System,DBMS )又称数据库管理软件。The database is developed on the basis of the file system in order to meet the needs of data processing and information management, and plays an important supporting role in information processing, intelligence retrieval, office automation and various management information systems. Common database management systems include Oracle, SQL Server, DB2, PostgreSQL, MySQL, etc. Common domestic databases include Dameng Database of Huazhong University of Science and Technology, Jincang Database of Renmin University of China, GBase Huawei GaussDB of Tianjin Nanda General Data Technology Co., Ltd., etc.

Summarize

A computer system refers to a whole consisting of both hardware and software. The hardware system includes the host computer, input and output devices, storage devices, communication devices, etc., while the software system includes the operating system, application software and some other tool software. The role, classification and importance of hardware and software are summarized below.

  • Hardware system:
    The hardware system is the core of the computer system, including the computer host, peripheral equipment, etc. The mainframe of the computer includes the central processing unit (CPU), memory, hard disk/solid state disk, graphics card and other components, and is the heart of the computer. Input devices include keyboards, mice, etc., and output devices include monitors, printers, etc. Storage devices are also very important because they store data and programs in your computer. A communication device is a device used to connect a computer to communicate with other devices.

    Hardware devices can be broken down into different types, including desktops, laptops, tablets, smartphones, and more. Their shape and composition are different, but the purpose is to meet the needs of users.

  • Software system:
    The software system is another important part of the computer system, including the operating system, application programs, and system tools, etc. The operating system is the core software of a computer, including Windows, macOS, Linux, etc., which controls the operation of computer hardware and the allocation of resources. Application programs include text editors, games, browsers, music players, etc., to meet various needs of users. System tools include antivirus software, disk cleaning tools, etc., to protect system security and optimize system performance.

    Software can be divided into different classifications, including system software and application software. System software is used to manage the allocation of computer hardware and resources, and application software is used to meet the different needs of users. The function of system software is to manage the operation of the computer and determine what tasks the computer performs. Application software is used in specific fields such as design, video processing, game development, social media, etc.

Through the reasonable combination of hardware devices and software systems, computer systems can become more efficient and practical. Therefore, the importance of hardware devices and software systems is obvious, and they are indispensable components of computer systems.

Guess you like

Origin blog.csdn.net/m0_63007797/article/details/130604978