Fall 20041R. Smith - University of St Thomas - Minnesota Extending the Spreadsheet to Illustrate Basic CPU Operations in a Computer Literacy Course Richard.

Slides:



Advertisements
Similar presentations
June 20071R. Smith - University of St Thomas - Minnesota A spreadsheet-based simulation of CPU instruction execution R. E. Smith Computer & Computational.
Advertisements

Chapter 2: Data Manipulation
Von Neumann Architectures and the PDP-8
The “Little Man Computer” Version
11-instruction CPU with 2 12 (4096) 16-bit RAM. Illustrates how a general-purpose computer is assembled from gates and registers. The design is simplified.
Stored Program Architecture
Instruction Set Design
Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 Some sldes are adapted from.
CSC 3210 Computer Organization and Programming Introduction and Overview Dr. Anu Bourgeois.
The Little man computer
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
Low-Level Programming Languages
Stored Program Concept: The Hardware View
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Chapter 7 Low-Level Programming Languages Nell Dale John Lewis.
Basic Computer Organization, CPU L1 Prof. Sin-Min Lee Department of Computer Science.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
March R. Smith - University of St Thomas - Minnesota Today’s Class What makes a computer a computer?What makes a computer a computer? Course objectives,
Introduction to computer: executes instructions. Overview Topics discussed in this webnote: –Structure and operation of the CPU –Program flow –Types of.
Assembly & Machine Languages
Computer Science 210 Computer Organization The Instruction Execution Cycle.
CPS120: Introduction to Computer Science
Information Representation: Machine Instructions
Computer Systems Organization CS 1428 Foundations of Computer Science.
Computer Architecture and the Fetch-Execute Cycle
Computer Architecture and the Fetch-Execute Cycle
The Central Processing Unit (CPU) and the Machine Cycle.
Computer Operations A computer is a programmable electronic device that can store, retrieve, and process data Data and instructions to manipulate the data.
CMSC 150 PROGRAM EXECUTION CS 150: Wed 1 Feb 2012.
Exam Format  105 Total Points  25 Points Short Answer  20 Points Fill in the Blank  15 Points T/F  45 Points Multiple Choice  The above are approximations.
Lecture 7: 9/17/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Chapter 7 Low-Level Programming Languages (slides modified by Erin Chambers)
Computer Architecture Lecture 03 Fasih ur Rehman.
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,
12/13/ _01 1 Computer Organization EEC-213 Computer Organization Electrical and Computer Engineering.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CS 1308 Exam 2 Review. Exam Format 110 Total Points 24 Points Short Answer 28 Points Fill in the Blank 16 Points T/F 36 Points Multiple Choice The above.
March R. Smith - University of St Thomas - Minnesota ENGR 330: Today’s Class Connecting Hardware to InstructionsConnecting Hardware to Instructions.
Jeremy R. Johnson William M. Mongan
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Mastering LMC Coding Part #1 Introduction to Low Level Languages Introduction to Little Man computer Simple examples (demos) with video tutorials included.
Software Design and Development Computer Architecture Computing Science.
F453 Module 8: Low Level Languages 8.1: Use of Computer Architecture.
OCR GCSE Computer Science Teaching and Learning Resources
CS 270: Mathematical Foundations of Computer Science
Immediate Addressing Mode
Computer Science 210 Computer Organization
The Processor and Machine Language
CS 1308 Exam 2 Review.
Figure 8.1 Architecture of a Simple Computer System.
Computer Science 210 Computer Organization
Figure 8.1 Architecture of a Simple Computer System.
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
Processor Organization and Architecture
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
Computer Architecture and the Fetch-Execute Cycle
Sequencing, Selection, and Loops in Machine Language
Computer Architecture
Processor Fundamentals
MARIE: An Introduction to a Simple Computer
Program Execution.
Course Outline for Computer Architecture
A Top-Level View Of Computer Function And Interconnection
Information Representation: Machine Instructions
Computer Architecture Assembly Language
CS 1308 Exam 2 Review.
Presentation transcript:

Fall 20041R. Smith - University of St Thomas - Minnesota Extending the Spreadsheet to Illustrate Basic CPU Operations in a Computer Literacy Course Richard E. Smith, Ph.D. Department of Quantitative Methods and Computer Science University of St. Thomas This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit

Fall R. Smith - University of St Thomas - Minnesota The Problem How do we teach non-experts about the internals of the computers central processing unit (CPU)?How do we teach non-experts about the internals of the computers central processing unit (CPU)? Option: Dont botherOption: Dont bother Option: Use a software simulation programOption: Use a software simulation program Option: use the Excel-based Simple CPUOption: use the Excel-based Simple CPU

Fall R. Smith - University of St Thomas - Minnesota The Simple CPU Display

