1.13k likes | 1.53k Views
Chapter 1 Introduction to the Microprocessor and Computer. Instructor : Dr. Yu Youling yuyouling@mail.tongji.edu.cn. Description. This course covers Intel 80x86 assembly language Architecture of the Intel microprocessors Hardware configuration and control of
E N D
Chapter 1Introduction to the Microprocessor and Computer Instructor:Dr. Yu Youling yuyouling@mail.tongji.edu.cn
Description • This course covers • Intel 80x86 assembly language • Architecture of the Intel microprocessors • Hardware configuration and control of • Common microprocessor supported chips, i.e. Interrupt controller, popular IO devices • Interfacing design for real system
Outline • A historical background • The number systems • Computer data formats • The microprocessor based PC system
Micro Computer • 纵观计算机技术50多年的发展历程,由于电子元器件的飞速发展,计算机性能得到了极大提高,其体积大大缩小,应用越来越普及。 • 20世纪70年代末期8位机开始走向16位机。 • 20世纪80年代,微机进入32位机的发展阶段。微机这一高科技领域的产品已触及到社会的各个角落。 • 20世纪90年代,微机进入64位机的发展阶段 • 21世纪初,逐步迈进64位计算时代 • Intel的发展历史见证了微处理器的发展历史。
Abstract 纵观计算机技术50多年的发展历程,由于电子元器件的飞速发展,计算机性能得到了极大提高,其体积大大缩小,应用越来越普及。 • 微型计算机 • 20世纪70年代末期8位机开始走向16位机。 • 20世纪80年代,微机进入32位机的发展阶段。微机这一高科技领域的产品已触及到社会的各个角落。 • 20世纪90年代,微机进入64位机的发展阶段 • 21世纪初,逐步迈进64位计算时代
1.1 微型计算机发展 表1.1 计算机发展的四个阶段
1.1 微型计算机发展 表1.1 计算机发展的四个阶段
Background – the Mechanical Age • Abacus • Mechanical caculator • the earliest computing machine • Chinese • Babylonian
Background – the Mechanical Age • Pascal arithmetic machine • Gears (10 teeth) and wheels • 10 teeth per gear for one complete revolution • The PASCAL language
Background – the Mechanical Age • Calculator Computer • Not for calculating only • Compute numerical facts with a program !!!!! • 1937, Babbage Analytical Engine • Mechanical computer • 1000 20-digital decimal number • A variable program for various tasks • Punched cards input mode, idea from Jacquard
Background – the Electrical Age • The automation age • Computing with motor-driven mechanical machine • 1889, Herman Hollerith • Punched cards storage • Formed the Tabulating Machine Company IBM • First electronic calculating machine • Z1, 1941, Konrad Zuse • Z3 • Relay logic machine • 5.33Hz
Background – the Electrical Age • The first electronic computer • 1943, Alan Turing • Codebreaker • Not programmable • Special-purpose computer
Background – the Electrical Age • The first general purpose, programmable electronic computer system • Moore School,Univ. of Pennsylvania • 1946, ENIAC(Electronic Numerical Integrator and Calculator) • 17000 vacuum tubes • 500 miles of wires • 30 tons • 24m*6m*2.5m • 100000 operations per second • Programmable
Integrated Circuits (IC) • The first Transistor • 1948, John Bardeen, Walter Brattain, William Schockley • The first IC • 1958, Jack Kilby
Background – the Microprocessor Age • Intel 4004 (1970) • 4-bit microprocessor. • 4KB main memory. • 45 instructions. • P-Channel MOS technology. • 50 KIPS (kilo-Instructions per second) • 740KHz • Compared to ENIAC • 100KIPS • 30 tons • F14 CADC (1970) ALU • 9.15KHz (F14熊猫战斗机主控芯片) • Military secrets, open to public in 1998
Background – the Microprocessor Age • Intel 8008 (1971) • 8-bit version of 4004. • 16KB main memory. • 48 instructions. • NMOS 6 micron technology. • 4500 transistors
Background – the Microprocessor Age • Intel 8080 (1973) • 8-bit microprocessor. • 64KB main memory. • 4.77MHz • 0.5MIPS (Million Instructions per second). • 10X faster than 8008 • MITS Altair 800 Andy Grove, Robert Noyce and Gordon Moore
Background – the Microprocessor Age • Intel 8085 (1977) • 8-bit microprocessor - upgraded version of the 8080. • 64KB main memory. • 1.3 microseconds clock cycle time 769,230 instructions/sec. • 246 instructions. • Intel sold over 100 million copies of this 8-bit microprocessor.
Background – the Microprocessor Age • Intel 8086/8088 • Modern microprocessor. • 16-bit microprocessor. • 1MB main memory. • 2.5 MIPS. • 4- or 6-byte instruction cache. • IBM PC • Software development • Spreadsheet, word process, spelling
Background – the Microprocessor Age • Intel 80286 (1983) • 16-bit architecture microprocessor • Identical to the 8086. • 16MB main memory. • 4.0 MIPS (250 ns/8MHz). • Intel 80386 (1986) • 32-bit microprocessor. • 4GB main memory. • 12-33MHz. • Memory management.
Background – the Microprocessor Age • Intel 80486 (1989) • 32-bit microprocessor, 32-bit data bus and 32-bit address bus. • 4GB main memory. • 20-50MHz. Later at 66 and 100MHz • Incorporated an 80386-like microprocessor, 80387-like floating point coprocessor and an 8K byte cache on one package. • About half of the instructions executed in 1 clock instead of 2 on the 386.
Background – the Microprocessor Age • Intel Pentium (1993) • 32-bit microprocessor, 64-bit data bus and 32-bit address bus. • 4GB main memory. • 60, 66, 90MHz. • 1-and-1/2 100MHz version. • Double clocked 120 and 133MHz versions. • Fastest version is the 233MHz (3-and-1/2 clocked version). • 16KB L1 cache (split instruction/data: 8KB each). • Memory transfers at 66MHz (instead of 33MHz). • Dual integer processors.
Background – the Microprocessor Age • Intel Pentium Pro (1995) • 32-bit microprocessor, 64-bit data bus and 36-bit address bus. • 64GB main memory. • Starts at 150MHz. • 16KB L1 cache (split instruction/data: 8KB each). • 256KB L2 cache. • Memory transfers at 66MHz. • 3 integer processors.
Background – the Microprocessor Age • Intel Pentium II (1997) • 32-bit microprocessor, 64-bit data bus and 36-bit address bus. • 64GB main memory. • Starts at 266MHz. • 32KB split instruction/data L1 caches (16KB each). • Module integrated 512KB L2 cache (133MHz). • Memory transfers at 66MHz to 100MHz (1998).
Background – the Microprocessor Age • Intel Pentium III (1999) • 32-bit microprocessor, 64-bit data bus and 36-bit address bus. • 64GB main memory. • 800MHz and above. • 32KB split instruction/data L1 caches (16KB each). • On-chip 256KB L2 cache (at-speed). • Memory transfers 100MHz to 133MHz. • Dual Independent Bus (simultaneous L2 and system memory access).
Background – the Microprocessor Age • Intel Pentium IV (2002) • 1.4 to 1.9GHz and the latest at 3.20 GHz and 3.46GHz (Hyper-Threading)! • 1MB/512KB/256KB L2 cache. • 800 MHz (about 6.4GB/s)/533 MHz (4.3 GB/s)/ 400MHz (3.2 GB/s) system bus. • 1066 MHz front side bus. • Specialized for streaming video, game and DVD applications (144 new SIMD 128-bit instructions). • 0.13um, more than 55 million transistors, . • Newer ones are in 90nm transistors, >125 million possible • The future
Generation of Computer • Vacuum tube-1946-1957 • Transistor-1958-1964 • Small scale integration-1965 • Up to 100 devices on a chip • Medium scale integration -to 1971 • 100-3,000 devices on a chip • Large scale integration -1971-1977 • 3,000 -100,000 devices on a chip • Very large scale integration -1978 to date • 100,000 -100,000,000 devices on a chip • Ultra large scale integration • Over 100,000,000 devices on a chip
Moore’s Law • the capacity of chips doubles every 18 months with associated improvements in performance • 1965, Gordon Moore • Moore’s Law has remained valid for 4 decades • 1971: 4004 2,250 transistors • 1972: 8008 2,500 transistors • 1974: 8080 5,000 transistors • 1978: 8086 29,000 transistors • 1982: 80286 120,000 transistors • 1985: 80386 275,000 transistors • 1989: 80486 DX 1,180,000 transistors • 1993: Pentium 3,100,000 transistors • 1997: Pentium II 7,500,000 transistors • 1999: Pentium III 24,000,000 transistors • 2000: Pentium 4 42,000,000 transistors • Moore’s Law is NOT going to end in the near future
Background – Programming • Programming machine programming language • Advancements • Program by rewiring the circuits • Machine language • Binary codes (二进制代码), 0/1 • von Neuman machine - a system that accepted instructions and stored them in memory. • Assembly language • Mnemonic codes (助记符) • 0100 0111 ADD • Advanced language • FLOWMATIC, Fortran, ALGOL, COBOL • Basic, Pascal teaching language • C/C++ mostly using for low-level or hardware related programming • Java main in network programming
Number Systems • 计算机化的信息 • 计算机是基于电磁学原理来进行工作的 • 计算机化的信息通常采用一定电压的信号来处理的 • 12V电压用于硬盘驱动器 • 5/3V电压用于总线接口或外部通信接口 • 1.5/1.3V电压用于CPU等 • 计算机通常采用电压的开关来表示和处理信息的 • 电压开(Voltage On, Power On)为1 • 电压关(Voltage Off, Power Off)为0 • 采用上述两种工作状态时,电子设备的性价比最高,即价格最便宜、性能最稳定可靠
Open Closed circuit circuit Number Systems • 二进制电路 • 所有现代计算机都是基于二进制信息处理过程 • 二进制由两个数组成 • 1 • 0
Number Systems • 字节与位
Number Systems • 字长 • 位 • 字节:8位 • 字:2字节,16位 • 双字:4字节,32位 • 数量级 • μ:10-6 • m:10-3 • K :103 • M :106 • G :109 • T :1012
Number Systems • 数的表示 • 从数字到数:数的进位计数制表示 • 10进制表示、16进制表示、2进制表示、12进制表示等等 • 数的不同进制表示之间的相互转化 • 数在计算机内部的表示 • 真值和机器数 • 二进制数的计算机表示:原码、反码和补码 • 基于机器数的运算(算术运算和逻辑运算) • 其它表示:BCD码
Number Systems • 进位计数制的一般表示 • 一般地,对任意一个K进制数S都可表示为 其中: Si--S的第i位数码,可以是K个符号中任何一个; n,m --含义同前; K--基数(radix或number base); Ki-- K进制数的权(weight)
Number Systems • 计算机的数制 • 十进制数 • 二进制数
Scale Number Examples • 进位计数制表示实例 • Example 1: 6进制表示下的 25.2 Power 6^1 6^0 6^-1 Weight 6 1 .167 Number 2 5. 2 Numeric Value 12 + 5. + .333 = 17.333 • Example 2: 2进制表示下的110.101 Power 2^2 2^1 2^0 2^-1 2^-2 2^-3 Weight 4 2 1 0.5 0.25 0.125 Number 1 1 0. 1 0 1 Numeric Value 4 + 2 + 0 + 0.5 + 0 + 0.125 = 6.625 Tongji University
Conversion Between Different Scale Numbers • 非十进制数到十进制数的转换 • 按相应进位计数制的权表达式展开,再按十进制求和。(整数和小数均遵循该原则) 例:10110010B= (?)10 13FAH= (?)10 Tongji University
Number Systems • 计算机的数制 • 二进制数十进制数
Number Systems • 二进制数
Conversion Between Different Scale Numbers • 十进制到非十进制数的转换 • 十进制 → 二进制的转换: 整数部分:除2取余; 小数部分:乘2取整。 • 十进制 → 十六进制的转换: 整数部分:除16取余; 小数部分:乘16取整。 以小数点为起点求得整数和小数的各个位。 Tongji University
Number Systems • 计算机的数制 • 十进制数二进制数(不带小数和带小数)
Number Systems • 计算机的数制 • 二进制数 • 958710 = 100101011100112 • 八进制数 • 958710 = |010|010|101|110|0112 • 958710 = (2|2|5|6|3) • 958710 = 225638
Number Systems • 计算机的数制 • BCH(Binary-Coded Hexadecimal) • 二进制数 • 958710 = 100101011100112 • 十六进制数 • 958710 = |0010|0101|0111|00112 • 958710 = 277316
Number Systems • 二进制十六进制
Number Systems • 十六进制数
Numbers in Computer • 基本概念:机器数及其真值 • 在计算机中,一个数连同它的符号都用二进制的编码形式来表示,这种数称为机器数。(Machine Number) • 一个机器数对应的十进制数值称为这个机器数的真值(True Value) • 基本概念: 二进制数在计算机内的表示:原码、反码和补码 Tongji University
Binary Number Operations 无符号数 算术运算 有符号数 逻辑运算 注意它们之间的区别 Tongji University