资源预览内容
第1页 / 共32页
第2页 / 共32页
第3页 / 共32页
第4页 / 共32页
第5页 / 共32页
第6页 / 共32页
第7页 / 共32页
第8页 / 共32页
第9页 / 共32页
第10页 / 共32页
亲,该文档总共32页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Computer control technology1 Computer structure and function This section introduces the internal architecture of a computer and describes how instructions are stored and interpreted and explains how the instruction execution cycle is broken down into its various components. At the most basic level, a computer simply executes binary-coded results. For a general-purpose programmable computer, four necessary elements are the memory, central processing unit (CPU, or simply processor), an external processor bus, and an input/output system as indicated in Fig.3-1 A-1. Fig. 3-1A-1 Basic elements of a computer The memory stores instructions and data. The CPU reads and interprets the instructions, reads the data required by each instruction, executes the action required by the instruction, and stores the results back in memory. One of the actions that is required of the CPU is to read data from or write data to an external device. This is carried out using the input/output system. The external processor bus is a set of electric conductors that carries data, address and control information between the other computer elements.1-1 The memory The memory of a computer consists of a set of sequentially numbered locations. Each location is a register in which binary information can be stored. The “number” of a location is called its address. The lowest address is 0. The manufacturer defines a word length for the processor that is an integral number of locations long. In each word the bits can represent either data or instructions. For the Intel 8086/87 and Motorola MC6800 microprocessors, a word is 16 bits long, but each memory location has only 8 bits and thus two 8-bit locations must be accessed to obtain each data word. In order to use the contents of memory, the processor must fetch the contents of the right location. To carry out a fetch, the processor places (enables) the binary-coded address of the desired location onto the address lines of the external processor bus. The memory then allows the contents of the addressed memory location to be read by the processor. The process of fetching the contents of a memory location does not alter the contents of that location. Instructions in memory Instructions stored in memory are fetched by the CPU and unless program branches occur, they are executed in the sequence they appear in memory. An instruction written as a binary pattern is called a machine-language instruction. One way to achieve meaningful patterns is to divide up the bits into fields as indicated in Fig. 3-1A-2, with each field containing a code for a different type of information.Fig. 3-1A-2 Arrangement of program and data in memory Each instruction in our simple computer can be divided up into four fields of 4 bits each. Each instruction can contain operation code (or opcode, each instruction has a unique opcode), operand address, immediate operands, branch address. In a real instruction set there are many more instructions. There is also a much large number of memory locations in which to store instructions and data. In order to increase the number of memory locations, the address fields and hence the instructions must be longer than 16 bits if we use the same approach. There are a number of ways to increase the addressing range of the microprocessor without increasing the instruction length: variable instruction field, multiword instructions, multiple addressing modes, variable instruction length. We will not discuss them in detail. Data in memory data is information that is represented in memory as a code. For efficient use of the memory space and processing time, most computers provide the capability of manipulating data of different lengths and representations in memory. The various different representations recognized by the processor are called its data types. The data types normally used are: bit, binary-coded decimal digit (4-bit nibble, BCD), byte (8 bits), word (2 bytes), double word (4 bytes). Some processors provide instructions that manipulate other data types such as single-precision floating-point data types (32bits) and double-precision floating-point data types (64 bits). There is another type of datacharacter data. It is also usually represented in 8 bits. Each computer terminal key and key combination (such as shift and control functions) on a standard terminal keyboard has a 7-bits code defined by the American Standard Code for Information Interchange (ASCII). Type of memory In the applications of digital control system, we also concerned with the characteristics of different memory techniques. For primary memory, we need it to be stored information temporarily and to be written and got information from successive or from widely different locations. This type memory is called random-access memory (RAM). In some case we do not want the information in memory to be lost. So we are willing to use
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号