Computer Organization and Architecture PDF
Document Details
Uploaded by SplendidRadon
Cebu Institute of Technology - University
Tags
Related
- (The Morgan Kaufmann Series in Computer Architecture and Design) David A. Patterson, John L. Hennessy - Computer Organization and Design RISC-V Edition_ The Hardware Software Interface-Morgan Kaufmann-102-258-pages-4.pdf
- Computer Organization and Architecture (PDF)
- Computer Organization and Architecture PDF
- RISC-V Processor Implementation PDF
- Computer Organization and Architecture PDF
- Computer Organization and Architecture Past Paper PDF (2024-25)
Summary
This document provides an overview of computer organization and architecture, including topics such as computer systems, hardware components, software, and the relationship between architecture and organization. It also covers concepts such as registers, instructions, and buses.
Full Transcript
Computer Organization and Architecture Outline Introduction, Block diagram of Digital Computer, Definition of Computer Organization 9/18/2023 CPE463 – COM ORG AND ARCH 2 Digital Computers It is a digital system that performs various computational tasks. First electronic d...
Computer Organization and Architecture Outline Introduction, Block diagram of Digital Computer, Definition of Computer Organization 9/18/2023 CPE463 – COM ORG AND ARCH 2 Digital Computers It is a digital system that performs various computational tasks. First electronic digital computers introduced in the year 1940’s were primarily used for the numerical computations. Digital computer uses the binary number system, which has two digits, 0 & 1. A Binary digit is called a bit. In computers, information is represented in ‘Group of bits’. 9/18/2023 PRESENTATION TITLE 3 Computer System: A computer system is subdivided into 2 functional units: 1. Hardware: Consists of electronic components and electromechanical devices that comprise the physical entity of the system. 2. Software: Consists of instructions and data that the computer manipulates to perform various data processing tasks. Program: It is a sequence of instructions for the computer 9/18/2023 PRESENTATION TITLE 4 System Software: Consists of collection of programs whose purpose is to make more effective use of computer. The programs included in the system software are referred to as operating system. The system software is an indispensable part of a computer. Application Software is a software that performs specific tasks for an end-user. 9/18/2023 PRESENTATION TITLE 5 WHY STUDY COMPUTER ORGANIZATION? It gives an insight of how a computer executes programs internally and can help programmer to write more effective programs. For system programmers, a good knowledge of Computer Organization is essential because they need to program the bare hardware without the support of an operating system. 9/18/2023 PRESENTATION TITLE 6 Relation between Computer Architecture, Organization, System program and Application program 9/18/2023 PRESENTATION TITLE 7 Computer Architecture: It gives the external view of the computer. It is concerned with the structure and behavior of the computer. An Assembly level programmer needs to be aware of Specific Instruction supported by the processor, the instruction formats, the specific registers, and their roles, the way to perform input or output data. 9/18/2023 PRESENTATION TITLE 8 Computer Organization: CO is concerned with the way the hardware components operate and the way they are connected to form the computer system. The various components are assumed to be in place and the task is to investigate the organizational structure to verify that computer parts operate as intended. CO gives an internal view of a computer and the roles that internal components play during execution of a program. 9/18/2023 PRESENTATION TITLE 9 Block Diagram of a Digital Computer: 9/18/2023 PRESENTATION TITLE 10 Functions of different computer units The input unit accepts data and instructions from the outside world to machine. The memory unit stores both, data and instructions. The arithmetic-logic unit performs arithmetic and logical operations. The control unit fetches and interprets the instructions in memory and causes them to be executed. The output unit transmits final results and messages to the outside world. 9/18/2023 PRESENTATION TITLE 11 Basic Operational Concept 9/18/2023 PRESENTATION TITLE 12 The program counter is one of the most important registers in the CPU. It keeps track of which instruction is being executed and what the next instruction will be. The instruction register (IR) is used to hold the instruction that is currently being executed. he two registers MAR and MDR are used to handle the data transfer between the main memory and the processor 9/18/2023 PRESENTATION TITLE 13 Bus Structures 9/18/2023 PRESENTATION TITLE 14 Basic Computer Organization & Design Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle Memory Reference Instructions Input-Output and Interrupt 9/18/2023 PRESENTATION TITLE 15 Instruction Codes: The user of a computer can control the process by means of a program A program is a set of instructions that specifies the operations, operands, and the sequence by which processing must occur. The instruction code is a group of bits that instruct the computer to perform a specific operation. An instruction consists of Opcode and operands. 9/18/2023 PRESENTATION TITLE 16 Examples: ▪ ADD A, B ▪ ADD R1, R2 ▪ MOV CX, 4929h ▪ MOV AX,BX ▪ SUB AX, BX ▪ INC AX 9/18/2023 PRESENTATION TITLE 17 OPCODE: The most basic part of instruction code is its operation part. The operation part of an instruction code specifies the operation to be performed. The operation code of an instruction is a group of bits that define operations such as ADD, Subtract, multiply, shift and complement. The operation code must consist of at least n bits for a given 2^n distinct operations. 9/18/2023 PRESENTATION TITLE 18 OPERANDS: An instruction code should not only specify the operation but also the registers or the memory words where the operations are to be found and the registers or the memory words where the results are to be stored. Memory words can be specified by instructions codes by their address. Processor registers can be specified by assigning to the binary code of k bits that specifies one of 2^k registers. 9/18/2023 PRESENTATION TITLE 19 DIFFERENT MODES OF INSTRUCTION: Immediate Mode: When the second part of an instruction specifies an operand, the instruction is said to have an Immediate Operand EX: ADD AX, 2387 H 9/18/2023 PRESENTATION TITLE 20 DIFFERENT MODES OF INSTRUCTION: Direct Address: When the second part of an instruction specifies an address of an operand The instruction is said to have a Direct Address EX: MOV AX, [1592H] 9/18/2023 PRESENTATION TITLE 21 DIFFERENT MODES OF INSTRUCTION: Indirect Address: When the second part of an instruction designates an address of a memory word in which the address of the operand is found, the instruction is said to have an Indirect Address. EX: Load R1, @500 9/18/2023 PRESENTATION TITLE 22 THE BASIC COMPUTER 9/18/2023 PRESENTATION TITLE 23 Stored program Organization: The simplest way to organize a computer is to have one processor register(AC) and an instruction code format with two parts. 9/18/2023 PRESENTATION TITLE 24 PROCESSOR REGISTER (ACCUMULATOR): Computers that have a single processor register usually assign to it the name accumulator and label its AC. The operation is performed with the memory operand and content of AC. 9/18/2023 PRESENTATION TITLE 25 Registers Address Register (AR) – The AR is a 12 bit register in the Basic Computer When an operand is found, using either direct or indirect addressing, it is placed in Data Register (DR). The data register (DR) holds the operand read from memory. The processor then uses this value as data for its operation 9/18/2023 PRESENTATION TITLE 26 Registers Accumulator (AC) register is a general-purpose processing register. The significance of a general-purpose register is that it can be referred to in instructions – e.g., load AC with the contents of a specific memory location(LDA); store the contents of AC (STA)into a specified memory location 9/18/2023 PRESENTATION TITLE 27 Registers Temporary Register (TR). The temporary register (TR) is used for holding the temporary data during the processing. The Input Register (INPR) holds an 8-bit character received from an input device. The Output Register (OUTR) holds an 8-bit character to be send to an output device 9/18/2023 PRESENTATION TITLE 28 Registers 9/18/2023 PRESENTATION TITLE 29 Computer Instructions The basic computer has 3 instruction code formats as shown in the figure below: 9/18/2023 PRESENTATION TITLE 30 Instruction Set Completeness: A computer should have a set of instructions so that the user can construct machine language programs to evaluate any function. A set of instructions is said to be complete if the computer includes enough instructions in each of the following categories: 9/18/2023 PRESENTATION TITLE 31 Categories Arithmetic, logical and shift instructions A set of instructions for moving information to and from memory and processor registers. Program control Instructions together with instructions that check status conditions. Input and Output instructions 9/18/2023 PRESENTATION TITLE 32 Timing and Control The timings for all the registers in the basic computer is controlled by a master clock generator. Its clock pulses are applied to all flip-flops and register in the system & to flip-flops and registers in the control unit. The clock pulses do not change the state of a register, unless the register is enabled by a control signal. 9/18/2023 PRESENTATION TITLE 33 CONTROL ORGANIZATION: The Control Organization is classified into two major categories: – Hardwired Control – Micro programmed Control 9/18/2023 PRESENTATION TITLE 34 Hardwired Control The Hardwired Control organization involves the control logic to be implemented with gates, flip-flops, decoders, and other digital circuits. The main advantage of Hardwired Control is its fast mode of operation. If the design must be modified or changed, it requires changes in the wiring among the various components. 9/18/2023 PRESENTATION TITLE 35 Micro-programmed Control The Micro programmed Control organization is implemented by using the programming approach. The control information is stored in control memory. The control memory is programmed to initiate requires sequence of micro-operations Any required changes or modifications can be done by updating the micro program in control memory. 9/18/2023 PRESENTATION TITLE 36 Control unit of a basic computer (Hardwired Control organization): 9/18/2023 PRESENTATION TITLE 37 INSTRUCTION CYCLE A program residing in the memory unit of the computer consists of a sequence of Instructions. In the basic computer, each instruction cycle consists of the following phases: 1. Fetch an instruction from memory 2. Decode the instruction 3. Read the effective address from memory if the instruction has an indirect address 4. Execute the instruction 9/18/2023 PRESENTATION TITLE 38 Memory-Reference Instructions In order to specify the micro-operations needed for the execution of each instruction, it is necessary that the function that they are intended to perform be defined precisely. 9/18/2023 PRESENTATION TITLE 39 Input-Output A computer can serve no useful purpose unless it communicates with the external environment. To demonstrate the most basic requirements for input and output communication, we will use as an illustration a terminal unit with a keyboard and printer. 9/18/2023 PRESENTATION TITLE 40 Input-Output Configuration The terminal sends and receives serial information. Each quantity of information has eight bits of an alphanumeric code. The serial information from the keyboard is shifted into the input register INPR. The serial information for the printer is stored in the output register OUTR. 9/18/2023 PRESENTATION TITLE 41 Input –output Configuration 9/18/2023 PRESENTATION TITLE 42 Interrupt cycle The interrupt cycle is a hardware implementation of a branch and save return address. The return address is available in PC is stored in a specific location where it can be found later when the program returns to the instruction at which it was interrupted. This location can be a processor register or a memory stack or a specific memory location. 9/18/2023 PRESENTATION TITLE 43 Interrupt cycle 9/18/2023 PRESENTATION TITLE 44 Control Unit: The main function of control unit is to initiate sequences of micro- operations. The number of micro-operations in the systems is finite. 9/18/2023 PRESENTATION TITLE 45 Hardwired Control: When the control signals are generated by Hardware using conventional logic design techniques then the control unit is said to be hardwired. The control logic is implemented with gates, F/Fs, decoders, and other digital circuits 9/18/2023 PRESENTATION TITLE 46 Hardwired Control: The key characteristics are High speed of operation Expensive Relatively complex No flexibility of adding new instructions (Wiring change-if the design has to be modified) 9/18/2023 PRESENTATION TITLE 47 Microprogrammed Control: The control information is stored in a control memory, and The control memory is programmed to initiate the required sequence of micro-operations Any required change can be done by updating the micro program in control memory, - Slow operation 9/18/2023 PRESENTATION TITLE 48 Microprogrammed Control: The key characteristics are Speed of operation is low when compared with hardwired Less complex Less expensive Flexibility to add new instructions 9/18/2023 PRESENTATION TITLE 49 Control Memory: A Memory that is a part of control unit. The control unit consists of control memory used to store the micro program. Control memory is a permanent i.e., read only memory (ROM). 9/18/2023 PRESENTATION TITLE 50 A computer having a Micro programmed Control Unit has 2 separate Memories : 1. Main Memory: For storing user program (Machine instructions/data). The contents of the main memory may alter. 2. Control Memory: For storing microprogram that can not be altered. The Microprogram consists of microinstructions. Microinstruction specifies various control signals for execution of register micro-operations. 9/18/2023 PRESENTATION TITLE 51 Design of Control Unit The bits of microinstruction are usually divided into fields, with each field defining a distinct, separate function. The various fields available in the instruction format provide control bits to initiate the micro- operation. 9/18/2023 PRESENTATION TITLE 52 Example Decoding of Microinstruction Fields : – F1, F2, and F3 of Microinstruction are decoded with a 3 x 8 decoder – Output of decoder must be connected to the proper circuit to initiate the corresponding microoperation. 9/18/2023 PRESENTATION TITLE 53