Introduction to Computing Systems: From Bits and Gates to C and Beyond 2 nd Edition

Similar documents
Chapter 1 Welcome Aboard

CS270 Computer Organization Fall 2017

CMPSCI 201: Architecture and Assembly Language

Chapter 1 Welcome Aboard

Introduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison

Introduction to Computing Systems: From Bits and Gates to C and Beyond 2 nd Edition

Computer Organization + DIGITAL DESIGN

CMPE012 Computer Engineering 12 (and Lab) Computing Systems and Assembly Language Programming. Summer 2009

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Review Topics. parameter passing, memory model)

EECE 321: Computer Organization

CS61A Lecture 1. Amir Kamil UC Berkeley January 23, 2013

CPSC 213. Introduction to Computer Systems. About the Course. Course Policies. Reading. Introduction. Unit 0

Instructors. ECE 152 Introduction to Computer Architecture. Undergrad Teaching Assistants. Course Website. Textbook.

Announcements. 1. Forms to return today after class:

Lecture 1: Introduction to Digital Logic Design

Inf2C - Computer Systems Lecture 1 Course overview & the big picture

CPS104 Computer Organization Lecture 1. CPS104: Computer Organization. Meat of the Course. Robert Wagner

CPS104 Computer Organization Lecture 1

Welcome to CompSci 201

Welcome to CS 135 (Winter 2018)

Fundamentals of Digital System Design ECE 3700, CPSC 3700

CSE 240 Introduction to Computer Architecture

CS120 Computer Science I. Instructor: Jia Song

CPSC 213. Introduction to Computer Systems. Introduction. Unit 0

CSC Operating Systems Fall Lecture - I Introduction. Tevfik Ko!ar. Louisiana State University. August 25 th, Contact Information

Welcome to CS 241 Systems Programming at Illinois

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?

Introduction to Data Structures

Computer Architecture Lecture 2: Fundamental Concepts and ISA. Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/15/2014

Operating Systems CS 571

Lecture I: Introduction and Overview

CSc 2310 Principles of Programming (Java) Jyoti Islam

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE, Pilani Pilani Campus Instruction Division. SECOND SEMESTER Course Handout Part II

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I

C Programming for Engineers Introduction

CSE 240 Introduction to Computer Architecture

CS 241 Data Organization using C

ENCM 369 Winter 2019 Lab 6 for the Week of February 25

San José State University Computer Science Department CS49J, Section 3, Programming in Java, Fall 2015

Data Structures and Algorithms

Welcome to CS 135 (Fall 2018) Themes of the course. Lectures. cs135/

: Dimension. Lecturer: Barwick. Wednesday 03 February 2016

Review: Performance Latency vs. Throughput. Time (seconds/program) is performance measure Instructions Clock cycles Seconds.

COMP251: Algorithms and Data Structures. Jérôme Waldispühl School of Computer Science McGill University

School of Computer Science

Chapter 2. OS Overview

CS457/557 Functional Languages

CS 106B, Lecture 1 Introduction to C++

Compilers for Modern Architectures Course Syllabus, Spring 2015

CMSC 132: Object-Oriented Programming II. Administrivia

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

Welcome to MTH 308 A/B!! Principles of Numerical Computation / Numerical Analysis and Scientific Computing

Computer Organization & Assembly Language Programming (CSE 2312)

Welcome to CS 115 (Winter 2019)

EE282H: Computer Architecture and Organization. EE282H: Computer Architecture and Organization -- Course Overview

C Functions and Pointers. C Pointers. CS270 - Fall Colorado State University. CS270 - Fall Colorado State University

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

Welcome to. Instructor Marc Pomplun CS 470/670. Introduction to Artificial Intelligence 1/26/2016. Spring Selectivity in Complex Scenes

CS 241 Data Organization. August 21, 2018

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims

61A LECTURE 1 FUNCTIONS, VALUES. Steven Tang and Eric Tzeng June 24, 2013

The LC3's micro-coded controller ("useq") is nothing more than a finite-state machine (FSM). It has these inputs:

COMP3221: Microprocessors and. Embedded Systems

CSCI 2824, Discrete Structures Fall 2017 Tony Wong. Lecture 1: Introduction and Binary Arithmetic

CS415 Compilers Overview of the Course. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Announcements. Course syllabus Tutorial/lab signup form (due 4pm today) Lecture 1 notes Homework 1 Initial assessment

Introduction to Programming System Design CSCI 455x (4 Units)

a number of pencil-and-paper(-and-calculator) questions two Intel assembly programming questions

ECE 154A. Architecture. Dmitri Strukov

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

E40M. An Introduction to Making: What is EE?

14:332:331. Lecture 1

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

Introduction to Computer Systems

Instructor. ECE 152 Introduction to Computer Architecture. Course Website. Undergrad Teaching Assistants

CS61C Machine Structures. Lecture 1 Introduction. 8/27/2006 John Wawrzynek (Warzneck)

COMP2121: Microprocessors and Interfacing

Computer Architecture Today (I)

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

Theory of Computations Spring 2016 Practice Final Exam Solutions

Welcome to CS 241 Systems Programming at Illinois

CSE 504: Compiler Design

Computing Layers. Chapter 5 The LC-3

You must pass the final exam to pass the course.

C02: Overview of Software Development and Java

Computer Science 210: Data Structures

CSC 2405: Computer Systems II

Final Project: LC-3 Simulator

CS 374: Algorithms & Models of Computation

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers

CS 200, Section 1, Programming I, Fall 2017 College of Arts & Sciences Syllabus

