计算机组成原理概述
计算机概述
计算机的基本组成:
- 存储器: 实现记忆功能的部件用来存放计算程序及参与运算的各种数据
- 运算器: 负责数据的算术运算和逻辑运算即数据的加工处理
- 控制器: 负责对程序规定的控制信息进行分析,控制并协调输入,输出操作或内存访问
- 输入设备: 实现计算程序和原始数据的输入
- 输出设备: 实现计算结果输出
组成的联系:
- 图一
图二
冯·诺依曼机制:
- 程序存储
- 采用2进制
计算机系统的体系结构:
- 图一:
图二:
总线:
定义:连接计算机各部件之间或各计算机直接的一束公共信息线,它是计算机中传送信息代码的公共途径
总线(Bus)是指计算机组件间规范化的交换数据(data)的方式,即以一种通用的方式为各组件提供数据传送和控制逻辑。从另一个角度来看,如果说主板(Mother Board)是一座城市,那么总线就像是城市里的公共汽车(bus),能按照固定行车路线,传输来回不停运作的比特(bit)。这些线路在同一时间内都仅能负责传输一个比特。因此,必须同时采用多条线路才能发送更多数据,而总线可同时传输的数据数就称为宽度(width),以比特为单位,总线宽度愈大,传输性能就愈佳。总线的带宽(即单位时间内可以传输的总数据数)为:总线带宽 = 频率x宽度(Bytes/sec)。
特点:
- 同一组总线在同一时刻只能接受一个发送源,否则会发生冲突
- 信息的发送则可同时发送给一个或多个目的地
分类:
- 传送分类
- 串行总线 二进制各位在一条线上是一位一位传送的
- 并行总线 一次能同时传送多个二进制位数的总线
- 信息分类
- 数据总线 在中央处理器与内存或I/0设备之间传送数据
- 地址总线 用来传送单元或I/O设备接口信息
- 控制总线 负责在中央处理器或内存或外设之间传送信息
- 对象位置分类
- 片内总线 指计算机各芯片内部传送信息的通道<I^2C总线,SPL总线,SCI总线>
- 外部总线 微机和外部设备之间总线用了插件板一级互连<ISA总线,EISA总线,PCI总线>
- 系统总线 微机中各插件与系统板<USB总线,IEEE-488总线,RS-485总线,RS-232-C总线>
总线标准依据: 物理尺寸,引线数组,信号含义,功能和时序,工作频率,总线协议
常用名词
Bit
The bit is a basic unit of information(信息的基本单元) in computing and digital communications. A bit can have only one of two values(只有两种状态), and may therefore be physically implemented with a two-state device. These values are most commonly represented as either a 0or1. The term bitis a portmanteau of binary digit.
Byte
字节(英语:Byte),通常用作计算机信息计量单位,不分数据类型。一个字节代表八个比特(英语:Bit)。它也是程序设计语言里不可缺少的基本数据类型——整数。
Device driver(驱动程序)
In computing, a device driver (commonly referred to as a driver) is a computer program(电脑程序) that operates or controls(操作或控制) a particular type of device that is attached to a computer. A driver provides a software interface(提供了接口) to hardware devices, enabling operating systems and other computer programs to access hardware functions without needing to know(不必知道) precise details of the hardware being used.
JPEG/JPG GIF PNG
What is the Difference Between JPG, GIF, PNG, BMP Image Formats?
JPEG/JPG:
JPEG is a commonly used method of lossy compression(有损压缩) for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss(人眼可觉察到的损失) in image quality.
The term "JPEG" is an acronym(缩写) for the Joint Photographic Experts Group, which created the standard.
JPEG/JFIF supports a maximum image size of 65,535×65,535 pixels. JPG supports 16.7 million colors and is the preferred format for photographs.
JPG and JPEG stand both for an image format proposed and supported by the Joint Photographic Experts Group. The two terms have the same meaning and are interchangeable.(两者实质一样,主要是为了兼容windows之前的版本)
GIF:
The Graphics Interchange Format is a bitmap image format(位图格式).
If an image has large areas with flat or single tones colors, then GIF is the format of choice. Think logos, icons, banners, and cartoons which are all preferably GIF images. The GIF format supports 256 colors (i.e. an 8-bit color palette). As they use only 256 colors(颜色少), they make for compact images and consume less bandwidth.
GIF images are compressed using the Lempel–Ziv–Welch (LZW) lossless data compression(无损压缩) technique to reduce the file size without degrading the visual quality.
支持动图
PNG:
Portable Network Graphics is a raster graphics file format that supports lossless data compression(无损压缩). PNG was created as an improved, non-patented replacement(替代) for Graphics Interchange Format (GIF), and is the most used lossless image compression format on the Internet
Like GIF, the PNG format supports 8-bit color but also extends it to 24-bits, thus giving you more color ranges to work with like in a JPEG file. PNG files do not support animation. PNG files are also lossless files retaining color information when they are compressed. Richer images will lead to larger file sizes.
RAM ROM
ROM
Read-only memory (ROM只读内存存储器) is a type of non-volatile memory used in computers and other electronic devices. Data stored in ROM can only be modified slowly, with difficulty, or not at all, so it is mainly used to store firmware(software that is closely tied to specific hardware and unlikely to need frequent updates) or application software in plug-in cartridges.
RAM(随机存取存储器)
Random-access memory (RAM) is a form of computer data storage. A random-access memory device allows data items to be accessed (read or written) in almost the same amount of time irrespective of the physical location of data inside the memory.
What is the difference between ROM and RAM?
There is one major difference between a ROM and a RAM chip. A ROM chip is non-volatile storage and does not require a constant source of power(不需要持续的电源) to retain information stored on it. When power is lost or turned off, a ROM chip will keep the information stored on it. In contrast, a RAM chip is volatile and requires a constant source of power to retain information. When power is lost or turned off, a RAM chip will lose the information stored on it.
Other differences between a ROM and a RAM chip include:
- A ROM chip is used primarily in the start up(启动阶段) process of a computer, whereas a RAM chip is used in the normal operations of a computer after starting up and loading the operating system.
- Writing data to a ROM chip is a slow process, whereas writing data to a RAM chip is a faster process.
- A RAM chip can store multiple gigabytes (GB) of data, up to 16 GB or more per chip. A ROM chip typically stores only several megabytes (MB) of data, up to 4 MB or more per chip.
programming language(编程语言)
A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.
网络方面
ASCII
ASCII abbreviated from American Standard Code for Information Interchange, is a character encoding standard (the Internet Assigned Numbers Authority (IANA) prefers the name US-ASCII[2]). ASCII codes represent text in computers, telecommunications equipment, and other devices. Most modern character-encoding schemes are based on ASCII, although they support many additional characters.
UTF-8
UTF-8 is a character encoding capable of encoding all possible characters, or code points, defined by Unicode and originally designed by Ken Thompson and Rob Pike.
The encoding is variable-length and uses 8-bit code units. It was designed for backward compatibility with ASCII and to avoid the complications of endiannessand byte order marks in the alternative UTF-16 and UTF-32 encodings. The name is derived from: Unicode (or Universal Coded Character Set) TransformationFormat – 8-bit.