Home Common Problem What does a central processing unit (CPU) mainly consist of?

What does a central processing unit (CPU) mainly consist of?

Dec 11, 2020 am 10:46 AM
central processing unit cpu

The central processing unit (CPU) is mainly composed of arithmetic units and controllers. The arithmetic unit is a component in the computer that performs various arithmetic operations and logical operations. It consists of an arithmetic logic unit (ALU), an accumulator, a status register, a general-purpose register group, etc. The controller is the nerve center of the computer, directing all components in the machine to automatically coordinate their work; the controller consists of a program counter, an instruction register, an instruction decoder, a timing generator and an operation controller. It is the "decision-making mechanism" that issues commands. , that is, to complete the coordination and command of the operation of the entire computer system.

What does a central processing unit (CPU) mainly consist of?

#The operating environment of this article: windows10 system, thinkpad t480 computer.

CPU is mainly composed of arithmetic units and controllers.

Central processing unit (CPU) is one of the main devices of electronic computers and the core component of computers. Its function is mainly to interpret computer instructions and process data in computer software. The CPU is the core component of the computer that reads instructions, decodes them, and executes them.

The central processing unit mainly consists of two parts, namely the controller and the arithmetic unit, which also include cache memory and the data and control bus that realize the connection between them. The three core components of an electronic computer are the CPU, internal memory, and input/output devices. The main functions of the central processing unit are to process instructions, perform operations, control time, and process data.

Operator

Operator: arithmetic unit, a component in the computer that performs various arithmetic operations and logical operations.

The arithmetic unit consists of an arithmetic logic unit (ALU), an accumulator, a status register, a general-purpose register group, etc. The basic functions of the Arithmetic Logic Operation Unit (ALU) are the four arithmetic operations of addition, subtraction, multiplication, and division, logical operations such as AND, OR, NOT, and XOR, as well as operations such as shift and complement. When the computer is running, the operations and types of operations of the arithmetic units are determined by the controller. The data processed by the operator comes from the memory; the processed result data is usually sent back to the memory or temporarily stored in the operator. Together with the Control Unit, it forms the core part of the CPU.

The calculator is a functional component in the computer that processes data. Data processing mainly includes arithmetic operations on data and logical operations on logical data. Therefore, implementing arithmetic and logical operations on data is the core function of the arithmetic unit.

The basic function of the arithmetic unit is to complete the processing of various data, such as the four arithmetic operations, logical operations such as AND, OR, and negation, arithmetic and logical shift operations, comparing values, changing symbols, and calculating Main memory address, etc.

The registers in the operator are used to temporarily save the data participating in the operation and the intermediate results of the operation. Corresponding components should also be set up in the operator to record the characteristics of an operation result, such as whether it overflows, the sign bit of the result, whether the result is zero, etc.

Type of operator:

There are many types of operators used in computers. Analyzed from different perspectives, there are different classification methods.

  • The decimal point representation can be divided into fixed-point arithmetic and floating-point arithmetic.

    • The fixed-point arithmetic unit can only perform fixed-point number operations. Its characteristic is that the range represented by machine numbers is smaller, but the structure is simpler.

    • The floating-point arithmetic unit has a strong function and can operate on both floating-point numbers and fixed-point numbers. Its number representation range is large, but its structure is quite complex.

  • #In terms of the carry system, it is divided into binary operators and decimal operators.

    • Generally, computers use binary arithmetic units. As computers are widely used in business and data processing, more and more machines are expanding the function of decimal arithmetic, so that the arithmetic units can complete both Binary operations can also be completed with decimal operations.

The arithmetic unit in the computer needs to have the function of completing a variety of computing operations, so various algorithms must be integrated to design a complete computing component.

Controller

The controller is the nerve center of the computer, directing all components in the entire machine to work in automated coordination. Under the control of the controller, the computer can automatically perform a series of operations according to the steps set by the program to complete specific tasks. It is the "decision-making body" that issues orders, that is, coordinates and directs the operations of the entire computer system.

The main components inside the controller are as follows:

  • ①Instruction register: stores instructions obtained from the memory.

  • ②Decoder: Translate the operation code in the instruction into a control signal.

  • ③ Timing beat generator: Generates timing pulse beat signals to make the computer work rhythmically and orderly.

  • ④ Operation control components: combine control signals to control each component to complete the corresponding operation.

  • ⑤Instruction counter: Calculate and point out the address of the next instruction.

