1 / 19

Text Reference: Warford

Text Reference: Warford. Introduction to Computer Architecture. Computer Architecture:. The design of those aspects of a computer which are visible to the programmer. Instruction Set. Architecture. Registers. Memory. Organization. Digital Computer:.

bayard
Download Presentation

Text Reference: Warford

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Text Reference: Warford Introduction to Computer Architecture

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

  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. Output Output Input Input Input Computer Work Flow instruction flow Processing data flow analysis Processing ? design ?

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

  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. 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. 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. Translation L2 program (ADD A, B) Translator Program L1 program (00000011 11000011) (00000011 11000011)

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

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

  12. Digital Logic Level • “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.

  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. 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. Machine Language Level • 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.

  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. 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. High Level Language Level • 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)

  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;

More Related