Carnegie Mellon 1 Midterm Review 15-213: Introduction to Computer Systems Recitation 8: Monday, Oct. 14, 2013 Marjorie Carlson Section A.

Slides:



Advertisements
Similar presentations
Exam #1 Review By sseshadr. Agenda Reminders – Test tomorrow! One 8.5 x 11 sheet, two sides – Pick up your datalabs in OH – Cachelab comes out tomorrow.
Advertisements

1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 2: Data types and addressing modes dr.ir. A.C. Verschueren.
CSE 351 Midterm Review. Your midterm is next Wednesday Study past midterms (link on the website) Point of emphasis: Registers are not memory Registers.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Floating Point Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties CS 367.
Carnegie Mellon Instructors: Dave O’Hallaron, Greg Ganger, and Greg Kesden Floating Point : Introduction to Computer Systems 4 th Lecture, Sep 6,
1 Binghamton University Floating Point CS220 Computer Systems II 3rd Lecture.
Carnegie Mellon Instructors: Randy Bryant & Dave O’Hallaron Floating Point : Introduction to Computer Systems 3 rd Lecture, Aug. 31, 2010.
Lecture 16: Computer Arithmetic Today’s topic –Floating point numbers –IEEE 754 representations –FP arithmetic Reminder –HW 4 due Monday 1.
15213 Recitation Fall 2014 Section A, 8 th September Vinay Bhat.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Chapter 2 Representing and Manipulating Information Prof. Qi Tian CS 3843 Fall
University of Washington Today Topics: Floating Point Background: Fractional binary numbers IEEE floating point standard: Definition Example and properties.
Carnegie Mellon Floating Point : Introduction to Computer Systems – Recitation January 24, 2011.
Recitation # Section F Spring 2006 Jernej Barbic.
Lecture 8 Floating point format
FLOATING POINT COMPUTER ARCHITECTURE AND ORGANIZATION.
CS 3843 Final Exam Review Fall 2013 December 5, 2013.
Carnegie Mellon Introduction to Computer Systems /18-243, spring 2009 Recitation, Jan. 14 th.
1 Carnegie Mellon Stacks : Introduction to Computer Systems Recitation 5: September 24, 2012 Joon-Sup Han Section F.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 10 Department of Computer Science and Software Engineering University of.
Floating Point Numbers Topics –IEEE Floating Point Standard –Rounding –Floating Point Operations –Mathematical properties.
Carnegie Mellon Instructors: Seth Copen Goldstein, Anthony Rowe, Greg Kesden Floating Point : Introduction to Computer Systems 4 th Lecture, Jan.
Oct. 18, 2007SYSC 2001* - Fall SYSC2001-Ch9.ppt1 See Stallings Chapter 9 Computer Arithmetic.
Instructor: Andrew Case Floating Point Slides adapted from Randy Bryant & Dave O’Hallaron.
Carnegie Mellon Instructors: Greg Ganger, Greg Kesden, and Dave O’Hallaron Floating Point : Introduction to Computer Systems 4 th Lecture, Sep 4,
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Carnegie Mellon Instructor: San Skulrattanakulchai Floating Point MCS-284:
CSC 221 Computer Organization and Assembly Language
Lecture 12: Integer Arithmetic and Floating Point CS 2011 Fall 2014, Dr. Rozier.
Recitation 6 – 2/26/01 Outline Linking Exam Review –Topics Covered –Your Questions Shaheen Gandhi Office Hours: Wednesday.
Carnegie Mellon 1 Representing Data : Introduction to Computer Systems Recitation 3: Monday, Sept. 9 th, 2013 Marjorie Carlson Section A.
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems October 14, 2013.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems Recitation 8: Monday, Oct. 19, 2015 Ben Spinelli.
1 Information Representation in Computer Lecture Nine.
Chapter 3 Arithmetic for Computers. Chapter 3 — Arithmetic for Computers — 2 Arithmetic for Computers Operations on integers Addition and subtraction.
Recitation 2 – 2/4/02 Outline Floating Point Typecasting
Data Representation : Introduction to Computer Systems Recitation 2: Monday, Jan. 29th, 2015 Dhruven Shah.
1 Carnegie Mellon Welcome to recitation! : Introduction to Computer Systems 3 rd Recitation, Sept. 10, 2012 Instructor: Adrian Trejo (atrejo) Section.
Carnegie Mellon Instructors: Randy Bryant, Dave O’Hallaron, and Greg Kesden Floating Point : Introduction to Computer Systems 4 th Lecture, Sep 5,
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems Recitation 8: Monday, Oct. 13, 2014 Lou Clark.
CS 3843 Computer Organization Prof. Qi Tian Fall 2013
Carnegie Mellon Midterm Review : Introduction to Computer Systems October 15, 2012 Instructor:
1 Floating Point. 2 Topics Fractional Binary Numbers IEEE 754 Standard Rounding Mode FP Operations Floating Point in C Suggested Reading: 2.4.
Floating Point Carnegie Mellon /18-243: Introduction to Computer Systems 4 th Lecture, 26 May 2011 Instructors: Gregory Kesden.
Lecture 4 IEEE 754 Floating Point Topics IEEE 754 standard Tiny float January 25, 2016 CSCE 212 Computer Architecture.
Floating Point Topics IEEE Floating-Point Standard Rounding Floating-Point Operations Mathematical Properties CS 105 “Tour of the Black Holes of Computing!”
1 Binghamton University Exam 1 Review CS Binghamton University Birds eye view -- Topics Information Representation Bit-level manipulations Integer.
Introduction to Computer Systems Topics: Assembly Stack discipline Structs/alignment Caching CS 213 S ’12 rec8.pdf “The Class That Gives CMU Its.
CS 105 “Tour of the Black Holes of Computing!”
Recitation 4&5 and review 1 & 2 & 3
Topics IEEE Floating Point Standard Rounding Floating Point Operations
CS 367 Floating Point Topics (Ch 2.4) IEEE Floating Point Standard
Recitation 2 – 2/4/01 Outline Machine Model
S09 Recitation #1 Jernej Barbic (S06) Revised: Alex Gartrell (S09)
Midterm Exam Preperation
CS201 - Lecture 5 Floating Point
CS 105 “Tour of the Black Holes of Computing!”
CS 105 “Tour of the Black Holes of Computing!”
CS 105 “Tour of the Black Holes of Computing!”
CS 3843 Midterm Two Review Fall 2013 Prof. Qi Tian.
Recitation 5 – 2/19/01 Outline
Topic 3d Representation of Real Numbers
CS 105 “Tour of the Black Holes of Computing!”
Computer Organization and Assembly Language
15-213: F19 Midterm Review Session
ECE 120 Midterm 1 HKN Review Session.
Presentation transcript:

Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems Recitation 8: Monday, Oct. 14, 2013 Marjorie Carlson Section A

