Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.

Slides:



Advertisements
Similar presentations
DAP teaching computer architecture at Berkeley since 1977
Advertisements

 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
General information Course web page: html Office hours:- Prof. Eyal.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
CS 600 Computer Architecture Professor Timothy Arndt BU 331.
The Logic Machine We looked at programming at the high level and at the low level. The question now is: How can a physical computer be built to run a program?
The Analytical Engine Module 6 Program Translation.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Prince Sultan College For Woman
1 Chapter-01 Introduction to Computers and C++ Programming.
Chapter 1 Introduction. Computer Architecture selecting and interconnecting hardware components to create computers that meet functional, performance.
CS Computer Architecture Section 600 Dr. Angela Guercio Fall 2010.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
Cosc 2150: Computer Organization
Computer Architecture And Organization UNIT-II Multilevel View Point Of A Machine.
Computer Systems Organization CS 1428 Foundations of Computer Science.
EKT 422 Computer Architecture
Computer Organization and Design Computer Abstractions and Technology
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
The Central Processing Unit (CPU) and the Machine Cycle.
CSCI-100 Introduction to Computing Hardware Design Part I.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Computer Architecture And Organization UNIT-II General System Architecture.
Computer Engineering Rabie A. Ramadan Lecture 1. 2 Welcome Back.
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
1 Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag.
Computer Architecture Lec 06: Computer Architecture Introduction.
Computer Organization Instructors Course By: Lecturer: Shimaa Ibrahim Hassan TA: Eng: Moufeda Hussien Lecture: 9:45 Address:
The Instruction Set Architecture. Hardware – Software boundary Java Program C Program Ada Program Compiler Instruction Set Architecture Microcode Hardware.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Computer Organization Instructions Language of The Computer (MIPS) 2.
M211 – Central Processing Unit
Chapter 1 An Overview of Computers and Programming Languages.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
CC311 Computer Architecture Chapter 1 Computer Abstraction & Technology.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Computer Organization and Architecture Lecture 1 : Introduction
CSC235 Computer Organization & Assembly Language
CST 303 COMPUTER SYSTEMS ARCHITECTURE (2 CREDITS)‏
Computer Organization and Machine Language Programming CPTG 245
Today’s Agenda Exam 2 Part 2 (11:15am-12:30pm)
Chapter 1: An Overview of Computers and Programming Languages
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Computer Organization & Assembly language
Assembler, Compiler, Interpreter
Introduction to Micro Controllers & Embedded System Design
Assembler, Compiler, Interpreter
A Discussion on Assemblers
Introduction to Microprocessor Programming
Dept. of Computer & Information Sciences (Course Introduction)
Computer Systems An Introducton.
Presentation transcript:

Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization & Assembly Language Lecture 2 (Structured Computer Organization)

 From text Book: Chapter 1 (1.1.1, 1.1.2)  Structured Computer Organization  Languages & Levels  Virtual Machines  Contemporary Multilevel Machine  6 Layers representation 2Structured Computer Organization

 A computer is a machine that solves problems by executing instructions given to it.  The set or a group of instructions constitute a program.  The computer only understands machine language: a limited set of simple instructions that the internal electronic circuitry can comprehend.  It is composed of fairly simple instructions (ex. Add, check output value, compare …)  This simplicity is due to the need to reduce the complexity & cost of the electronics  All programs have to be converted to machine language before being executed 3Structured Computer Organization

4  Structuring the computer as a series of abstraction layers  Each layer builds upon the one below it.  The complexity could be decomposed and mastered  Systematic and organized way to design computer systems Structured Computer Organization

5  There is a gap between what humans want and what the computer understands.  The more understandable human instructions form a language L1.  The built-in machine instructions form a language L0.  To facilitate the operation of the computer on humans, L1 is used to give instructions.  But computers only understands the L0 instructions Translation OR Interpretation

6Structured Computer Organization  Replaces each instruction in L1 by an equivalent sequence of instructions in L0.  The entire L1 program is converted into an L0 program  The newly generated L0 program is the one that is executed  Moving completely from one language to another

7Structured Computer Organization  It is the process carried out by the interpreter  The interpreter:  Is a program written in L0  Takes the L1 program as input data  Examines each L1 instruction in turn and executes the equivalent sequence of L0 instructions directly  After each L1 instruction is examined and decoded, it is carried out immediately  No new L0 program in generated.

 Hypothetical computer or virtual machine M1 whose machine language is L1.  The virtual machine for L0 is M0.  If M1 could be constructed cheaply enough (not the case)  People could write their programs in L1 and have the computer execute them directly (no need for M0 executing programs in L0).  If M1 is too expensive or complicated to construct  People can write programs for M1, just as though it really exist these programs can be translated or interpreted to L0. 8Structured Computer Organization

 For practical translation or interpretation, the languages L0 and L1 mustn’t be too different.  This means that L1 although better than L0, will still be far from ideal for most applications. Question: How do we relieve the programmer of the burden of having to express a language more suited to machine than people? 9Structured Computer Organization

 Invent another set of instructions that is more people-oriented and less machine- oriented than L1. Lets call it L2.  The invention of a whole series of languages, each one more human convenient than its predecessors.  Each language uses its predecessor as a basis, so we may view a computer using this technique as a series of layers or levels, one on top of another.  The bottommost language or level is the simplest and the highest language or level is the most sophisticated. 10Structured Computer Organization

