Snick  snack A Working Computer Slides based on work by Bob Woodham and others.

Slides:



Advertisements
Similar presentations
Chapter 1 An Overview of Computers and Programming Languages.
Advertisements

Overview of Programming and Problem Solving ROBERT REAVES.
1/1/ /e/e eindhoven university of technology Microprocessor Design Course 5Z008 Dr.ir. A.C. (Ad) Verschueren Eindhoven University of Technology Section.
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
The Binary Machine Modern high-level programming languages are designed to make programming easier. On the other end, the low level, all modern digital.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
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.
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
More Basics of CPU Design Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510, Section 2.
Chapter 1 Introduction. Computer Architecture selecting and interconnecting hardware components to create computers that meet functional, performance.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
Topics Introduction Hardware and Software How Computers Store Data
WHAT IS THIS? OBJECTIVE AND OUTCOMES Candidates should be able to: Describe and explain the CPU as fetching, decoding and executing of instructions and.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Cosc 2150: Computer Organization
Computer Systems Organization CS 1428 Foundations of Computer Science.
IT253: Computer Organization Lecture 10: Making a Processor: Control Signals Tonga Institute of Higher Education.
How Computers Work … and how you can work them. Art 315 Lecture 03 Dr. J Parker Fall 2010.
Overview of Programming and Problem Solving Textbook Chapter 1 1.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
The Nature of Computing INEL 4206 – Microprocessors Lecture 2 Bienvenido Vélez Ph. D. School of Engineering University of Puerto Rico - Mayagüez.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Stored Programs In today’s lesson, we will look at: what we mean by a stored program computer how computers store and run programs what we mean by the.
INTRO TO COMPUTING. Looking Inside Computer 2Computing 2 | Lecture-1 Capabilities Can Read Can Write Can Store A/L Operations Automation.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
How To Program An Overview Or A Reframing of the Question of Programming.
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.
Georgia Institute of Technology Speed part 1 Barb Ericson Georgia Institute of Technology May 2006.
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.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Chapter 1 An Overview of Computers and Programming Languages.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Representation of Data - Instructions Start of the lesson: Open this PowerPoint from the A451 page – Representation of Data/ Instructions How confident.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Software Engineering Algorithms, Compilers, & Lifecycle.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
23/07/2016CSE1303 Part B lecture notes 1 Introduction to computer systems Lecture B01 Lecture notes section B01.
Topic 2: Hardware and Software
Introduction to Computers and C++ Programming
Basic Computer Organization and Design
Topics Introduction Hardware and Software How Computers Store Data
Key Ideas from day 1 slides
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Chapter 1: An Overview of Computers and Programming Languages
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
Morgan Kaufmann Publishers
Introduction to Computer Programming
Topics Introduction Hardware and Software How Computers Store Data
Class 2.
Random access memory Sequential circuits all depend upon the presence of memory. A flip-flop can store one bit of information. A register can store a single.
ICT Gaming Lesson 2.
Dr. Clincy Professor of CS
Presentation transcript:

snick  snack A Working Computer Slides based on work by Bob Woodham and others

Learning Goals: In-Class By the end of this unit, mostly from the lab, you should be able to: –Trace execution of an instruction through our computer, in particular: Follow the basic fetch-decode-execute instruction cycle. Given appropriate documentation, a particular instruction, and a part of the computer to focus on, explain how that part executes its function on the instruction all the way down to wires and gates. 2

Where We Are in The Big Stories Theory How do we model computational systems? Now: Not really a theory show… Hardware How do we build devices to compute? Now: Done! A full working computer! 3

Computer Strategy Instead of a new DFA circuit for each problem: 1.Make a DFA with “instructions” as input. 2.Design a set of instructions that combine to solve many problems 3.Solve new tasks with new arrangements of instructions, not a new circuit. With appropriate instructions, this design is “universal”: it can perform any conceivable computation. (We won’t prove this, but we will see it implement basic Java/Racket instructions!)

A “Normal” DFA as a Sequential Circuit DFA with a bunch of states and with output on arcs Sequence of inputs Sequence of outputs clk

Ultra-High-Level CPU View: Fetch, Decode, Execute Cycle, as DFA DFA with LOTS of states and output on arcs Sequence of outputs clk A stored-program computer includes data and code in its memory. Load memory with code/data and start the machine, and it “acts out” its program. Load new code/data, and restart, and it “acts out” a totally different program! A stored-program computer can simulate any other computer that we can now practically or theoretically envision!

Ultra-High-Level CPU View: Fetch, Decode, Execute Cycle FetchDecodeExecute next instruction from memory “dissect” instruction into relevant pieces; route information from one part of the computer to another perform computations determine next instruction’s address

CPSC 121’s “circuits story” From the bottom up... we can build digital logic in physical devices (remember the water computers and switches?) we can use logic gates to organize our digital circuits we can organize logic gates into combinational circuits that calculate any logical function of their inputs (any truth table) we can use feedback to create sequential circuits that remember values and act on events we can implement any DFA using a sequential circuit we can build a working computer: a DFA with configurable memory that determines its own next instruction, which can perform any conceivable computation Wow! Too bad it’s a pain in the butt to program in our computer’s language! If only...

CPSC 110/111’s “programming story” From the top down: we can design algorithms to solve an enormous variety of computational problems we can encode those algorithms into programs in high-level programming languages compilers and interpreters can automatically transform those programs into low-level programming languages Any guesses what those low-level programming languages might look like? Here’s one we already saw...

Java Byte Code Part of our Java code: // Let's do something a hundred times. int i = 100; do { // Make i one smaller. i--; } while (i > 0); Here’s a typical “hex” view of ~1/5 th of the program’s byte code. 10

CPSC 110/111’s + 121’s Story... High-level languages all the way down to physical devices that compute. What’s left? HUGE TREMENDOUS AMAZING AMOUNTS OF STUFF: Software engineering: implementing incredibly complex systems as programs and helping programmers manage that complexity. Human-computer interaction: understanding how people work with computers and designing interfaces that are effective for them. Systems: building structures on top of the machine that knit computers together and let people and programs communicate and collaborate effectively. Artificial intelligence: recognizing, extracting, and acting on high-level patterns in complex and meaningful ways. Theory: analyzing the capabilities and limitations of computing systems to accomplish all of these tasks. Computer engineering: redesigning the machine to more efficiently (in terms of speed, power consumption, size, memory usage, etc.) execute programs. (And so on...)

A Sample Program (Racket) ;; Consumes a number n and ;; returns the sum of i from i=0 to n. (define (sum-to-n n) (cond [(= n 0) 0] [else (+ n (sum-to-n (- n 1)))])) ;; Consumes a number n and ;; returns the sum of i from i=0 to n. ;; "Tail recursive"; meaning the equivalent of a Java loop. (define (sum-to-n2 n result-so-far) (cond [(= n 0) result-so-far] [else (sum-to-n2 (- n 1) (+ n result-so-far))]))

A Sample Program (Java) /* Calculate the sum from 1 to n. n A non-negative number (limit of sum) the sum of i from i=1 to n */ public static int sumToN(int n) { int result = 0; while (n > 0) { result += n; n--; } return result; }

Learning Goals: In-Class By the end of this unit, mostly from the lab, you should be able to: –Trace execution of an instruction through our computer, in particular: Follow the basic fetch-decode-execute instruction cycle. Given appropriate documentation, a particular instruction, and a part of the computer to focus on, explain how that part executes its function on the instruction all the way down to wires and gates. 14

snick  snack Extra Slides