Home > Common Problem > body text

What is the main function of the arithmetic unit in a microcomputer?

青灯夜游
Release: 2020-12-24 14:40:54
Original
16319 people have browsed it

The main function of the arithmetic unit in the microcomputer is to perform arithmetic operations and logical operations. The arithmetic unit is a component in the computer that performs various arithmetic operations and logical operations; 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 logic Shift operations, comparing values, changing signs, etc.

What is the main function of the arithmetic unit in a microcomputer?

The main function of the arithmetic unit in the microcomputer is to perform: arithmetic operations and logical operations.

Arithmetic unit: arithmetic unit, a component in a computer that performs various arithmetic and logical operations. The basic operations of the arithmetic unit include 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 shifts, comparisons, and transmissions. It is also called the Arithmetic Logic Unit (ALU).

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

There are many types of arithmetic units used in computers. 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 carry system, it is divided into binary calculator and decimal calculator. 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 and 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.

Performance indicators

1. Machine word length

The machine word length refers to the basic number of digits of data involved in the operation. It determines the number of registers, operators and data buses, thus directly affecting the price of the hardware. The word length indicates the calculation precision. In order to coordinate accuracy and cost, and to meet various requirements, many computers allow variable word length calculations, such as half word length, full word length, double word length, etc. Since both numbers and instruction codes are placed in the main memory, there is often a corresponding relationship between the word length and the instruction code length. The word length also affects the strength of the instruction system function. Computer word sizes vary from 4, 8, 16, 32 to 64 bits. The machine word length can consist of one or more bytes. Machines used for scientific computing require a longer word length to ensure accuracy; for machines used for data processing and industrial control, a word length of 16 bits or 32 bits can meet the requirements.

2., Operation speed

It is one of the main indicators of the computer. The time required for computers to perform different calculations and operations may be different, so there are different calculation methods for calculation speed. The average speed is generally expressed as the average number of instructions that can be executed per unit time. For example, a computer's operating speed is 1 million times/second, which means that the computer can execute an average of 1 million instructions in one second (i.e. 1MIPS). Sometimes the weighted average method is also used (that is, calculated based on the execution time of each instruction and the percentage of the instruction to all operations) to obtain the equivalent speed representation

The above is the detailed content of What is the main function of the arithmetic unit in a microcomputer?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!