计算机的组成:
控制器
计算机的指挥系统
运算器
实现算术运算和逻辑运算
控制器 + 运算器 =计算机的中央处理器(CPU)
存储器
计算机的存储系统
机存储的数据格式都是01,01的形式,0和1由电压的电频控制。
计算机的存储的一个二进制单位称为1bit,8bit=1Bytes称为一个字节
内存:
是计算机内临时存储数据的硬件设备。由于内存读取数据速度较快内存,CPU下达的指令会直接传输给内存,即CPU会与内存直接交互。常见的内存有内存条。
-
优点(较于外存):
-
存取速度快。
-
-
缺点(较于外存):
-
容量小。
-
由于内存基于电存储数据,因此断电数据马上会消失。
外存:
是计算机内永久存储数据的硬件设备,由于外存容量大,所以外存主要用于存储软件等占用量大的数据。当需要使用外存上的某个软件时,CPU下达的指令需要传输给内存后,内存再从外存中读取软件信息,即CPU不与外存直接交互。常见的外存有磁带、磁盘和u盘等。
-
优点(较于内存):
-
容量大
-
可以永久存储数据。
-
-
缺点(较于内存):
-
存取速度慢。
-
-
-
应用程序启动:
电脑打开QQ流程示例。
- 双击QQ图标,CPU先向内存发出取指的命令(CPU+内存)
- 内存从硬盘中取出 运行QQ 的指令(硬盘)
- 控制器分析 运行QQ 的指令并告知运算器工作(控制器)
- 运算器进行一系列的算术运算和逻辑运算打开QQ,并从硬盘从读取QQ的代码至内存(运算器+内存+硬盘)
- 计算机在内存中运行QQ的代码(内存)
- 如果此时从QQ好友接受一个文件并下载,该文件将会永久保存在硬盘中(硬盘)
- 关闭QQ时CPU向内存发出关闭QQ的指令,内存关闭QQ并清理内存中QQ的代码(内存)
输入设备
计算机输入信息(程序、数据、声音、文字、图形、图像等)的设备。
输出设备
计算机输出信息的设备。
常见的输出设备有:显示器、打印机和绘图仪等。外存储器也是一种输出设备。
总线:
总线相当于人类的神经、血管,连接计算机的所有硬件设备。