Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Stored Program Architecture
Chapter 2 Machine Language.
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
MICRO PROCESSER The micro processer is a multipurpose programmable, clock driven, register based, electronic integrated device that has computing and decision.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
The Analytical Engine Module 6 Program Translation.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Stored Program Concept: The Hardware View
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 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Chapter 6 Memory and Programmable Logic Devices
The CPU The Central Presentation Unit Language Levels Fetch execute cycle Processor speed.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Computer Organization
Invitation to Computer Science 5th Edition
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Cosc 2150: Computer Organization
Computer Systems Organization CS 1428 Foundations of Computer Science.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Microcode Source: Digital Computer Electronics (Malvino and Brown)
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
Microprogrammed Control Unit Control Memory Sequencing Microinstructions Microprogram Example Design of Control Unit Microinstruction Format.
Chapter 5 Computing Components. 5-2 Chapter Goals List the components and their function in a von Neumann machine Describe the fetch-decode-execute cycle.
Computer Engineering Rabie A. Ramadan Lecture 1. 2 Welcome Back.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
Computer Science 101 Computer Systems Organization.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
12/13/ _01 1 Computer Organization EEC-213 Computer Organization Electrical and Computer Engineering.
1.4 Representation of data in computer systems Instructions.
MICROOCESSORS AND MICROCONTROLLER:
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
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.
CSIT 301 (Blum)1 Instructions at the Lowest Level Some of this material can be found in Chapter 3 of Computer Architecture (Carter)
Chapter 1 An Overview of Computers and Programming Languages.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Representation of Data - Instructions Start of the lesson: Open this PowerPoint from the A451 page – Representation of Data/ Instructions How confident.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
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.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
Computer Organization and Architecture Lecture 1 : Introduction
CSC235 Computer Organization & Assembly Language
Java Programming: From the Ground Up
Machine and Assembly Language
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Prof. Sirer CS 316 Cornell University
Instructions at the Lowest Level
Computer Organization
Computer Science I CSC 135.
CSCE Fall 2013 Prof. Jennifer L. Welch.
Chapter 5: Computer Systems Organization
CSCE Fall 2012 Prof. Jennifer L. Welch.
Overview Last lecture Digital hardware systems Today
Prof. Sirer CS 316 Cornell University
Presentation transcript:

Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission

Low Levels of Languages  Level L0:  The set of instructions that can be directly executed by the computer  Machine language  Level L1:  A set of instructions that are easier to use than L0  Assembly language  Cannot be directly executed by the computer  Need to translate L1 programs into equivalent L0 programs

Compilers (translators)  A L0 program that reads lines of a L1 program, and outputs copies of them in L0 language  Performs a one-time translation from L1 to L0  The translation process is fairly simple  Substitutes each L1 command with an equivalent L0 command  We will have two copies of the program (one in L1 language and one in L0)  If program changes are needed, you change the L1 program and then you must re-translate

Interpreters (Virtual Machines)  A L0 program that reads L1 programs and executes them directly  L1 line 1  read by the interpreter  executed by the interpreter  L1 line 2  read by the interpreter  executed by the interpreter  L1 line 3  read by the interpreter  executed by the interpreter  Execution is done by performing an equivalent set of L0 instructions  Will not have a copy of the L1 program in L0 language  “Translation” is performed every time the program executes  Two programs execute: the interpreter + the L1 program (data to the interpreter)  If changes are needed, you simply change the L1 program (no translation step)

Low Level Languages (summary)  L0 = machine language / L1 = assembly language  One-to-one translation of the lines  i.e. a 7-line L1 program will produce a 7-line L0 program  Easy to translate  Translation is performed by fairly simple substitution  Programs are long (many steps required to do simple tasks)  Machine dependent

Level L0: Machine Language  The set of instructions that can be directly executed by the computer  Language of 1’s and 0’s  Commands are combinations of 1’s and 0’s  Ex: a command to perform addition:  Data are combinations of 1’s and 0’s  Ex: the data to be added: and  Memory cells are addressed with combinations of 1’s and 0’s  Ex: put the answer from the addition into memory cell  Can’t distinguish the data from the commands or memory cells

Level L1: Assembly Language  A set of instructions that are easier to use than L0  Uses words to represent machine language commands  Ex: a command to perform addition: ADD  Uses numbers for data  Ex: the data to be added: 22 and 28  Can use also use words for data (strings)  Uses words to represent memory cells (variables)

Level L1: Translation  Translation from assembly language into machine language is done by a type of compiler called an assembler Level L1 ADD Level L