Carnegie Mellon 2 Agenda Midterm Logistics A Non-Comprehensive Review of Midterm Topics:  Some skills you should have  A sample exam problem Non-Comprehensive

Carnegie Mellon 3 Midterm Wed Oct 16 th to Sun Oct 20 th  Check website for times & locations  Intended to take 80 minutes; you’ll have 4 hours Cheat sheet – ONE double-sided 8 ½ x 11 paper  Cannot include pre-worked problems What to study?  Chapters 1-3 and Chapter 6  Lectures through cache How to study?  Read each chapter (preferably multiple times) & do problems  Do problems from previous exams (incl. cache from midterm 2)  Office hours tonight & tomorrow only More info can be found here.here

Carnegie Mellon 4 Agenda Midterm Logistics A Non-Comprehensive Review of Midterm Topics:  Ints & two’s complement  Floats  Structs (sizes & alignment of data)  Assembly loops  The stack  Array access  Overview of caching Non-Comprehensive

Carnegie Mellon 5 Bits, Bytes & Integers Some suggested skills:  Know how to do basic bitshifting by hand.  If you represent numbers in w bits:  what’s UMax (the largest unsigned number)?  what’s TMax (the largest signed number)?  what’s Tmin (the most negative signed number)?  How do you calculate –x in two’s complement? 2 w w w-1 ~ x + 1

