《计算机导论复习.ppt》由会员分享,可在线阅读,更多相关《计算机导论复习.ppt(37页珍藏版)》请在课桌文档上搜索。
1、计算机导论考前辅导,学习方法,应试方法,认真对待作业题,作业题就是考试题 老师上课讲的内容就是考试内容(不必死扣书本)考试不交白卷,越不会越多写(相关公式、概念、自己的想法)大学考试考的是记忆力,请珍惜自己的大脑 神通广大的打印店(复习资料、历年试卷),Chapter 1 Introduction,Computer Is a programmable data processor that accepts input data and programs and outputs data.Computer System Solve problems and interact with their
2、 environment.They consist of Devices,programs,and data.Program Is a set of instructions executed sequentially that tells the computer what to do with data.,Chapter 1 Introduction,Von Neumann ModelFour Subsystems Memory(内存)Arithmetic Logic Unit(ALU,算术逻辑单元)Control Unit(控制器)Input/Output(输入/输出设备)Stored
3、Program ConceptSequentialExecutionOf Instructions,Chapter 2 Data Representation,Data TypesText ByteNumber ASCIIImage Bitmap,Vector,Pixel,ResolutionAudio Digital,AnalogVideo Frame,Chapter 2 Data Representation,TextBit(位)A bit(binary digit)is the smallest unit of data that can be stored in a computer,
4、it is either 0 or 1.Bit Pattern(位组合格式)A bit pattern is a sequence,or as it is sometimes called,a string of bits that can represent a symbol.Byte(字节)A bit pattern of length 8 is called a byte.,Chapter 2 Data Representation,NumberASCII American Standard Code for Information Interchange(ASCII)(美国信息交换标准
5、代码).This code uses 7 bits for each symbol.This means 128 different symbols can be defined by this code.,Chapter 2 Data Representation,ImageBitmap Graphic Pixel:Picture elementsResolution:The size of the pixel,Chapter 2 Data Representation,ImageVector Graphic An image is decomposed into a combination
6、 of curves and lines.Each curve or line is represented by a mathematical formula.,Chapter 3 Number Representation,Concepts Decimal system(十进制)based on 10,0-9;Binary system(二进制)based on 2,0-1;Octal notation(八进制)based on 8,0-7;Hexadecimal notation(十六进制)based on 16,0-9,A-F。,Chapter 3 Number Representat
7、ion,Conversion Decimal Binary Hexadecimal notation Octal notation,Chapter 3 Number Representation,Integer Representation Unsigned Integer(无符号整数)Overflow(溢出)Sign-and-Magnitude Format(原码)+0 00000000-0 10000000,Range:0.(2N-1),Range:-(2N-1-1)+(2N-1-1),Chapter 3 Number Representation,Integer Representati
8、on Ones Complement Format(反码)+0 00000000-0 11111111 Twos Complement Format(补码),Range:-2N-1+(2N-1-1),Range:-(2N-1-1)+(2N-1-1),Chapter 3 Number Representation,Excess System Magic Number Is normally(2N-1)or(2N-1-1),where N is the bit allocation.Example:Represent 25 in Excess_127 using an 8-bit allocati
9、on.-25+127 102 1100110 01100110,Chapter 3 Number Representation,Floating-Point Representation 1.Convert the integer part to binary.2.Convert the fraction to binary.3.Put a decimal point between the two parts.Example:Transform the fraction 0.875 to binary,0.875 1.750 1.5 1.0 0.0 0.1 1 1,Chapter 3 Num
10、ber Representation,Normalization Example:Show the representation of the normalized number+26 x 1.01000111001 6+127 133 10000101 0 10000101 01000111001000000000000 Sign exponent mantissa,Chapter 4 Operations on Bits,Arithmetic Operations Example1:Solution:,Add two numbers in twos complement represent
11、ation:(+24)+(-17)(+7),Carry 1 1 1 1 10 0 0 1 1 0 0 0+1 1 1 0 1 1 1 1-Result 0 0 0 0 0 1 1 1+7,Chapter 4 Operations on Bits,Arithmetic Operations Example2:Solution:,Add two numbers in twos complement representation:(+127)+(+3)(+130),Carry 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1+0 0 0 0 0 0 1 1-Result 1 0 0 0 0
12、 0 1 0-126(Error)An overflow has occurred.,Chapter 4 Operations on Bits,Arithmetic Operations Example3:Solution:,Subtract 62 from 101 in twos complement:(+101)-(+62)(+101)+(-62),Carry 1 10 1 1 0 0 1 0 1+1 1 0 0 0 0 1 0-Result 0 0 1 0 0 1 1 1 39The leftmost carry is discarded.,Chapter 4 Operations on
13、 Bits,Logical Operations,Chapter 4 Operations on Bits,Logical OperationsExample1:Solution:,Use the NOT operator on the bit pattern 10011000.,Target 1 0 0 1 1 0 0 0 NOT-Result 0 1 1 0 0 1 1 1,Chapter 4 Operations on Bits,Logical OperationsExample2:Solution:,Use the AND operator on bit patterns 100110
14、00 and 00110101.,Target 1 0 0 1 1 0 0 0 AND 0 0 1 1 0 1 0 1-Result 0 0 0 1 0 0 0 0,Chapter 4 Operations on Bits,Logical OperationsExample3:Solution:,Use the OR operator on bit patterns 10011000 and 00110101.,Target 1 0 0 1 1 0 0 0 OR 0 0 1 1 0 1 0 1-Result 1 0 1 1 1 1 0 1,Chapter 4 Operations on Bit
15、s,Logical OperationsExample4:Solution:,Use the XOR operator on bit patterns 10011000 and 00110101.,Target 1 0 0 1 1 0 0 0 XOR 0 0 1 1 0 1 0 1-Result 1 0 1 0 1 1 0 1,Chapter 4 Operations on Bits,Logical OperationsExample5:Solution:,Use a mask to unset(clear)the 5 leftmost bits of a pattern.Test the m
16、ask with the pattern 10100110.,The mask is 00000111.Target 1 0 1 0 0 1 1 0 ANDMask 0 0 0 0 0 1 1 1-Result 0 0 0 0 0 1 1 0,Chapter 4 Operations on Bits,Shift Operations Shift operations can only be used when a pattern represents an unsigned number.左移:*2 右移:/2,Chapter 5 Computer Organization,Main Memo
17、ry,KB Kilobyte:千字节,1024字节MB Megabyte:兆字节GB Gigabyte:十亿字节TB Terabyte:1000吉千兆字节GB;兆兆位,Chapter 5 Computer Organization,Main MemoryExample:Solution:,A computer has 32 MB(megabytes)of memory.How many bits are needed to address any single byte in memory?,The memory address space is 32 MB,or 225(25 x 220).
18、This means you needlog2 225 or 25 bits,to address each byte.,Sign-and-magnitude,ones complement and twos complement 32-bit IEEE format,可能的未来,学神个数:1 2 个成绩:1 120名之间特点:专业技能极强,精通各种编程语言 参加过ACM竞赛、机器人大赛、数学建模大赛等取得好成绩毕业去向:知名IT企业(谷歌中国、阿里巴巴等)年薪 30w 50w 保送国内名校,可能的未来,学霸个数:20个左右成绩:1 30名之间特点:学习成绩优异 外语水平好(托福、GRE)毕业去向:保送国内名校 出国留学(世界名校)个别选择直接就业,可能的未来,学子个数:80个左右成绩:20 100名之间特点:大学过的很Happy 毕业去向:考研 就业 8w 15w 出国(自主),可能的未来,学渣个数:5个左右成绩:80 120名之间特点:沉迷游戏,挂科严重毕业去向:大五 大六 就业(没有学位证,只有中小私企会要)青年湖底,可能的未来,?,结束语,谢谢!,