Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.

Similar presentations


Presentation on theme: "1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization."— Presentation transcript:

1 1 Text Reference: Warford

2 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization Instruction Set Memory Registers

3 3 Digital Computer: “…machine that accepts digitized input information, processes it according to a list of internally stored instructions, and produces the resulting output information. The list of instructions is called a computer program and the internal storage is called computer memory.” from: Computer Organization 4th Edition Hamacher, Banesic, Zaky McGraw Hill, 1996.

4 4 Processing ? analysis design Computer Work Flow Input Output ? data flow instruction flow

5 5 Computer Main Elements System Bus Central Processing Unit (CPU) Memory Input/Output

6 6 Computer Instruction Set Individual instructions are very simple: –add two numbers –move a piece of data from one location to another –compare two numbers The only representation of instructions and data that a computer can understand is BINARY (values of 1 and 0 only).

7 7 Sample machine language instruction: (ADD contents of Register B to contents of Register A) 0000011 11000011 Sample Data: (the character “B”, also the number 66) 01000010 Problem: Binary representation of instructions and data are not easily generated, manipulated, or understood by humans.

8 8 Solution: –design a new set of instructions (L2) more convenient to use by humans than native (L1) machine instructions. L1 Instruction:00000011 11000011 Equivalent L2 Instruction:ADD A, B –How can a program written in L2 be executed?

9 9 Translation L2 program (ADD A, B) Translator Program (00000011 11000011) L1 program (00000011 11000011)

10 10 Interpretation L2 program (ADD A, B) Interpreter Program (L2 Virtual Machine) (00000011 11000011)

11 11 Digital Computer as a Multilevel Machine High Level Language Level Assembly Language Level Operating System Level Machine Language Level Microprogram Level Digital Logic Level Translation (Compiler) Translation (Assembler) Software Hardware Machine code Partial Interpretation, Partial Pass-through Interpretation (microprogram) Directly executed by hardware Applications Level

12 12 “gate” level logic circuits. Primitive “computations” confined to Boolean operations (AND, OR, NOT) no concept of a program at this level. There is simply a sequence of instructions to be processed. Digital Logic Level

13 13 Microprogramming Level machine language instruction interpreted. - causes a series of simpler instructions to be executed by underlying digital logic level. Microprogram for each instruction stored permanently in memory internal to the microprocessor when it is manufactured.

14 14 Microprogram level example: Machine language level instruction: 00000011 11000011 Microprogram: 1. Fetch instruction from memory 2. Increment Program Counter in preparation for the next instruction. (the Program Counter is a register that indicates where the next instruction to be executed is stored in memory) 3. Route contents of Register B and Register A to Arithmetic Logic Unit (ALU) input. 4. ADD the two inputs to the ALU generating a result. 5. Store result in Register A.

15 15 this level defines the interface between the inner workings of the processor and the outside world. Every model of processor has a unique set of instructions (ISA: Instruction Set Architecture) and encoded instruction formats. Machine Language Level

16 16 Operating System Level an Operating System is a program that provides an environment in which a user can execute other programs in a convenient and efficient manner. It is responsible for managing system resources (in time and space), allocating resources to user programs, and monitoring the integrity of the computer system. It provides services to programs in order to make the programming task easier. These services can be invoked by the user program through “system calls”. Most of the code generated by upper levels is passed directly to the machine language level.

17 17 Assembly Language Level assembly language is a symbolic representation of the machine language level. The programmer must still be aware of the internal architecture of the target machine. In general, there is a 1-to-1 mapping between an assembly language statement and a machine language statement. Example PC machine language instruction: 00000011 11000011 Equivalent PC Assembly Language instruction: ADD AX, BX (adds the contents of processor register “AX” to contents of processor register “BX” and stores the result in AX)

18 18 Hides the low level architectural details from the programmer. High level languages are generally machine (architecture) independent. Provides language constructs for specifying and manipulating complex data structures. Supports a variety of programming styles (i.e. linear, object oriented) High Level Language Level

19 19 High Level Language Level –Pascal, C, C++,Fortran, Java (compiled) –Perl, Python, JavaScript, Java (interpreted) –Hides the low level architectural details from the programmer. –High level languages are generally machine (architecture) independent. Example code to add two numbers together: int value1, value2; value1 = value1 + value2;


Download ppt "1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization."

Similar presentations


Ads by Google