电脑是如何工作的_第1页
电脑是如何工作的_第2页
电脑是如何工作的_第3页
电脑是如何工作的_第4页
电脑是如何工作的_第5页
已阅读5页,还剩27页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、How Computer Works? By Mark2011 August 12What is the Input data? What Input to Human BrainVideo, Audio, LanguageWhat input to CPUVideo, Audio, Language3How to describe informationTextVideoAudioNumberDigital bits0,1All information is represented using binary numbers: 4High and Low5V0VHighLowHigh: 1Lo

2、w: 05論理回路記号(Logic Circuit )論理積(AND)論理和(OR)排他的論理和(XOR)否定(NOT)Exclusive OR6xyzxyz入力出力xyz000010100111入力出力xyz000011101111論理積(AND)論理和(OR)7入力出力xyz000011101110入力出力xz0110排他的論理和(XOR)否定(NOT)2入力違、出力12者不同时,输出1xyzxz8xyzxyz入力出力xyz001011101110入力出力xyz001010100110NANDNORAND+NOTOR+NOT9xyzxyz入力出力xyz0V0V0V0V5V0V5V0V0V5

3、V5V5V入力出力xyz0V0V0V0V5V5V5V0V5V5V5V5VANDOR内部電子回路?105V0V電圧対応10 xyzAND練習問題1xyzttt0V0V0V5V5V5V11練習問題2xyzttt0V0V0V5V5V5Vxyz論理和(OR)12練習問題3xyzttt0V0V0V5V5V5V排他的論理和(XOR)xyz13Why use binary numberOne signal can describe 1/0 =2 statesN signals can describe 2x2x22= 2nCan be calculate(+ - * /)在电路上用n根信号线可以表示2n种状

4、态.0000 STOP0001 RUN0010 PAUSE14Bit Combinations1 bit012 bits000110113 bits0000010100111001011101114 bits0000000100100011010001010110011110001001101010111100110111101111Each additional bit doubles the number of possible combinations15Bit CombinationsEach combination can represent a particular itemThe

5、re are 2N combinations of N bitsTherefore, N bits are needed to represent 2N unique items21 = 2 items22 = 4 items23 = 8 items24 = 16 items25 = 32 items1 bit ?2 bits ?3 bits ?4 bits ?5 bits ?How manyitems can berepresented by16How does computer know text72 105 44 32 72 101 97 116 104 101 114 46H i ,

6、H e a t h e r .English character -ASCII code (1 byte)汉字 - 2 byte code17000+011+101+110+1进位Add ABSC182進数半加算器半加算器B1A1S1C2A1B1S1C2XORAND加算値桁上練習問題19全加算器B3A3S3C全加算器B2A2S2C3半加算器B1A1S1C2A3 A2 A1B3 B2 B1S3 S2 S1+C桁上202進数全加算器A2B2C2S2C3全加算器B2A2S2C3C2XORXORANDANDOR21進数進数進数進数進数進数基数桁数字22進数整数進数小数進数23進数進数基数(base)桁

7、数字10100,1,2,3,4,5,6,7,8,9220,1880,1,2,3,4,5,6,716160,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F7?24進数進数変換整数場合25Storing Information927892799280928192829283928492859286Large values arestored in consecutivememory locationsEach memory cell stores a set number of bits (usually 8 bits, or one byte)KB210 = 1024MB220 (o

8、ver 1 million)GB230 (over 1 billion)TB240 (over 1 trillion)kilobytemegabytegigabyteterabyte26The Central Processing Unit (CPU)A CPU is on a chip called a microprocessor It continuously follows the fetch-decode-execute cycle:fetchRetrieve an instruction from main memorydecodeDetermine what theinstruc

9、tion isexecuteCarry out theinstruction27The Central Processing UnitThe CPU contains:Arithmetic / Logic UnitRegistersControl UnitSmall storage areasPerforms calculations and makes decisionsCoordinates processing steps28実行直前0 1 1 0 10001 1 1 1 00011 1 1 1 00101 0 1 1 10110 0 0 0 01000 0 0 1 11010 0 1

10、0 01100 0 0 0 0111Command registercontentsindex000000000000000ArithmeticCommand decodeIndex register5bits CPU Computers only know binary numbersCPUMain MemoryStep by Step29実行第段階0 1 1 0 10001 1 1 1 00011 1 1 1 00101 0 1 1 10110 0 0 0 01000 0 0 1 11010 0 1 0 01100 0 0 0 0111命令番地011010110100000累算器命令呼出、解読Load命令解読器番地000 Load A (A累算器持)30CPU instructions1.CPU instructionsmachine language12.How to tell computer to doComputers only accept binary bits.(machine language)3.assembly languageeasy to understand by humanassembly language : machine language

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论