|
|
|
|
|
|
|
|
|
|
|
|
A processor is a functional unit that interprets and carries out instructions. Every processor comes with a unique set of operations such as ADD, STORE, or LOAD that represent the processor's instruction set. Computer designers are fond of calling their computers machines, so the instruction set is sometimes referred to as machine instructions and the binary language in which they are written is called machine language!
|
|
|
|
An instruction is made up of operations that specify the function to be performed and operands that represent the data to be operated on. For example, if an instruction is to perform the operation of adding two numbers, it must know (l)what the two numbers are and (2)where the two numbers are. When the numbers are stored in the computer's memory, they have an address to indicate where they are, so if an operand refers to data in the computer's memory it is called an address. The processor's job is to retrieve instructions and operands from memory and to perform each operation. Having done that, it signals memory to send it the next instruction.
|
|
|
|
A processor is composed of two functional units—a control unit and an arithmetic/logic unit, and a set of special workspaces called registers. The control unit is the functional unit that is responsible for supervising the operation of the entire computer system. The control unit fetches instructions from memory and determines their type or decodes them. It then breaks each instruction into a series of simple small steps or actions. By doing this, it controls the step-by-step operation of the entire computer system. The arithmetic /logic unit (ALU)is the functional unit that provides the computer with logical and computational capabilities. Data are brought into the ALU by the control unit, and the ALU performs whatever arithmetic or logic operations are required to help carry out the instruction. A register is a storage location inside the processor. Registers in the control unit are used to keep track of the overall status of the program that is running. Control unit registers store information such as the current instruction, the location of the next instruction to be executed, and the operands of the instruction. In the ALU, registers store data items that are added, subtracted, multiplied, divided, and compared. Other registers store the results of arithmetic and logic operations.
|
|
|
|
|
|
处理器是解释并执行指令的功能部件。每个处理器都有一个独特的诸如ADD、 STORE或LOAD这样的操作集,这个操作集就是该处理器的指令系统。计算机系统设计者习惯将计算机称为机器,所以该指令系统有时也称为机器指令系统,而书写它们的二进制语言叫作机器语言。
|
|
|
|
指令由操作码和操作数组成,操作码指明要完成的操作功能,而操作数则表示操作的对象。例如,一条指令要完成两数相加的操作,它就必须知道:①这两个数是什么?②这两个数在哪儿?当这两个数存储在计算机内存中时,则应有指明其位置的地址,所以如果操作数表示的是计算机内存中的数据,则该操作数叫作地址。处理器的工作就是从存储器中找到指令和操作数,并执行每个操作,完成这些工作后就通知存储器送来下一条指令。
|
|
|
|
处理器由两个功能部件(控制部件和算术逻辑部件)和一组称为寄存器的特殊工作空间组成。控制部件是负责监督整个计算机系统操作的功能部件。控制部件从存储器中取出指令,并确定其类型或对之进行译码,然后将每条指令分解成一系列简单的、很小的步骤或动作。这样,就可控制整个计算机系统一步一步地操作。算术逻辑部件(ALU)是为计算机提供逻辑及计算能力的功能部件。控制部件将数据送到算术逻辑部件中,然后由算术逻辑部件完成执行指令所需的算术或逻辑操作。寄存器是处理器内部的存储单元。控制部件中的寄存器用来跟踪正在运行的程序的总体状态,它存储如当前指令、下一条将执行指令的地址以及当前指令的操作数这样一些信息。在算术逻辑部件中,寄存器存放要进行加、减、乘、除及比较的数据项,而其他寄存器则存放算术及逻辑操作的结果。
|
|
|
|
|
|
|
|
| |
|
|
|