WHAT IS A PROCESSOR
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[1],so the instruction set is sometimes referred to as machine instructions and the binary language in which they are written is called machine language!You shouldn’ t confuse the processor’s instruction set with the instructions found in high-level programming languages,such as BASIC or Pascal.
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(1)what the two numbers are and(2)where the two numbers are.When the numbers are stored in the computer’s memory,they have their addresses 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.
This step-by-step operation is repeated over and over again at awesome speed.A timer called a clock releases precisely timed electrical signals that provide a regular pulse for the processor’ s work.The term that is used to measure the computer’ s speed is borrowed from the domain of electrical engineering and is called a megahertz(MHz),which means million cycles per second.For example,in an 8-MHz processor,the computer’ s clock ticks 8 million times to every 1 second tick of an ordinary clock.
什么是处理器
处理器是解释并执行指令的功能部件。每个处理器都有一个诸如ADD、STORE或LOAD之类的特有操作集,这个操作集就是该处理器的指令系统。计算机系统设计者习惯将计算机称为机器,所以该指令系统有时也称为机器指令系统,而书写指令的二进制语言叫做机器语言!注意,不要将处理器的指令系统与BASIC或PASCAI这样的高级程序设计语言中的指令系统相混淆。
指令由操作码和操作数组成,其中操作码规定要完成的操作功能,操作数则表示所操作的数据。例如,一条指令要完成两数相加的操作,它就必须知道:(l)这两个数是什么,(2)这两个数在哪儿。当这些数存储在计算机内存中时,有指明其位于何处的地址。所以,如果操作数用来指引计算机内存中的数据,则该操作数叫做地址。处理器的工作就是从存储器中取出指令和操作数,并执行每一操作。处理器完成这些工作后就通知存储器送来下一条指令。
这种步进操作以惊人的速度一遍又一遍地重复。一个称为时钟的计时器准确地发出定时电信号,为处理器工作提供有规律的脉冲。测量计算机速度的术语是从电工领域借用来的,称为兆赫(MHz),指每秒百万个周期。例如,普通时钟每秒滴答一次,而在8MHz的处理器中,计算机的时钟每秒滴答800万次。