Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS270 Computer Organization

Similar presentations


Presentation on theme: "CS270 Computer Organization"— Presentation transcript:

1 CS270 Computer Organization
Slides based on G. T. Byrd, NCState, © McGraw-Hill, With modifications/additions by CSU Faculty

2 To answer the questions How? and Why?
Why are you here? To answer the questions How? and Why? Then use that information to write better code So far you have learned to write code but not how that code actually controls a computer or how a computer works. Answering these questions is generally what this class is going to cover

3 Who am I Phil Sharp Masters in Computer Science
CS270 student in Fall 16 The TAs GTAs Zara, Pooria TAs Kacey, Elinor, Nathan, Ryan

4 What is the output of the C code fragment shown below?
CS160 - Intro CS160 - Intro What is the output of the C code fragment shown below? hello 2 0x1a 5.68 Hello 2 0x1a 5.68 Hello 50 0x1a 5.68 Hello 2 0x Hello 2 0x1A 5.67 char *s = “Hello”; char c = 50; int x = 26; float f = ; printf(“%s %c 0x%02x %.2f\n”, s, c, x, f); Answer is B), Hello is capitalized, ASCII 50 is 2, 26 is 0x1a (not 0x1A), and %.2f rounds not truncates. 4

5 Lecture Goals Review course logistics Introduce key concepts
Assignments & quizzes Policies Organization Grading Criteria Introduce key concepts Role of Abstraction Software versus Hardware Universal Computing Devices Layered Model of Computing

6 Logistics Lectures: See syllabus Staff: See syllabus
Recitations: See syllabus Help desks: See Piazza Office hours: See syllabus Materials on the website: Piazza: access through Canvas, or directly

7 Policies Grading Criteria Late Policy Academic Integrity
Assignments (20%) Recitations (10%) Quizzes and iClicker (10%) Two Midterm Exams (20% each) Final Exam (20%) Late Policy Two days on assignments Academic Integrity Do your own work Cannot copy and paste any code, unless provided by us Not sequential, we will start on C programming right away!

8 Assignments & Quizzes Assignments Quizzes
Posted on Progress page of the course website Programming (C, LC-3) or Logisim circuit designs See Canvas for due dates Submit via Checkin before 11:59 PM (unless otherwise specified). Late period for assignments – two days, 20% deduction Quizzes Can be on-line (canvas) or in-class (using iClicker) iClicker quizzes will be randomly assigned and used for attendance iClicker practice quiz next class period (no points)

9 Worksheets Worksheets Worksheets will be done as part of the lecture
Can work with your neighbors No points for now Questions may appear on tests We will go over worksheets at the beginning on the following class period Great way to test your understanding of the material Bring a laptop to lookup material Questions could appear on a test

10 Attendance ~6 iClicker attendance quizzes throughout the semester
Random dates One freebie Always bring your iClicker iClicker practice on Thursday

11 Organization C programming Instruction set architecture
data types, language syntax, variables and operators, control structures, functions, pointers and arrays, memory model, recursion, I/O, data structures Instruction set architecture machine/assembly code, instruction formats, branching and control, LC-3 programming, subroutines, memory model (stack) Computer hardware numbers and bits, transistors, gates, digital logic, state machines, von Neumann model, instruction sets, LC-3 architecture Not sequential, we aill start on C programming right away!

12 Top Down Perspective Multilayered view We will see
Higher layers serves as the specification. Lower layer implements provides the implementation We will see How a higher level language (C) is implemented by a processor instruction-set architecture (ISA), LC-3 in our case How an ISA is implemented using digital circuits? How are digital circuits implemented using transistors? And so on … Not sequential, we aill start on C programming right away!

13 Grading Criteria Letter Grade Points A ≥90% B ≥80% C ≥70% D ≥60% We will not cut higher than this, but we may cut lower. Your average score on exams must be ≥65% to receive a passing grade in this course. Solutions to the odd number problems are given on the class website.

14 How to be successful in this class
Read the textbook It takes multiple passes to understand new material Attend all classes and recitations. Random iClicker attendance quizzes Take the in-class and on-line quizzes as required. Do the worksheets Do all the assignments yourself Ask questions (early! (but not too early!)) if you run into trouble. Take advantage of lab sessions where help is available from TAs Try to do it yourself first, too much help can be harmful. Solutions to the odd number problems are given on the class website.

15 Textbook Introduction to Computing Systems: From Bits and Gates to C and Beyond 2nd Edition Yale N. Patt and Sanjay J. Patel

16 Other Resources Computer Organization and Design by David Patterson, John Hennessy C Programming Language by Dennis Ritchie, Brian Kernighan MIT Open Courseware 6.004 Introduction to the Theory of Computation by Michael Sipser

