教学材料《计算机》-3-4 Computer language-communication tool between human and computer_第1页
教学材料《计算机》-3-4 Computer language-communication tool between human and computer_第2页
教学材料《计算机》-3-4 Computer language-communication tool between human and computer_第3页
教学材料《计算机》-3-4 Computer language-communication tool between human and computer_第4页
教学材料《计算机》-3-4 Computer language-communication tool between human and computer_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

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

文档简介

3-4Computerlanguage-communicationtoolbetweenhumanandcomputerIntroduction:Howdoesacomputerwork?Infact,asingleactionorastepofcomputersisruninaccordancewithprogramswrittenbycomputerlanguagesinadvance.Inordertocontrolcomputerswell,peoplemustsendcommandstothecomputerthroughthecomputerlanguage.导读:计算机是如何工作的?实际上,计算机每做的一次动作,一个步骤,都是按照事先用计算机语言编写好的程序来执行的,为了更好的控制计算机,人们必须要通过计算机语言向计算机发出命令。Expandedvocabulary:inaccordancewith[əˈkɔ:dns]adv.根据;与……一致,依照Computerlanguage,alsoknownasprogramminglanguage,isthecommunicationtoolbetweenhumanandcomputer.Itisusuallyusedtowriteaprogramthatcanberunbyacomputer.Ingeneral,computerlanguagecanbedividedintothreekinds:machinelanguage,assemblylanguageandhigh-levellanguage.Machinelanguageandassemblylanguagebelongtolow-levellanguage.计算机语言,也被称为编程语言,是人与计算机之间通信的工具,它通常是用来编写可由计算机运行的程序。总的来说,计算机语言可以分成三类:机器语言、汇编语言和高级语言。机器语言和汇编语言属于低级语言。Keywords:Programming[ˈprəʊgræmɪŋ]n.[计]程序设计,编程;利用program同根词构成新词,如programmer程序员,编程员。program[ˈprəʊgræm]n.节目,节目单;计划,安排;[计]程序,编程,用编程语言编写的可实现一定功能的代码machinelanguage[计]机器语言high-levellanguage[计]高级语言Expandedvocabulary:assembly[əˈsembli]n.装配;集会,集合assemblylanguage[计]汇编语言3-4Computerlanguage-communicationtoolbetweenhumanandcomputer1.MachinelanguageMachinelanguageisasetofbinary

instructionsperformeddirectlybyacomputer'scentralprocessingunit.Eachdifferenttypeofcentralprocessingunithasitsownmachinelanguage,thatis,thelanguageismachine-dependent.1.机器语言机器语言是计算机的中央处理器(CPU)能直接执行的一系列二进制指令集合,不同类型的中央处理器有它自己的机器语言,也就是说,这种语言是依赖于机器的。Keywords:binary[ˈbaɪnəri]adj.二态的;二元的;双重的;[计]二进制的,二进制数据是用0和1两个数码来表示的数。machine-dependent[mə'ʃi:ndɪp'endənt]依赖于机器,与机器有关的;机器相依性Expandedvocabulary:instruction[ɪnˈstrʌkʃn]n.[计]指令;指示;指导3-4Computerlanguage-communicationtoolbetweenhumanandcomputerThecomputingefficiencyofmachinelanguageisthehighestinalllanguages,butmachinelanguageprogramsarenotportabletoothercomputersandhardtoremember.Computerprogramsarerarelywrittendirectlyinmachinelanguage.Machinelanguage机器语言的运算效率是所有语言中最高的,但是由于机器语言程序无法移植到其它计算机,并难于记忆,计算机程序很少直接用机器语言书写。机器语言Keywords:efficiency[ɪˈfɪʃnsi]n.效率,效能;实力,能力rarely[ˈreəli]adv.很少地;罕有地;极精彩地;珍奇地,绝佳地Expandedvocabulary:portable[ˈpɔ:təbl]adj.[计]可移植的;手提的,便携式的3-4Computerlanguage-communicationtoolbetweenhumanandcomputer2.AssemblylanguageTomakeiteasierforprogrammerstowriteprograms,assemblylanguagewasinventedsoon.Itmapsmachineinstructionstohuman-readablemnemonics.Forexample:Assemblylanguage2.汇编语言为了使程序员编写的程序更容易,不久发明了汇编语言。它是把机器指令变换成易于阅读的助记符,例如:汇编语言Keywords:programmer[ˈprəʊgræmə(r)]n.[计]程序员,编程员human-readable[h'ju:mənr'i:dəbl]adj.可读的,人类可读的;Expandedvocabulary:mnemonic[nɪˈmɒnɪk]adj.[计]助记符;记忆的,记忆术的3-4Computerlanguage-communicationtoolbetweenhumanandcomputermovax,x;putxintoaxregisteraddax,y;addytotheaxregistermovax,x;putxintoaxregisteraddax,y;addytotheaxregisterInthiscasetheaxregisterisaspecialmemorylocation,themnemoniccodesare“mov”and“add”,“mov”isshortformove,and“add”istheEnglishword“add”.Assemblylanguageisoftendifficulttolearnandismachine-dependentlikemachinelanguage.3.High-levellanguageHigh-levellanguageallowsprogrammerstowritecodethatisclosertothewaywethinkofaproblem.Forexample:在这个例子中ax寄存器是一个专门的存储器,助记符是“mov”和“add”,“mov”是移动的简写,“add”是“加”的英文单词。像机器语言一样,汇编语言往往是很难学习并且也是依赖于机器的语言。高级语言高级语言允许程序员以更接近于我们思考问题的方式编写代码。例如:3-4Computerlanguage-communicationtoolbetweenhumanandcomputerKeywords:register[ˈredʒɪstə(r)]n.[计]寄存器;注册;登记High-levellanguageThemainadvantageofhigh-levellanguageoverlow-levellanguageisthattheyareeasiertoread,write,maintainandnotmachine-dependent.Today'sfavouredlanguagesareC,C++,C#,Java,HTML,VisualC++,Lisp,Prolog,etc.高级语言高级语言与低级语言相比,主要优势是,很容易阅读、书写、维护并且不依赖于机器,现在常用的语言有C,C++,C#,Java,HTML,VisualC++,Lisp,Prolog等。Keywords:maintain[meɪnˈteɪn]vt.维护;保持;保养;坚持;固执己见3-4Computerlanguage-communicationtoolbetweenhumanandcomputerHowdowethinkofaproblemHigh-levellanguagecode(C)Ifthetotalsalesaregreaterthanif(totalsales>100)$100,calculateadiscountthatis10%ofthesesales.discount=totalsales*0.10;