Carnegie Mellon 6

7 Floating Point Some suggested skills:  Know how to represent a fraction in binary scientific notation.  Be able to convert between this format: (-1) s * M * 2 E and this format:  Be able to compute bias: 2 k-1 – 1 where k is the number of exp bits.  Know how to convert normalized to denormalized & vice versa, when to round up/down/to even and when numbers round to 0/∞. sexpfrac

Carnegie Mellon 8 Floating Point Floating Point Rounding:  Round up if the spilled bits are greater than half  Round down if the spilled bits are less than half  Round to even if the spilled bits are exactly equal to half NormalizedDenormalizedSpecial Values Represents:Most numbersTiny numbersInfinity, NaN Exponent bits:Not those  000…000111…111 E =exp – bias1 – bias + / - ∞ if frac = 000…000; otherwise NaN M =1.frac.frac

Carnegie Mellon 9 Fall 2012; answers here.here

Carnegie Mellon 10 Sizes & Alignment Know all the basic data types’ sizes, alignment rules (32- bit and 64-bit), and assembly suffixes:  char  short  int  float  long  pointer  long long  double  long double

Carnegie Mellon 11 Fall 2012; answers here.here

Carnegie Mellon 12 Assembly Loops Some suggested skills:  Know the basic assembly instructions and jump codes.  Get comfortable with the order of operands!  sub %edx,%eax%eax = %eax-%edx  Get comfortable with dereferencing and addresses:  %edx vs. (%edx)  D(Rb, Ri, S)Mem[Reg[Rb] + S * Reg[Ri] + D]  Hint: if statements often end up “backwards” in Assembly if (n else[do something] do something else;

Carnegie Mellon 13 Assembly Loops void mystery(int *array, int n) { int i; for (________; ________; _______) { if (__________________) ___________; }

Carnegie Mellon 14 The Stack Some suggested skills:  Know how arguments are passed to a function.  x86-32?  x86-64?  Know where to find the return value from a function.  x86-32?  x86-64?  Know how these instructions modify the stack.  call  leave  ret  pop  push

Carnegie Mellon 15 Given assembly code of foo() and bar(), draw a detailed picture of the stack, starting with the caller invoking foo(3, 4, 5). Fall 2012; answers here.here

Carnegie Mellon 16

Carnegie Mellon 17 Array Access A suggested method:  Understand how assembly turns a 2D array into a 1D array by using the width of the array as a multiplier. [0][2] = 0 * = 2 [1][3] = 1 * = 7 [2][1] = 2 * = 9 [i][j] = i * width of array + j [0][0] = [0][0][1] = [1][0][2] = [2][0][3] = [3] [1][0] = [4][1][1] = [5][1][2] = [6][1][3] = [7] [2][0] = [8][2][1] = [9][2][2] = [10][2][3] = [11]

Carnegie Mellon 18 Find H & J Fall 2010; answers here.here

Carnegie Mellon 19 Caching Concepts Dimensions: S, E, B  S: Number of sets  E: Associativity – number of lines per set  B: Block size – number of bytes per block (1 block per line) Given values for S/s, E, B/b, m  Find which address maps to which set  Is it a hit or miss? Is there an eviction?  What’s the hit rate or miss rate for a given piece of C code?

Carnegie Mellon 20 Questions/Advice Work past exams! Once you’re in the exam: relax! You have time. us: Office hours tonight and tomorrow