Fall R. Smith - University of St Thomas - Minnesota Operating Features RAM appears in Column A on the leftRAM appears in Column A on the left One-address instruction setOne-address instruction set –Some instructions refer to a single memory location –Calculations use a single accumulator register Each instruction requires two cyclesEach instruction requires two cycles –Fetch cycle – get the instruction thats to be executed –Execute cycle – perform the calculation or other action This cycle may fetch or store data in RAMThis cycle may fetch or store data in RAM Very Simple Instruction setVery Simple Instruction set –Three instructions refer to memory locations: Add, Store, Jump –Based on the TX-0 computer built in the 1950s

Fall R. Smith - University of St Thomas - Minnesota The TX-0 Not your grandfathers laptop.Not your grandfathers laptop. Transistor Experiment computer, version 0 –Built in by MITs Lincoln Laboratory Absurdly simple instruction set –Focus on testing the transistorized computer circuits –Easier to build, easier to test, easier to fix

Fall R. Smith - University of St Thomas - Minnesota A Simple CPU program In Assembly Language (text) format: 1.Clear 2.Add 5 3.Store 5 4.Jump (data) In Machine Language (numeric) format:

Fall R. Smith - University of St Thomas - Minnesota Concepts to Convey A program as a sequence of instructionsA program as a sequence of instructions Instructions in a highly coded formInstructions in a highly coded form Processor cyclesProcessor cycles CPU is separate from its RAMCPU is separate from its RAM

Fall R. Smith - University of St Thomas - Minnesota Use in Class Demonstrate on a projection display.Demonstrate on a projection display. Explain the notion of the processor cycle.Explain the notion of the processor cycle. Demonstrate a simple program.Demonstrate a simple program. Explain how to translate simple add-and- subtract calculations into the right sequence of add-invert-add, etc.Explain how to translate simple add-and- subtract calculations into the right sequence of add-invert-add, etc. Assignment to write their own programs in numeric form.Assignment to write their own programs in numeric form.

Fall R. Smith - University of St Thomas - Minnesota Final Points Integration into the spreadsheetIntegration into the spreadsheet –Relies on concepts the students learned in Excel training –Seems like a follow-on to Excel, not a major topic change –Easy to modify and extend for other classes, like computer architecture Simulator conveys concepts more effectivelySimulator conveys concepts more effectively –Pre-simulator training relied on rote learning of concepts with discussion but no hands-on work or live demonstrations –Simulator lets students demonstrate an understanding of machine level instructions by doing homework assignments –Success on CPU-oriented exam questions went from (estimate) 1 out of 3 to 7 out of 8.

Fall R. Smith - University of St Thomas - Minnesota Thank You! Questions? My contact information:My contact information: –Dr. Rick Smith –University of St. Thomas Getting the SimpleCPU Simulator:Getting the SimpleCPU Simulator: –Go to Google –Search for smith simple cpu demo

Fall R. Smith - University of St Thomas - Minnesota The Simple CPU Display

Fall R. Smith - University of St Thomas - Minnesota Future Work Extensions to simplify programmingExtensions to simplify programming –Add conditional jumps –Add an index register Make easier to modify and maintainMake easier to modify and maintain –Rearrange calculations to minimize reliance on memorized cell identities –Move critical functions into VBasic modules to improve readability Try using to teach computer architectureTry using to teach computer architecture –Extension to multiple cycles, multiple address modes –Modifications by students to prototype their own processors, instruction sets

Fall R. Smith - University of St Thomas - Minnesota Executing a Program First, reset the CPUFirst, reset the CPU –Program address (PC) starts at 1 –AC register starts at 0 Next, perform the Fetch cycleNext, perform the Fetch cycle –Calculate new values for the AC, PC, and IR in locations E3-E5, based on the contents of D5-E5 and data fetched from memory –At the end of the cycle, copy the new values of the AC, PC, and IR from cells E3-E5 to D3-D5. Finally, perform the Execute cycleFinally, perform the Execute cycle –Use the IR, Instruction, and Address cells (D5, D10, D11) to identify and execute the instruction –At the end of the cycle, copy the new values of the AC, PC, and IR from cells E3-E5 to D3-D5. –If storing a result in memory, do that, too. Start next instruction at the Fetch Cycle aboveStart next instruction at the Fetch Cycle above

Fall R. Smith - University of St Thomas - Minnesota Example: part of the ADD calculation Calculates the contents of the AC at the end of the Execute cycle (D4):Calculates the contents of the AC at the end of the Execute cycle (D4): =IF(D2,D3,=IF(D2,D3, –IF(D10=1,D3+D9, IF(D5=1,-D3,IF(D5=1,-D3, –IF(D5=2,0, D3))))D3)))) If its the Fetch cycle (D2 is TRUE), –leave the AC (D3) unchanged. Else if its an ADD instruction (D10=1) –Add the data from memory to the AC Else if its a Negate instruction (D5=1) –Negate the data in the AC Else if it a Clear instruction (D5=2) –Clear the data in the AC