我们如何思考问题高级语言代码(以C语言为例)如果销售总额大于100美元,如果(销售总额>100)

计算折扣为销售总额的百分之十。折扣=销售总额*0.10;Asmachinelanguageistheonlylanguagethatcomputercanrecognize,programswritteninahigh-levellanguagecan’tberununtiltheyaretranslatedintomachinelanguagebyacompilerorinterpreter.Theexecutionofhigh-levellanguage由于机器语言是计算机唯一识别的语言,使用高级语言编写的程序直到它们被编译程序或解释程序翻译成机器语言才能运行。高级语言的执行过程Expandedvocabulary:compiler[kəmˈpaɪlə(r)]n.[计]编译器;汇编者;编辑者;编纂者;interpreter[ɪnˈtɜ:prɪtə(r)]n.翻译;解释器模式;[计]解释器;解释程序;利用interpret同根词构成新词,如interpretable可解释、翻译[计]指在计算机专业中英语单词的解释3-4Computerlanguage-communicationtoolbetweenhumanandcomputerProgramsarewritteninC,Java,other…compilerorinterpretercomputercoderun

用C,Java或别的语言编写的程序编译器或解释器机器代码运行OralpracticeQ:Howdowecommunicatewithcomputer?A:Computerlanguages.Q:Whatarecommonuselanguages?A:C,Java,VisualBasic…Q:Couldyougiveanexampleofapplication?A:Ok,whattodofirstafterbuyinganewcomputer?Q:InstalltheoperatingsystemsuchasWindowsXP,Windows7,etc.A:TheWindowsoperatingsystemiswrittenbyC,C++,assemblylanguage,etc.Q:WheredoesJavaapply?A:Networkprogramminganddevelopmentofthemobilephone,likemobilephonegames.Q:Butcomputeronlyrecognizes0and1.A:Soprogramscan’tberununtiltheyaretranslatedintomachinelanguage.ExercisesChoices:1. __________isusuallyusedtowriteaprogramthatcanberunbyacomputer.A.HumanlanguageB.ComputerLanguageC.ToolD.Compiler2. Thefollowinglanguagesarecomputerlanguagesexcept____________.A.machinelanguageB.assemblylanguageC.EnglishD.high-levellanguage3.Thecomputingefficiencyofmachinelanguageis__________inalllanguages.A.thehighestB.thelowestC.lowerD.higherExercisesChoices:4.__________mapsmachineinstructionstohuman-readablemnemonics.A.machinelanguageB.high-levellanguageC.assemblylanguageD.low-levellanguage5.High-levellanguagesareeasierto__________andnotmachine-dependent.A.writeB.readC.maintainD.allabov

温馨提示

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

评论

0/150

提交评论