basic skills:

  • Data buffer: Since the speed of the I/O device is low but the speed of the CPU and memory is high, a buffer must be set in the controller. During output, this buffer is used to temporarily store data transmitted from the host at high speed, and then the data in the buffer is transmitted to the I/O device at the rate of the I/O device; during input, the buffer is used It temporarily stores the data sent from the I/O device, and then transmits the data in the buffer to the host at high speed after receiving a batch of data.

  • Error control: The device controller is also responsible for error detection of data transmitted by the I/O device. If an error occurs during transmission, the error detection code is usually set and reported to the CPU, so the CPU invalidates the data transmitted this time and retransmits it. This ensures the correctness of data entry.

  • Data exchange: This refers to the data exchange between the CPU and the controller, and between the controller and the device. For the former, the CPU writes data to the controller in parallel through the data bus, or reads data from the controller in parallel; for the latter, the device inputs data to the controller, or transmits data from the controller to the device. . For this purpose, data registers must be set in the controller.

  • Status description: The controller that identifies and reports the status of a device should write down the status of the device for the CPU to understand. For example, the CPU can start the controller to read data from the device only when the device is in a ready-to-send state. To this end, a status register should be set up in the controller, and each bit in it should be used to reflect a certain status of the device. When the CPU reads the contents of this register, it can understand the status of the device.

  • Receive and recognize commands: The CPU can send a variety of different commands to the controller, and the device controller should be able to receive and recognize these commands. To this end, there should be corresponding control registers in the controller to store received commands and parameters, and to decode the received commands. For example, the disk controller can receive 15 different commands such as Read, Write, and Format from the CPU, and some commands also have parameters; accordingly, there are multiple registers and command decoders in the disk controller.

  • Address identification: Just like every unit in the memory has an address, every device in the system also has an address, and the device controller must be able to identify it. The address of each device controlled. In addition, in order for the CPU to write (or read) data to (or from) registers, these registers should have unique addresses.

Extended information

For the CPU, the main indicators that affect its performance are the main frequency and the bits of the CPU. numbers and the CPU's cached instruction set. The so-called main frequency of the CPU refers to the clock frequency, which directly determines the performance of the CPU. Therefore, if you want to improve the performance of the CPU, increasing the main frequency of the CPU is a good way.

The number of bits of the CPU refers to the number of floating-point numbers that the processor can calculate at one time. Generally, the higher the number of bits of the CPU, the faster the CPU will perform operations. . Nowadays, the number of CPU bits is generally 32 or 64 bits.

In the past, the computers used by people were all 32-bit systems. In recent years, the proportion of 64-bit processors in the computers used by people has become larger. This is because the running speed of 64-bit computers has become faster. Faster and improve people's work efficiency.

The CPU cache instruction set is stored inside the CPU, which mainly refers to hard programs that can guide and optimize the CPU's operations. Generally speaking, the CPU cache can be divided into first-level cache, second-level cache and third-level cache, and those processors with stronger processing capabilities generally have larger third-level caches.

Recommended: "Programming Video"

The above is the detailed content of What does a central processing unit (CPU) mainly consist of?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

In-depth search deepseek official website entrance In-depth search deepseek official website entrance Mar 12, 2025 pm 01:33 PM

At the beginning of 2025, domestic AI "deepseek" made a stunning debut! This free and open source AI model has a performance comparable to the official version of OpenAI's o1, and has been fully launched on the web side, APP and API, supporting multi-terminal use of iOS, Android and web versions. In-depth search of deepseek official website and usage guide: official website address: https://www.deepseek.com/Using steps for web version: Click the link above to enter deepseek official website. Click the "Start Conversation" button on the homepage. For the first use, you need to log in with your mobile phone verification code. After logging in, you can enter the dialogue interface. deepseek is powerful, can write code, read file, and create code

deepseek web version official entrance deepseek web version official entrance Mar 12, 2025 pm 01:42 PM

The domestic AI dark horse DeepSeek has risen strongly, shocking the global AI industry! This Chinese artificial intelligence company, which has only been established for a year and a half, has won wide praise from global users for its free and open source mockups, DeepSeek-V3 and DeepSeek-R1. DeepSeek-R1 is now fully launched, with performance comparable to the official version of OpenAIo1! You can experience its powerful functions on the web page, APP and API interface. Download method: Supports iOS and Android systems, users can download it through the app store; the web version has also been officially opened! DeepSeek web version official entrance: ht

How to solve the problem of busy servers for deepseek How to solve the problem of busy servers for deepseek Mar 12, 2025 pm 01:39 PM

DeepSeek: How to deal with the popular AI that is congested with servers? As a hot AI in 2025, DeepSeek is free and open source and has a performance comparable to the official version of OpenAIo1, which shows its popularity. However, high concurrency also brings the problem of server busyness. This article will analyze the reasons and provide coping strategies. DeepSeek web version entrance: https://www.deepseek.com/DeepSeek server busy reason: High concurrent access: DeepSeek's free and powerful features attract a large number of users to use at the same time, resulting in excessive server load. Cyber ​​Attack: It is reported that DeepSeek has an impact on the US financial industry.