Principles of Computer Composition (b) - the basic components of a computer

Basic components of a computer

Von Neumann computer architecture diagram

  Von Neumann computer operator -centric.

 

Von Neumann computer Features

  1. Computer by the arithmetic unit, a controller, a memory, input and output devices of five components.

  2. equal status data and instructions stored in memory, and can search the address.

  3. The instructions and data are a binary number expressed.

  4. The instruction by the operation code and address code composed of operation code to indicate the nature of the operation, the address code is used to represent address of the operand in memory.

  The sequence of instructions stored in memory. Normally, instructions are executed sequentially, under certain conditions, may be changed, or the order of execution in accordance with certain conditions based on the calculation result.

  6. Machine to center operator , data transfer between the memory device and input and output is done by operator.

Stored program concept

  Von Neumann model requires that the program must be stored in memory, the memory cells of modern computers to store the program and its response data, which means data and programs should have the same format, because they are stored in the memory .

  In fact, they are stored in binary form in memory.

 

Modern computer architecture diagram

  Modern computers have been converted to the basis of the von Neumann architecture on to memory as the center .

  Functions of each part

    Five components of the computer at the command of the controller, the orderly completion of the task.

      1. The  operator used to perform arithmetic and logic operations, and temporarily stored in the intermediate result of the operation of the operator.

      2. The memory used to store data and programs.

      3. The controller is used to control, program and data input command, the processing operation, and the operation result.

      4.输入设备用来将人们熟悉的信息形式转换为机器能识别的信息形式。

      5.输出设备可将机器运算结果转换为人们熟悉的信息形式。

  现代计算机已将运算器和控制器集成为CPU

    由于运算器和控制器在逻辑关系和电路结构上联系紧密,在大规模集成电路技术成熟后,将运算器和控制器集成在同一个芯片上,合称为中央处理器(CPU, Central Processing Unit)

    此外,CPU中还有一些寄存器组。即CPU由运算器控制器寄存器组构成。

现代计算机硬件简化组成框图

    由于运算器和控制器被集成为CPU,所以可认为现代计算机由三大部分组成:CPUI/O设备(Input/Output Equipment)主存储器(MM, Main Memory)。

    算术逻辑单元 (ALU, Arithmetic Logic Unit) 用来完成算术运算和逻辑运算。

    控制单元(CU, Control Unit)用来解释存储器中的指令,并发出各种操作指令来执行指令。

 

 

存储器的基本组成 

    这里讨论的是主存,即内存。

    主存储器包括存储体、MARMDR、各种逻辑部件及控制电路。

  存储器内部结构说明

    一个主存储器(内存条)由多个存储体组成,一个存储体中有许多存储单元,一个存储单元中有若干个(8、16、32个等)存储元件

    每个存储元件能存储一个二进制数 “0” 或 “1”;

  存储字 存储字长

    • 存储字:一个存储单元存储的二进制代码;
    • 存储字长:一个存储单元存储的二进制代码的位数;存储字长可以是8位、16位、32位等。

      一个存储字可以表示一个二进制数、十进制数、十六进制数、一串字符、ASCII码、一条指令等。

      如:存储字0011011001111101,表示16位的二进制数,表示十进制数13949,表示十六进制数367DH,表示两个ASCII码“6”和“}”,表示某条指令。

      指令与数据保存在存储器中;

  按地址寻访

    • 按地址寻访:赋予每个存储单元一个地址号,按存储单元的地址号实现对存储字的存(写入)、取(读出)。

        如,将编写好的程序的各条指令预先存入各存储单元,当运行程序时,只要给出程序首条指令在主存中的首地址,然后采用程序计数器加1的方法,自动形成下一条指令所在存储单元的地址,机器便可自动完成整个程序的运行。

        又如,当需要重复使用某个数据或某条指令时,只要指出其相应的存储单元地址号即可,不必占用更多的存储单元重复存放同一数据或同一指令,从而提高存储空间利用率。

  两个寄存器

    MAR(Memory Address Register), 存储器地址寄存器。

    • 作用:存放存储单元的地址(编号)。
    • MAR 的位数与存储单元的个数对应。如,若存储单元有1024=210个,则MAR有10位。
    • MAR 反映存储单元的个数。

    MDR(Memory Data Register),存储器数据寄存器。

    • 作用:存放准备存入存储单元的数据,或存放从存储单元中取出准备送往 CPU 的数据。
    • MDR 的位数等于存储字长。
    • MDR 反映存储字长,及单个存储单元的长度。

 运算器的基本组成

    运算器功能:执行各种算术运算和逻辑运算操作的部件。  

    运算器的基本操作包括加、减、乘、除四则运算;与、或、非、异或等逻辑运算;以及移位、比较和传送等操作。

 

累加器

ACC

(Accumulator)

MQ

(Multiplier-Quotient Register)

乘商寄存器

X

操作数寄存器

加法

被加数

——

加数

减法

被减数

——

减数

乘法

乘积高位

乘数

被乘数

乘积低位

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

控制器的基本组成

    控制器的功能:解释指令,保证指令的按序执行。

  PC:程序计数器 (Program Counter)。

  IR:指令寄存器 (Instruction Register)。

  完成一条指令过程中控制器发挥的作用:

  1.取指令:命令存储器读出一条指令。

    动作部件:程序计数器PC。

    存放当前将要执行指令的地址,具有计数功能(PC)+1→PC,即可形成下一条指令地址。PC与主存的存储器地址寄存器MAR之间有一条直接通路。

    PC→MAR→M→MDR→IR

    动作部件:指令寄存器IR。

    存放当前将要执行的指令;将IR中指令的操作码送至CU,用来分析;将IR中指令的地址码送至存储器的MAR,作为操作数的地址。

    OP(IR):IR中指令的操作码。OP(IR)→CU

    AD(IR):IR中的指令地址码。AD(IR)→MAR

  2.分析(解释)指令:分析该指令要完成那些操作,明确操作数的地址。

    动作部件:控制单元CU。

    分析当前指令所需要完成的操作。

  3.执行指令:根据操作数所在的地址和指令的操作码完成某种操作。

    动作部件:控制单元CU。

    发出各种微操作命令序列,控制所有被控对象完成动作。

 

转载于:https://www.cnblogs.com/victoryluyun/p/11078885.html

Guess you like

Origin blog.csdn.net/weixin_34014277/article/details/94491059