17 CS160 - Intro CS160 - Intro What are the binary and hexadecimal equivalents of the decimal number 137, assuming 8-bit precision, unsigned? , 0x83 , 0x85 , 0x87 , 0x89 None of the above Correct answer is D) 17

18 Chapter 1 Welcome Aboard

19 Two Recurring Themes Abstraction Hardware vs. Software
Productivity enhancer – don’t need to worry about details… Can drive a car without knowing how the internal combustion engine works. …until something goes wrong! Where’s the dipstick? What’s a spark plug? Important to understand the components and how they work together. Hardware vs. Software It’s not either/or – both are components of a computer system. Even if you specialize in one, you should understand capabilities and limitations of both.

20 Big Idea #1: Universal Computing Device
All computers, given enough time and memory, are capable of computing exactly the same things. = = PDA Workstation Supercomputer

21 Classes of Automata

22 Tadd Tmul Turing Machine
Mathematical model of a device that can perform any computation – Alan Turing (1937) ability to read/write symbols on an infinite “tape” state transitions, based on current state and symbol Every computation can be performed by some Turing machine. (Turing’s thesis) Tadd a,b a+b Turing machine that adds Tmul a,b ab Turing machine that multiplies For more info about Turing machines, see For more about Alan Turing, see

23 Universal Turing Machine
A machine that can implement all Turing machines -- this is also a Turing machine! inputs: data, plus a description of computation (other TMs) U a,b,c c(a+b) Universal Turing Machine Tadd, Tmul U is programmable – so is a computer! instructions are part of the input data a computer can emulate a Universal Turing Machine A computer is a universal computing device.

24 From Theory to Practice
In theory, computer can compute anything that’s possible to compute halting problem computable/decidable? given enough memory and time In practice, solving problems involves computing under constraints. time weather forecast, next frame of animation, ... cost cell phone, automotive engine controller, ... power cell phone, handheld video game, ...

25 Big Idea #2: Transformations Between Layers
Problems Algorithms Language Instruction Set Architecture Microarchitecture Digital Circuits Devices

26 How do we solve a problem using a computer?
A systematic sequence of transformations between layers of abstraction. Problem Software Design: choose algorithms and data structures Algorithm Programming: use language to express design Program Compiling/Interpreting: convert language to machine instructions Instr Set Architecture

27 Deeper and Deeper… Processor Design:
Instr Set Architecture Processor Design: choose structures to implement ISA Microarch Logic/Circuit Design: gates and low-level circuits to implement components DigCircuits Process Engineering & Fabrication: develop and manufacture lowest-level components Devices

28 Descriptions of Each Level
Problem Statement stated using "natural language" may be ambiguous, imprecise Algorithm step-by-step procedure, guaranteed to finish definiteness, effective computability, finiteness Program express the algorithm using a computer language high-level language, low-level language Instruction Set Architecture (ISA) specifies the set of instructions the processor (CPU) can perform data types, addressing mode Time flies like an arrow

29 Descriptions of Each Level (cont.)
Microarchitecture detailed organization of a processor implementation different implementations of a single ISA Logic Circuits combine basic operations to realize microarchitecture many different ways to implement a single function (e.g., addition) Devices properties of materials, manufacturability Examples of problems that span layers: CMU Computer Architecture Intro Lecture

30 Many Choices at Each Level
Solve a system of equations Gaussian elimination Jacobi iteration Red-black SOR Multigrid FORTRAN C C++ Java Intel x86 PowerPC ARM Centrino Pentium 4 Core Ripple-carry adder Carry-lookahead adder CMOS Bipolar GaAs Tradeoffs: cost performance power (etc.) Sun and Java are trademarks of Sun Microsystems, Inc. Intel, Pentium, Centrino, and Xeon are trademarks of Intel Corporation. AMD and Athlon and trademarks of Advanced Micro Devices, Inc. Atmel and AVR are registered trademarks of Atmel Corporation. PowerPC is a trademark of International Business Machines Corporation.

31 Course Outline Computer systems: what is next? Bits and Bytes
How do we represent information? C Programming How do we write programs in C? How do we implement high-level programming constructs? Instruction set architecture/Assembly language What operations (instructions) will we implement? How do we use processor instructions to implement algorithms? How do we write modular, reusable code? (subroutines) I/O, Traps, and Interrupts: How does processor communicate with outside world? Digital Logic and processor architecture How do we build circuits to process and store information? How do we build a processor out of logic elements? Computer systems: what is next?


Download ppt "CS270 Computer Organization"

Similar presentations


Ads by Google