Midterm Exam #2 Review. CS 2308 :: Spring 2016 Molly O'Neil

CSE 142. Lecture 1 Course Introduction; Basic Java. Portions Copyright 2008 by Pearson Education

What is this class all about?

What is this class all about?

MATH 101: Introduction to Contemporary Mathematics

Syllabus COSC-051-x - Computer Science I Fall Office Hours: Daily hours will be entered on Course calendar (or by appointment)

Advanced Programming Concepts. CIS 15 : Spring 2007

CISC 4090 Theory of Computation

Transcription:

Lecture Goals Introduction to Computing Systems: From Bits and Gates to C and Beyond 2 nd Edition Yale N. Patt Sanjay J. Patel Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University! Review course logistics Assignments Policies Organization Grading Criteria! Introduce key concepts Role of Abstraction Software versus Hardware Universal Computing Devices Layered Model of Computing 1 2 Logistics Assignments! Lectures: Tue and Thu from 9:30-10:45am in Glover 130! Recitations (COMSC 225) Tue 1:00-1:50pm, Chris Wilcox Wed 10:00-10:50am, Fereydoon Vafaei Wed 11:00-11:50am, Ferydoon Vafaie Fri. 11:00-11:50am, Awad Younis! Lab Hours: To Be Announced! Materials on the website and RamCT: http://www.cs.colostate.edu/~cs270 http://ramct.colostate.edu Assignments and quizzes are posted on RamCT:! Weekly assignments (mostly) alternate between written and programming assignments! Homework assignments are due in hardcopy on original handout on Thu. at 10:00pm! Programming assignments are submitted in electronic form Thu. at 10:00pm! Late submission for both is Fri. at 11:59pm, under my office door (COMSC 256) 3 4 1

Policies Organization! Grading Criteria Assignments (40%) Recitations (10%) Peer Instruction (5%) Midterm Exam (20%) Final Exam (25%)! Late Policy On-time = full points, up to 24 hours = 20% penalty! Academic Integrity http://www.cs.colostate.edu/~info/student-info.html Do your own work Be smart about Internet resources! 1/3 computer hardware: numbers and bits, transistors, gates, digital logic, state machines, von Neumann model, instruction sets, LC-3 architecture! 1/3 assembly code: instruction formats, branching and control, LC-3 programming, subroutines, memory model (stack)! 1/3 C programming: data types, language syntax, variables and operators, control structures, functions, pointers and arrays, memory model, recursion, I/O, data structures 5 6 Grading Criteria How to be successful in this class: 1) Attend all classes and recitations, info will presented that you can t get anywhere else. 2) Do all the homework assignments, ask questions (early!) if you run into trouble. 3) Take advantage of lab sessions where help is available from instructors. 4) Read the textbook, work through the end of chapter problems. Chapter 1 Welcome Aboard 7 2

Introduction to the World of Computing Two Recurring Themes! Computer: electronic genius? NO! Electronic idiot! Does exactly what we tell it to, nothing more.! Goal of the course: You will be able to write programs in C and understand what s going on underneath.! Approach: Build understanding from the bottom up. Bits Transistors Gates Logic Processor Instructions Assembly Code C Programming! Abstraction 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. 9 10 Two Recurring Themes! Hardware vs. Software It s not either/or both are components of a computer system that cooperate. Even if you specialize in one, you should understand capabilities and limitations of both. The best programmers understand the computer systems which run their programs. Computers are an entire ecosystem with multiple levels of abstraction. Big Idea #1: Universal Computing Devices! All computers, given enough time and memory, are capable of computing exactly the same things. PDA = = Workstation Supercomputer 11 12 3

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) a,b T add Turing machine that adds a+b For more info about Turing machines, see http://www.wikipedia.org/wiki/turing_machine/ a,b T mul ab Turing machine that multiplies For more about Alan Turing, see http://www.turing.org.uk/turing/ 13 Universal Turing Machine! A machine that can implement all Turing machines -- this is also a Turing machine! inputs: data, description of computation (other TMs) T add, T mul a,b,c U c(a+b) Universal Turing Machine Universal machine 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. 14 From Theory to Practice! In theory, computer can compute anything! that s possible to compute 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,... Big Idea #2: Transformations Between Layers Problems Algorithms Language Instruction Set Architecture Microarchitecture Circuits Devices 15 16 4

How do we solve a problem using a computer?! A systematic sequence of transformations between layers of abstraction. Problem Algorithm Program Instr Set Architecture Software Design: choose algorithms and data structures Programming: use language to express design Compiling/Interpreting: convert language to machine instructions 17 Instr Set Architecture Microarch Circuits Devices Deeper and Deeper Processor Design: choose structures to implement ISA Logic/Circuit Design: gates and low-level circuits to implement components Process Engineering & Fabrication: develop and manufacture lowest-level components 18 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 computer can perform data types, addressing mode 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 19 20 5

Red-black SOR Many Choices at Each Level Solve a system of equations Gaussian elimination Jacobi iteration FORTRAN C C++ Java PowerPC Intel x86 Atmel AVR Centrino Pentium 4 Xeon Ripple-carry adder Carry-lookahead adder CMOS Bipolar GaAs Multigrid Tradeoffs: cost performance power (etc.) 21 Book Outline! Bits and Bytes How do we represent information using electrical signals?! Digital Logic How do we build circuits to process information?! Processor and Instruction Set How do we build a processor out of logic elements? What operations (instructions) will we implement?! Assembly Language Programming 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?! C Programming How do we write programs in C? 22 6