Intro to CS: stored program concept. Panos Hilaris

Similar documents
CPU Organisation and Operation

(Refer Slide Time: 00:01:16 min)

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Administrative Issues

Let s put together a Manual Processor

CHAPTER 7: The CPU and Memory

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

MICROPROCESSOR AND MICROCOMPUTER BASICS

Central Processing Unit (CPU)

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

Computer organization

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

CPU Organization and Assembly Language

CHAPTER 1 ENGINEERING PROBLEM SOLVING. Copyright 2013 Pearson Education, Inc.

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

Notes on Assembly Language

Levels of Programming Languages. Gerald Penn CSC 324

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement

LSN 2 Computer Processors

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Instruction Set Architecture (ISA)

Unit A451: Computer systems and programming. Section 2: Computing Hardware 1/5: Central Processing Unit

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Central Processing Unit

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

TYPES OF COMPUTERS AND THEIR PARTS MULTIPLE CHOICE QUESTIONS

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

İSTANBUL AYDIN UNIVERSITY

MACHINE ARCHITECTURE & LANGUAGE

Operating System Overview. Otto J. Anshus

Microprocessor & Assembly Language

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

1 Classical Universal Computer 3

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

PROBLEMS. which was discussed in Section

CHAPTER 4 MARIE: An Introduction to a Simple Computer

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

Copyright 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

1 Computer hardware. Peripheral Bus device "B" Peripheral device. controller. Memory. Central Processing Unit (CPU)

Computer Systems Structure Main Memory Organization

AC : A PROCESSOR DESIGN PROJECT FOR A FIRST COURSE IN COMPUTER ORGANIZATION

Fundamentals of Programming and Software Development Lesson Objectives

Summary of the MARIE Assembly Language

1/20/2016 INTRODUCTION

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

OAMulator. Online One Address Machine emulator and OAMPL compiler.

Introducción. Diseño de sistemas digitales.1

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

1 PERSONAL COMPUTERS

An Overview of Stack Architecture and the PSC 1000 Microprocessor

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Chapter 2 Logic Gates and Introduction to Computer Architecture

Computer Organization. and Instruction Execution. August 22

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

BASIC COMPUTER ORGANIZATION AND DESIGN

TEACHING COMPUTER ARCHITECTURE THROUGH SIMULATION (A BRIEF EVALUATION OF CPU SIMULATORS) *

Python Programming: An Introduction to Computer Science

OVERVIEW OF MICROPROCESSORS

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Python Programming: An Introduction to Computer Science

Computer Architecture Basics

Programming Logic controllers

Systems I: Computer Organization and Architecture

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

On Demand Loading of Code in MMUless Embedded System

ARM Assembly Language Programming - Chapter 1 - First Concepts

MULTIPLE CHOICE FREE RESPONSE QUESTIONS

CS 51 Intro to CS. Art Lee. September 2, 2014

Chapter 1 Computer System Overview

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Exploring Computer Science A Freshman Orientation and Exploratory Course

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

Instruction Set Design

TIMING DIAGRAM O 8085

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

Computer Organization

Objectives. Python Programming: An Introduction to Computer Science. Lab 01. What we ll learn in this class

ARM Microprocessor and ARM-Based Microcontrollers

Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. CIV 112 Computer Programming Lecture Notes (1)

Chapter 1 Fundamentals of Java Programming

The Central Processing Unit:

Traditional IBM Mainframe Operating Principles

Chapter 1. The largest computers, used mainly for research, are called a. microcomputers. b. maxicomputers. c. supercomputers. d. mainframe computers.

EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program

COMPUTER ORGANIZATION AND ARCHITECTURE. Slides Courtesy of Carl Hamacher, Computer Organization, Fifth edition,mcgrawhill

A3 Computer Architecture

UNIT 2 CLASSIFICATION OF PARALLEL COMPUTERS

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

Transcription:

Intro to CS: stored program concept Panos Hilaris

Intro to CS: stored program concept 1 Stored program concept John von Neumann s idea: Store programs, together with data, in the memory of the computer. Memory contains: (a) instructions, (b) data. Conceptually, programs and data seem very different. In fact the first computers, distinguished between them and stored them in different places. Another point of view: Treat programs as data.

Intro to CS: stored program concept 2 Inside hardware The two hardware parts, that are inside the computer: Processor or CPU (Central Processing Unit) Main memory (RAM: Random Access Memory) (Remember: the other part is input/ouput devices)

Intro to CS: stored program concept 3 Components of CPU/memory arithmetic and logic unit (ALU): circuitry for arithmetic and logic operations (here the real work is done) control unit (CU): responsible for running programs (here the book-keeping job is done) Fetch next instruction Decode instruction Execute instruction (activate relevant circuitry in ALU) registers (in ALU and CU): hold data for use by arithmetic and logical operations bus: wires connecting CPU and main memory

Intro to CS: stored program concept 4 Review question What is the difference between a computer and a calculator?

Intro to CS: stored program concept 5 Review question What is the difference between a computer and a calculator? Answer: The computer is programmable, and this is achieved through the control unit. The control unit is responsible for running programs from memory.

Intro to CS: stored program concept 6 Machine language Most programmmers write their programs in a high-level programming language, like Java, C, C++, Ada, Pascal, etc. However, the CPU does not understand these languages. The CPU has its own machine language, which tells it what circuitry to activate to do some operation. Compilers and interpreters translate from high-level language to machine language.

Intro to CS: stored program concept 7 Example of high-level instruction x := y + z (a simple addition) x, y, z are variables, i.e., positions (or addresses) in memory with a specific name, to which the programmer can refer. For example, let s say x is at the 100th position in memory, y at the 237th and z at the 17th.

Intro to CS: stored program concept 8 Corresponding machine language instructions (4 instructions in a typical computer) obtain first value (y) from memory obtain second value (z) from memory add two values in ALU store result in memory (at x)

Intro to CS: stored program concept 9 Corresponding machine language instructions LOAD RegA, 237 LOAD RegB, 17 ADD RegA, RegB, RegC STORE RegC, 100

Intro to CS: stored program concept 10 Corresponding machine language instructions In fact, a bunch of zeros and ones!

Intro to CS: stored program concept 11 Control unit registers The control unit has two special registers: program counter (PC): contains the address (in binary) in main memory of the next instruction instruction register (IR): contains the instruction (in binary) that is currently being executed

Intro to CS: stored program concept 12 Fetch-decode-execute cycle (1) Fetch the instruction from the address in memory pointed by PC (Program Counter) and put it in IR (Instruction Register), then increment the Program Counter by one, so that it points to the next instruction. (2) Decode the binary sequence in IR to get the meaning of the instruction (what circuitry must be activated in ALU) (3) Execute the instruction (activate the relevant circuitry in ALU) and again and again...

Intro to CS: stored program concept 13 Execution of a program A program is executed by having the CU go over each of the instructions in the program sequentially. The cycle is executed for each instruction until the end of the program is reached. Sometimes a program can get out of this straight-line order, if it has a JUMP instruction. A JUMP instruction can force the CU execute an instruction which is different from the next instruction. JUMP instructions are the building block of loops.

Intro to CS: stored program concept 14 The power of the computer: A typical computer can do this fetch-decode-execute cycle millions of times per second, and without errors.