How Assemblers Use Variables Program without variables 00: Add mem cells 04 and 06 02: Halt 04: : 0008 Program with variables Add mem cells X and Y Halt X: 0005 Y: 0008  Adding a line to this program will require updating the memory cells used in line 04 and 06  Adding a line to this program will not require updating any memory cell references

Low Level vs. High Level Languages Low Level Languages  One-to-one translation  Easy to translate  Programs are long  Machine dependent High Level Languages  One high level line translates into several lower level lines  A 5-line L3 program might translate into a 50-line L0 program  Harder to translate  Translation often requires looking at the meaning of several lines of code rather than just performing a simple substitution  Programs are much shorter  Machine Independent  Programs written in a high level language can be moved to a different machine architecture and will still work

High Level Languages  Level L2:  Uses sentences to 1) say what you want to do and 2) explain how to do it  Ex: C, C++, Java, Basic, Pascal, Fortran, COBOL, php  Level L3:  Uses sentences to say what you want to do  Ex: SQL, *Prolog  Level L4:  Natural language  Ex: English, Spanish, Pictures * note: many references classify Prolog as Level L4 language

High Level Language Comparison Level L4 Print the last name of all customers whose balance is above 100 Level L3 SELECT LastName FROM Customer WHERE Balance > 100 Level L2 try { in = new Scanner(new FileReader(“customer.txt”); while (in.hasNext()) { name = in.next(); balance = in.nextInt(); if (balance > 100) System.out.println(name); } … Requires some knowledge of the data file structure Requires no knowledge of the data file structure Requires a lot of knowledge of the data file structure English SQL Java

Generations of Languages 1 st 2 nd 3 rd 4 th 5 th Machine Language Machine Language Assembly Language Assembly Language Easier for humans to read Natural Language Natural Language generationgenerationgenerationgenerationgeneration Easier to translate to machine language Software Development Language Software Development Language Problem Solving Language Problem Solving Language Low Level Languages High Level Languages

Architecture  The set of “items” that can be seen and directly used at any particular level  Includes things like how much memory is available  Does not include things like what kind of technology is used to implement the memory  Levels of architecture  Defines different sets of items with which to work  High levels of architecture “hide” the low level items  Makes the entire system easier to work with

Architecture Levels – L0  Digital logic level (digital systems course)  AND, OR, and NOT gates  These gates are assembled to create larger circuits (which can be packaged into a single chip)  Arithmetic Circuits, Counters, Multiplexers, Encoders, etc.  Memory  Flip-flops  hold 1 bit of information each  Registers  a combination of several flip-flops working together to store multiple bits  Ex: A 32-bit register = a combination of 32 flip-flops where each store a single bit at the same time

Architecture Levels – L1  Microarchitecture level (architecture course)  ALU (arithmetic logic unit)  A chip capable of performing arithmetic and logic operations  Programming involves using binary numbers to select an operation  Ex: 2-wires (input to the ALU) used to select an operation to perform 00 = ADD01 = SUB10 = MUL11 = DIV  Registers  Memory cells to hold commands and data

Architecture Levels – L1 (cont)  Data Path  The path that data follows when flowing from circuit to circuit  Often forms a complete circle  Programming involves using binary numbers to:  Turn on some circuit outputs while turning off others This allows data to flow out of some circuits while blocking the flow of data from others  Turn on some circuit inputs while turning off others This allows data to be stored into some circuits, while preventing it from being stored in others

Architecture Levels – L1 (cont)  Microprogram (possibly)  A program which controls the ALU, data path and registers to make them work properly  Usually embedded in a ROM (read only memory) chip  In a special purpose computer (ex: a microwave), this is the only program that the computer ever executes  In this computer, a RAM chip would be used to hold data needed by the program, such as user inputer  In a general purpose computer (ex: a PC), this program is an interpreter  Interpreter = a program which fetches, decodes, and executes instructions from a higher level language  This interpreter is what allows the PC to execute different programs  In this computer, a RAM chip holds both a program to be executed and the data the program needs

Architecture Levels – L2  ISA level (Instruction Set Architecture) (architecture/assembly language courses)  Machine Language Level  Registers  Memory cells to hold commands and data  A different set, and by different names, than the ones from L1  ALU

Architecture Levels – Higher Levels  Level 3: Operating System level (operating systems course)  Combination of level 2 + some new instructions  Usually has a different memory organization  Ability to execute two concurrent programs  Level 4: Assembly Language level (assembly language course)  Level 5: High Level Languages (traditional programming courses)

von Neumann Architecture Memory Control Unit Arithmetic Logic Unit Input Output

Omnibus Architecture CPU Memory Console Tape I/O  Bus: a collection of parallel wires connecting various computer components