《计算机专业英语》.ppt
计算机专业英语计算机专业英语 第1篇计算机专业英语本课程知识结构本课程知识结构第2篇第3篇第4篇 第第1 1篇篇 基础篇基础篇Chapter 1Architecture of Computer Systems TextText Any discussion of computer architectures Any discussion of computer architectures,of how of how computers and computer systems are organizedcomputers and computer systems are organized,designeddesigned,and and implementedimplemented,will inevitably make reference to the“von will inevitably make reference to the“von Neumann architecture”as a basis for comparisonNeumann architecture”as a basis for comparison,because because virtually every electronic computer ever built has been virtually every electronic computer ever built has been rooted in this architecture.rooted in this architecture.1 1 返返回回 第第1 1篇篇 基础篇基础篇 We have strong intuitive feelings about the“von Neumann We have strong intuitive feelings about the“von Neumann architecture”architecture”,because this is what we have always because this is what we have always used.This is“the way computers work”.To comprehend how used.This is“the way computers work”.To comprehend how computer designers conceivecomputer designers conceive,or to appreciate what new or to appreciate what new choices must be foundchoices must be found,it is necessary to have a definitive it is necessary to have a definitive understanding of what the von Neumann architecture is and is understanding of what the von Neumann architecture is and is not and what its implications are.not and what its implications are.The von Neumann architecture based on three ideas The von Neumann architecture based on three ideas:four four subsystemssubsystems,stored program concept and sequential execution stored program concept and sequential execution of instructions.of instructions.2 2 第第1 1篇篇 基础篇基础篇Four SubsystemsFour Subsystems According to Von Neumanns preliminary discussion According to Von Neumanns preliminary discussion,the generalthe generalpurpose computing machine contains four main purpose computing machine contains four main“organs”.These are identified as relating to arithmetic“organs”.These are identified as relating to arithmetic,memorymemory,controlcontrol,and connection with the human and connection with the human operator.In other wordsoperator.In other words,they are the arithmetic logic they are the arithmetic logic unitunit,the control unitthe control unit,the memorythe memory,and the and the inputinputoutput devices that we see in the classical model output devices that we see in the classical model of what a computer“looks like”.The control unitof what a computer“looks like”.The control unit(CUCU),),arithmetic logic unitarithmetic logic unit(ALUALU)and register constitute the and register constitute the central processing unitcentral processing unit(CPUCPU)第第1 1篇篇 基础篇基础篇Four SubsystemsFour Subsystems According to Von Neumanns preliminary discussion According to Von Neumanns preliminary discussion,the generalthe generalpurpose computing machine contains four main purpose computing machine contains four main“organs”.These are identified as relating to arithmetic“organs”.These are identified as relating to arithmetic,memorymemory,controlcontrol,and connection with the human and connection with the human operator.In other wordsoperator.In other words,they are the arithmetic logic they are the arithmetic logic unitunit,the control unitthe control unit,the memorythe memory,and the and the inputinputoutput devices that we see in the classical model output devices that we see in the classical model of what a computer“looks like”.The control unitof what a computer“looks like”.The control unit(CUCU),),arithmetic logic unitarithmetic logic unit(ALUALU)and register constitute the and register constitute the central processing unitcentral processing unit(CPUCPU)第第1 1篇篇 基础篇基础篇Stored Program ConceptStored Program Concept To Von Neumann To Von Neumann,the key to building a generalthe key to building a generalpurpose purpose device lies in its ability to store not only its data and the device lies in its ability to store not only its data and the intermediate results of computationintermediate results of computation,but also to store the but also to store the instructionsinstructions,or ordersor orders,which bring about the computation.which bring about the computation.3 3In a generalIn a generalpurpose one,the instructions must be as purpose one,the instructions must be as changeable as the numbers they acted upon.Thereforechangeable as the numbers they acted upon.Therefore,why not why not encode the instructions into numeric form and store encode the instructions into numeric form and store instructions and data in the same memory?Von Neumann proposes instructions and data in the same memory?Von Neumann proposes that programs and data should be stored in the same that programs and data should be stored in the same binarybinarynumber format in the memory device.number format in the memory device.4 4 第第1 1篇篇 基础篇基础篇UsuallyUsually,this is viewed as the principal contribution this is viewed as the principal contribution provided by Von Neumanns insight into the nature of what a provided by Von Neumanns insight into the nature of what a computer should becomputer should be,which brings the significant which brings the significant breakthrough in the development of the generalbreakthrough in the development of the generalpurpose purpose electronic computer used today.That is what we all knowelectronic computer used today.That is what we all knowthe concept of a stored program.the concept of a stored program.第第1 1篇篇 基础篇基础篇 Sequential Execution of InstructionsSequential Execution of Instructions Based on the stored program concept Based on the stored program concept,computers store computers store programs and data in a slowprograms and data in a slowtotoaccess storage mediumaccess storage medium(such as such as a hard diska hard disk)and work on them in a fastand work on them in a fastaccessaccess,volatile volatile storage medium storage medium(RAMRAM).5 5HoweverHowever,this concept has a this concept has a perceived bottleperceived bottleneckneck:it is designed to process instructions it is designed to process instructions one after another instead of using faster parallel processing.one after another instead of using faster parallel processing.6 6When the program executesWhen the program executes,the message seems to appear all the message seems to appear all at onceat once,but the speed of the computer has deceived you.In but the speed of the computer has deceived you.In factfact,one instruction executes in sequenceone instruction executes in sequence,that is at a timethat is at a time:fetching one instruction from memoryfetching one instruction from memory,interpreting interpreting(decodingdecoding)it and executing it.The computer does not go on it and executing it.The computer does not go on to the next instruction until the one it is working on is to the next instruction until the one it is working on is pleted.according to according to 依照依照architecture architecture 体系结构体系结构breakthrough breakthrough 突破突破constitute constitute 组成组成decode decode 译码,解码译码,解码encode encode 编码编码fetch fetch 获取获取implication implication 含义含义instruction instruction 指令指令intuitive intuitive 直觉直觉in sequence in sequence 顺次,依次顺次,依次parallel processing parallel processing 并行处理并行处理preliminary preliminary 初步的,最初的初步的,最初的stored program concept stored program concept 存储程序概念存储程序概念sequential sequential 顺序的顺序的subsystem subsystem 子系统子系统第第1 1篇篇 基础篇基础篇Key Words&TermsKey Words&Terms 第第1 1篇篇 基础篇基础篇 TextText In computer science In computer science,the way information is organized in the way information is organized in the memory of a computer is called a data structure.the memory of a computer is called a data structure.1 1 Its a data type whose values are composed of component Its a data type whose values are composed of component elements that are related by some structure.elements that are related by some structure.Much of programming involves the storage and retrieval of Much of programming involves the storage and retrieval of data.Many of the most efficient algorithms for important data.Many of the most efficient algorithms for important problems are based on the use of specific data structuresproblems are based on the use of specific data structures;the the efficiency of the algorithm depends on the efficiency of the efficiency of the algorithm depends on the efficiency of the underlying data structure.underlying data structure.2 2Software design often involves the Software design often involves the choice of appropriate data structures.choice of appropriate data structures.Chapter 2Data Structure返返回回 第第1 1篇篇 基础篇基础篇 For exampleFor example,imagine that you are asked to create a imagine that you are asked to create a database of names with ABC companys management and employees.database of names with ABC companys management and employees.To start your workTo start your work,you make a list of everyone in the company you make a list of everyone in the company along with their position,as shown in Table 2-1.along with their position,as shown in Table 2-1.Name NamePositionPosition Name NamePositionPosition AaronAaron ManagerManagerMarthaMarthaEmployeeEmployee CharlesCharlesVPVPPatriciaPatriciaEmployeeEmployee GeorgeGeorgeEmployeeEmployeeRickRickSecretarySecretaryJackJackEmployeeEmployeeSarahSarahVPVPJanetJanetVPVPSusanSusanManagerManagerJohnJohnpresidentpresidentThomasThomasEmployeeEmployeeKimKimManagerManagerZackZackEmployeeEmployeeLarryLarryManagerManager 第第1 1篇篇 基础篇基础篇 Although this list contains both name and positionAlthough this list contains both name and position,it does it does not tell you which managers are responsible for which workers not tell you which managers are responsible for which workers and so on.If you want your database to represent the and so on.If you want your database to represent the relationships between management and employees at ABCrelationships between management and employees at ABC,a tree a tree diagram depicted Figure 2-1 is a much better structure for diagram depicted Figure 2-1 is a much better structure for showing the work relationship at ABC.showing the work relationship at ABC.第第1 1篇篇 基础篇基础篇 These two diagrams are examples of different data These two diagrams are examples of different data structures.If you want to locate the employees record very structures.If you want to locate the employees record very quicklyquickly,you can use the list that keeps the names of the you can use the list that keeps the names of the employees in alphabetical orderemployees in alphabetical order;If you want to see If you want to see relationships between employeesrelationships between employees,the tree structure is much the tree structure is much better.better.There are many different data structures that programmers There are many different data structures that programmers use to organize data in computers.Each data structure has use to organize data in computers.Each data structure has certain operations that naturally fit with data structure.Often certain operations that naturally fit with data structure.Often these operations are bundled with the data structure and these operations are bundled with the data structure and together they are called a data type.An example of several together they are called a data type.An example of several common data structures are arraycommon data structures are array,linked listlinked list,stackstack,queuequeue,binary treebinary tree,and hash table.and hash table.第第1 1篇篇 基础篇基础篇 ListList A collection of items accessible one after another A collection of items accessible one after another beginning at the head and ending at the tail.beginning at the head and ending at the tail.StackStack A collection of items in which only the most recently A collection of items in which only the most recently added item may be removed.The latest added item is at the added item may be removed.The latest added item is at the top.Basic operations are push and pop.Also known as“last top.Basic operations are push and pop.Also known as“last inin,first out”or LIFO.first out”or LIFO.QueueQueue A collection of items in which only the earliest added A collection of items in which only the earliest added item may be accessed.Basic operations are add item may be accessed.Basic operations are add(to the to the tailtail)or enqueue and delete or enqueue and delete(from the headfrom the head)or dequeue.or dequeue.Delete returns the item removed.Also known as“first inDelete returns the item removed.Also known as“first in,first out”or FIFO.first out”or FIFO.第第1 1篇篇 基础篇基础篇 ListList A collection of items accessible one after another A collection of items accessible one after another beginning at the head and ending at the tail.beginning at the head and ending at the tail.StackStack A collection of items in which only the most recently A collection of items in which only the most recently added item may be removed.The latest added item is at the added item may be removed.The latest added item is at the top.Basic operations are push and pop.Also known as“last top.Basic operations are push and pop.Also known as“last inin,first out”or LIFO.first out”or LIFO.QueueQueue A collection of items in which only the earliest added A collection of items in which only the earliest added item may be accessed.Basic operations are add item may be accessed.Basic operations are add(to the to the tailtail)or enqueue and delete or enqueue and delete(from the headfrom the head)or dequeue.or dequeue.Delete returns the item removed.Also known as“first inDelete returns the item removed.Also known as“first in,first out”or FIFO.first out”or FIFO.第第1 1篇篇 基础篇基础篇 TreeTree A data structure accessed beginning at the root node.Each A data structure accessed beginning at the root node.Each node is either a leaf or an internal node.An internal node node is either a leaf or an internal node.An internal node has one or more child nodes and is called the parent of its has one or more child nodes and is called the parent of its child nodes.child nodes.3 3All children of the same node are siblings.All children of the same node are siblings.Contrary to a physical treeContrary to a physical tree,the root is usually depicted at the root is usually depicted at the top of the structurethe top of the structure,and the leaves are depicted at the and the leaves are depicted at the bottom.bottom.algorithm algorithm 算法算法alphabetical alphabetical 按字母顺序的按字母顺序的appropriate appropriate 适当的适当的array array 数组数组depict depict 描述描述dequeue dequeue 出队出队diagram diagram 图表图表enqueue enqueue 入队入队hash table hash table 哈希表哈希表queue queue 队列队列retrieval retrieval 检索检索sibling sibling 兄弟姐妹,同胞兄弟姐妹,同胞stack stack 堆栈堆栈第第1 1篇篇 基础篇基础篇Key Words&TermsKey Words&Terms FIFOFIFO(First In First OutFirst In First Out)先进先出先进先出FIFOFIFO(Last In First OutLast In First Out)后进先出后进先出第第1 1篇篇 基础篇基础篇AbbreviationsAbbreviations 第第1 1篇篇 基础篇基础篇Chapter 3File FormatTextText In general terms In general terms,a file f