CPS 101 Introduction to Computational Science Wensheng Shen Department of Computational Science SUNY Brockport.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

The Fetch – Execute Cycle
Fetch Execute Cycle – In Detail -
Central Processing Unit
CS364 CH16 Control Unit Operation
Damian BrowneLuis PabonPedro Tovar The operation of a computer in executing a program consists of a sequence of Instruction Cycles, with one machine.
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
CSE115: Introduction to Computer Science I
Computer Systems. Computer System Components Computer Networks.
Computer Organization and Architecture Tutorial 2 Kenneth Lee.
The central processing unit and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers.
Basic Computer Organization, CPU L1 Prof. Sin-Min Lee Department of Computer Science.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
University of Texas Pan AmDr. John P. Abraham Information Technology Computer Architecture Dr. John P. Abraham.
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
The CPU Central Processing Unit. 2 Reminder - how it fits together processor (CPU) memory I/O devices bus.
Chapter 4 MARIE: An Introduction to a Simple Computer.
IAS By : Hajer Ahmed Mohammed. ENIAC - details Decimal (not binary) Its memory contained 20 accumulators of 10 digits. 10 vacuum tubes represented each.
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Fetch-execute cycle.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Machine Instructions.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
CSC 235 Computer Organization. Computer Organizaton ä Top_Level Structure ä The von-Neumann Machine ä Stack Machine ä Accumulator Machine ä Load/Store.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
1.4 Representation of data in computer systems Instructions.
Fetch-Execute Cycle Fetch the next instruction Decode Execute It.
Computer Systems Organization
Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
1 Chapter 2 Computer Evolution and Performance by Sameer Akram.
Jeremy R. Johnson William M. Mongan
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Lec 4-2 Five operations of the machine cycle Fetch- fetch the next program instruction from memory. (PC+1); instruction to IR Decode- decode the instruction.
Program to multiply 2 numbers 500-Input x 291-Store acc. as x 500-Input y 292-Store acc. as y 193-Load y in to acc. (0 on 1 st parse) 391-Add x to acc.
Little Man Computer Task 1 Last lesson you were asked to write a program to multiply two numbers together. The next slide has a working program to do this.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Computer Organization
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Computer Architecture
Computer Science 210 Computer Organization
Data Representation – Instructions
The fetch-execute cycle
The Processor and Machine Language
Functional Units.
Instruction and Control II
MARIE: An Introduction to a Simple Computer
Overview of Computer Architecture and Organization
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
8085 MICROPROCESSOR 8085 CPU Registers and Status Flags S Z AC P C A B
The Little Man Computer
BIC 10503: COMPUTER ARCHITECTURE
THE FETCH-EXECUTE CYCLE.
MARIE: An Introduction to a Simple Computer
MARIE: An Introduction to a Simple Computer
Program Execution.
CPU Structure and Function
Computer Evolution and Performance
THE FETCH-EXECUTE CYCLE.
Information Representation: Machine Instructions
Computer Architecture
COMPUTER ARCHITECTURE
Presentation transcript:

CPS 101 Introduction to Computational Science Wensheng Shen Department of Computational Science SUNY Brockport

Computer Instruction Sets Binary numbers Hexadecimal numbers Octal numbers Machine instructions

Binary numbers Base-2 number system, represents numeric values using two symbols, 0 and =

Hexadecimal numbers Base-16 number system, represents numeric values using 16 symbols, 0, 1, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, and f 100 = 6×

Octal numbers Base-8 number system, represents numeric values using 16 symbols, 0, 1, 3, 4, 5, 6, and = ×

Place-value system 908,305,688 =

Number conversion EB

The memory of the IAS consist of 1000 storage locations, call words, of 40 binary digits (bit) each. Both data and instructions are stored there. Hence, numbers must be represented in binary form, and each instruction also has to be a binary code. Each number is represented by a sign bit and a 39-bit value. A word may also contain two 20-bit instructions, with each instruction consisting of an 8-bit operation code (Op code) specifying the operation to be performed, and a 12-bit address designating one of the words in memory, number from 0 to Sign bit (a) Number word Left instruction Right instruction Op code AddressOpcodeAddress

IAS - details Set of registers (storage in CPU) Memory Buffer Register (MBR) Memory Address Register (MAR) Instruction Register (IR) Instruction Buffer Register (IBR) Program Counter (PC) Accumulator (AC) Multiplier Quotient (MQ)

Structure of IAS – detail Fetch cycle and Execution cycle, which taken together is the Instruction cycle. Program control unit (PCU)

IAS Instruction Set

How IAS Computer Adds Two Numbers Suppose the numbers are stored in memory locations 200 and 201, and The sum is to be saved in memory location 202 InstructionOpcodeDescription LOAD M(200) AC ← M(200) ADD M(201) AC ← AC+M(201) STOR M(202) M(202) ← AC

IAS Computer Instruction Code Load200Add201 Stor202

Storage in Memory First program word Second program word Word 200 Word 201 Word 202 Address Memory Program Counter, PC Address 0 Address max

IAS Instruction Cycles Place the starting address in program counter (PC). Start program: MAR ← PC Read memory: IBR ← MBR ← M(MAR), fetch cycle Place left instruction in IR and address 200 in MAR Read memory: AC ← M(200), fetch cycle Place right instruction in IR and address 201 in MAR Read memory and add: AC ← AC + M(201), execution cycle PC ← PC + 1

IAS Instruction Cycles (Cont.) MAR ← PC Read memory: IBR ← MBR ← M(MAR), fetch cycle Place left instruction in IR and address 202 in MAR MBR ← AC Write memory