11Structured Computer Organization Virtual machine Mn, with machine language Ln Level n Level 3 Level 2 Level 1 Level 0 Programs in Ln are either interpreted by interpreter running on a lower machine, or are translated to the machine language of a lower machine Virtual machine M3, with machine language L3 Virtual machine M0, with machine language L0 Programs in L2 are either interpreted by interpreter running on M1 or M0, or are translated to L1 or L0. Programs in L1 are either interpreted by interpreter running on M0, or are translated to L0. Programs in L0 can be directly executed by the electronic circuits. Virtual machine M1, with machine language L1 Virtual machine M2, with machine language L2

12Structured Computer Organization  An n level machine comprises n different virtual machines and n different languages.  When working on a layer n, there is no need to know about the underlying interpreter or translator  The machine structure insures that the upper level language instructions are converted into the lower levels and executed simultaneously.

 Most modern computers are designed with somewhere between 2-6 layers.  Level 0: Digital Logic Level  Level 1: Micro-architecture level  Level 2: Instruction Set Architecture level  Level 3: Operating system machine level  Level 4: Assembly Language level  Level 5: Problem-oriented language level 13Structured Computer Organization

14Structured Computer Organization Problem-oriented language level Digital logic level Assembly language level Operating system machine level Instruction set architecture level Microarchitecture level Level 5 Level 4 Level 3 Level 2 Level 1 Level 0 Translation (compiler)/interpretation Translation (assembler) Partial interpretation (operating system) Interpretation (microprogram) or direct execution Hardware

 It is a hardware level whose basic components are called gates  Each gate is built up of at most a handful of transistors.  Each gate has one or more digital inputs (signals representing 0 or 1) and computes as output some simple functions of these inputs, such as AND or OR. 15Structured Computer Organization

 A number of gates can be combined to form a 1-bit memory, which can store a 0 or 1.  The 1-bit memories can be combined in groups of 16, 32, or 64 to form registers.  Each register can hold a single binary number up to some maximum  Gates can also be combined to form the main computing engine itself. 16Structured Computer Organization

 It is composed of local memory (a set of 8 to 32 registers) and the ALU  It performs simple arithmetic operations such as addition, OR, AND …..  The registers are connected to the ALU to form a data path, over which the data flow.  The basic operation of the data path consists of selection one or two registers having the ALU operate on them. But how is this data path controlled ? 17Structured Computer Organization

 The operation of the data path is controlled by Control Unit:  Control unit can have two organizations:  CU controlled directly by hardware  CU controlled by Software through a program called the micro-program  The micro-program is an interpreter for the instructions at level 2.  It fetches, examines, and executes instructions one by one, using data path to do so.  For Hardwired control of the data path, the same steps for executing an instruction are followed, but without the explicit stored program to control the interpretation 18Structured Computer Organization

 The machines instruction set is designated by the H/W manufacture.  Every computer manufacturer publishes a manual for each of its computer it sells, entitled “Machine Language Reference Manual”  These manuals are really about the ISA level.  The set describes the instructions carried out interpretively by the micro-program or H/W execution circuits. 19Structured Computer Organization

 It is a hybrid level with instructions overlapping with the ISA level.  Some of the level 3 instructions are interpreted by the operating system and some are interpreted directly by micro program ( or hardwired control).  It constitutes of:  Instructions identical to level 2  Various other features:  A set of new instructions  Different memory organization  The ability to run two or more programs concurrently ( carried out by an interpreter called operating system) 20Structured Computer Organization

21Structured Computer Organization Level 1,2, & 3 Levels 4 & 5 Intended for system programmers who Intended for application programmers specialize in designing and with a problem to solve implementing new virtual machines The machine languages of these levels Languages of these levels contain are numeric (long series of numbers) words and abbreviations meaningful to people Level 2 and 3 are always interpreted Usually (not always) supported by translation

22Course Introduction Assembly Language Program (e.g. MIPS) High Level Language Program (e.g. Java) Machine Language Program (i.e. bits) Compiler Assembler Machine Interpretation s[i] = temp s[i] = s[i+1] s[i+1] = temp lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2)

 A symbolic form for one of the underlying languages.  This level provides a method for people to write programs for levels 1, 2, and 3 in a form that is not unpleasant as the virtual machine languages themselves.  Programs in assembly language are first translated (by the assembler) to level 1,2, or 3 language and then interpreted by the appropriate virtual or actual machine. 23Structured Computer Organization

 Usually consists of languages designed to be used by application programmers.  Such languages are often called high-level languages, ex. Pascal, FORTRAN, JAVA, C++, …etc.  Programs written in these languages are generally translated to level 3 or level 4 by translators known as compilers (although occasionally they are interpreted, ex. JAVA). 24Structured Computer Organization

 The set of data types, operations, and features of each level is called its architecture.  The architecture deals with those aspects that are visible to the user of that level (ex. How much memory is available).  Implementation aspects, such as what kind of chip technology is used to implement the memory, are not part of the architecture.  The study of how to design those parts of a computer system that are visible to the programmers is called computer architecture.  Computer architecture = computer organization 25Structured Computer Organization