Computer Science 101 Computer Systems Organization Machine Language Examples Entire machine.

Slides:



Advertisements
Similar presentations
The Fetch – Execute Cycle
Advertisements

Central Processing Unit
Slide 4-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 4 Computer Organization.
The Von Neumann Architecture Odds and Ends
Execution of an instruction
CHAPTER 5 COMPUTER SYSTEMS ORGANIZATION. REMEMBER... Computer science is the study of algorithms including * Their formal and mathematical properties---
Chapter 6 In introduction to System Software and Virtual Machine ***Assembly Language.
CHAPTER 5 COMPUTER SYSTEMS ORGANIZATION. REMEMBER... Computer science is the study of algorithms including * Their formal and mathematical properties---
The Von Neumann Architecture
10/18/2005Comp 120 Fall October Questions? Instruction Execution.
ALU. ALU: Tasks performed in the control states OperationState addDecode op, op=add/sub/and/or/xor. Alu addAluI rel, rel=lt, eq, gt, le, ge, ne. TestI.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Computer Science 210 Computer Organization The Instruction Execution Cycle.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
计算机科学概述 Introduction to Computer Science 陆嘉恒 中国人民大学 信息学院
Computer Science 210 Computer Organization The von Neumann Architecture.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 4 The Von Neumann Model Basic components Instruction processing.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Computer Science 101 How the Assembler Works. Assembly Language Programming.
Chapter 4 The Von Neumann Model
Chapter 5: Computer Systems Organization Invitation to Computer Science, C++ Version, Third Edition.
The von Neumann Model – Chapter 4
Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.
Invitation to Computer Science 6th Edition Chapter 5 Computer Systems Organization.
Computer Science/Ch. 5 System Softwares 5-1 Chapter 5 System Softwares.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
The structure COMPUTER ARCHITECTURE – The elementary educational computer.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
Fetch-execute cycle.
CMSC 150 PROGRAM EXECUTION CS 150: Wed 1 Feb 2012.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
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.
Computer Systems Organization
Dale & Lewis Chapter 5 Computing components
Chapter 5: Computer Systems Organization Invitation to Computer Science,
Jeremy R. Johnson William M. Mongan
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
Chapter 4 The Von Neumann Model
Five Execution Steps Instruction Fetch
Computer Organization and Architecture
Chapter 4 The Von Neumann Model
Computer Science 210 Computer Organization
The Processor and Machine Language
Chapter 4 The Von Neumann Model
CS/COE0447 Computer Organization & Assembly Language
Computer Science 210 Computer Organization
Functional Units.
Design of the Control Unit for One-cycle Instruction Execution
Topic 6 LC-3.
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
The Little Man Computer
PZ01C - Machine architecture
Sequencing, Selection, and Loops in Machine Language
Multicycle Approach We will be reusing functional units
COMPUTER SYSTEMS ORGANIZATION
The Von Neumann Architecture Odds and Ends
The Von Neumann Architecture
Multicycle Design.
The Stored Program Computer
Control Unit for Multiple Cycle Implementation
Program Execution.
Drawbacks of single cycle implementation
Basic components Instruction processing
Control Unit for Multiple Cycle Implementation
Computer Architecture
CPSC 171 Introduction to Computer Science
Little Man Computer.
Presentation transcript:

Computer Science 101 Computer Systems Organization Machine Language Examples Entire machine

Hypothetical Lab Machine MemoryALUControl MAR(12)MDR(16) 16 ALU R(16) PC(12)IR(16) +1 GTEQLT

Hypothetical Machine Instructions Opcode Operation Meaning Opcode Operation Meaning 0000 Load X Con(X)  R 0000 Load X Con(X)  R 0001 Store X R  Con(X) 0001 Store X R  Con(X) 0010 Clear X 0  Con(X) 0010 Clear X 0  Con(X) 0011 Add X R+Con(X)  R 0011 Add X R+Con(X)  R 0100 Increment X Con(X)+1  Con(X) 0100 Increment X Con(X)+1  Con(X) 0101 Subtract X R-Con(X)  R 0101 Subtract X R-Con(X)  R 0110 Decrement X Con(X)-1  Con(X) 0110 Decrement X Con(X)-1  Con(X)

Hypothetical Machine Instructions Opcode Operation Meaning Opcode Operation Meaning 0111 Compare X If Con(X) > R CC: 100,etc Compare X If Con(X) > R CC: 100,etc Jump X X  PC 1000 Jump X X  PC 1001 JumpGT X If GT=1, X  PC 1001 JumpGT X If GT=1, X  PC 1010 JumpEQ X If EQ=1, X  PC 1010 JumpEQ X If EQ=1, X  PC 1011 JumpLT X If LT=1, X  PC 1011 JumpLT X If LT=1, X  PC 1100 JumpNE X If EQ=0, X  PC 1100 JumpNE X If EQ=0, X  PC

Hypothetical Machine Instructions Opcode Operation Meaning Opcode Operation Meaning 1101 In X Input value  Con(X) 1101 In X Input value  Con(X) 1110 Out X Con(X)  Output value 1110 Out X Con(X)  Output value 1111 Halt Stop execution 1111 Halt Stop execution

Machine Language: Con(5)+Con(6)  Con(7) 0: : : : : : : : R:R: Load Add Store Halt Python: c = a + b

Micro Steps: Fetch and Decode Phases Fetch Phase PC  MAR Fetch MDR  IR PC+1  PCDecode IR op  ALU MUX MemoryALUControl MAR(12) MDR(16) 16 ALU R(16) PC(12)IR(16) +1

Micro Steps: Execution of Load and Store Load X IR add  MAR Fetch MDR  R Store X IR add  MAR R  MDR Store MemoryALUControl MAR(12) MDR(16) 16 ALU R(16) PC(12)IR(16) +1

Micro Steps: Execution of Add and Jump Add X IR add  MAR Fetch MDR  ALU R  ALU Add ALU  R Jump X IR add  PC MemoryALUControl MAR(12) MDR(16) 16 ALU R(16) PC(12)IR(16) +1

Micro Steps: Execution of Compare and JumpGT Compare X IR add  MAR Fetch MDR  ALU R  ALU Subtract (set CC)JumpGT If GT=1 IR add  PC MemoryALUControl MAR(12) MDR(16) 16 ALU R(16) PC(12)IR(16) +1