“The course that gives CMU its Zip!”

Slides:



Advertisements
Similar presentations
COMP2130 Winter 2015 Storing signed numbers in memory.
Advertisements

CSCE 212 Chapter 3: Arithmetic for Computers Instructor: Jason D. Bakos.
Fabián E. Bustamante, Spring 2007 Floating point Today IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Next time.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
– 1 – CS213, S’06 Floating Point 4/5/2006 Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties CS213.
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.
Topics covered: Floating point arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Datorteknik FloatingPoint bild 1 Floating point Number system corresponding to the decimal notation 1,837 * 10 significand exponent a great number of corresponding.
University of Washington Today: Floats! 1. University of Washington Today Topics: Floating Point Background: Fractional binary numbers IEEE floating point.
University of Washington Today Topics: Floating Point Background: Fractional binary numbers IEEE floating point standard: Definition Example and properties.
Floating Point Arithmetic August 25, 2007
CPS Computer Architecture Assignment 4: Multiplication, Division, Floating Point.
FLOATING POINT COMPUTER ARCHITECTURE AND ORGANIZATION.
Floating Point Sept 6, 2006 Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties class03.ppt “The course.
Computing Systems Basic arithmetic for computers.
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.
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:
Integer & Floating Point Representations CDA 3101 Discussion Session 05.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Data Representation : Introduction to Computer Systems Recitation 2: Monday, Jan. 29th, 2015 Dhruven Shah.
Floating Point CENG331 - Computer Organization Instructors:
Carnegie Mellon Instructors: Randy Bryant, Dave O’Hallaron, and Greg Kesden Floating Point : Introduction to Computer Systems 4 th Lecture, Sep 5,
Floating Point Sept 9, 2004 Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties class04.ppt “The course.
1 University of Washington Fractional binary numbers What is ?
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
COMPUTER ORGANIZATION ARITHMETIC YASSER MOHAMMAD.
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.
Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Carnegie Mellon Today’s Instructor: Randy Bryant Floating Point :
Floating Point Representations
Floating Point CENG331 - Computer Organization Instructors:
Recitation3: CS 3843 Computer Organization 4th week
Floating Point CSE 238/2038/2138: Systems Programming
Floating Point Borrowed from the Carnegie Mellon (Thanks, guys!)
Floating Point Numbers
CS 105 “Tour of the Black Holes of Computing!”
2.4. Floating Point Numbers
Topics IEEE Floating Point Standard Rounding Floating Point Operations
CS 105 “Tour of the Black Holes of Computing!”
Floating Point Number system corresponding to the decimal notation
CS 232: Computer Architecture II
IEEE floating point format
CS 367 Floating Point Topics (Ch 2.4) IEEE Floating Point Standard
CS201 - Lecture 5 Floating Point
CSCI206 - Computer Organization & Programming
CS 105 “Tour of the Black Holes of Computing!”
Floating Point Arithmetic
CS 105 “Tour of the Black Holes of Computing!”
Floating Point Arithmetic August 31, 2009
CS 105 “Tour of the Black Holes of Computing!”
CS 105 “Tour of the Black Holes of Computing!”
CS213 Floating Point Topics IEEE Floating Point Standard Rounding
IT11004: Data Representation and Organization
CS 105 “Tour of the Black Holes of Computing!”
Chapter 2 Representing and Manipulating Information
Chapter3 Fixed Point Representation
Numbers with fractions Could be done in pure binary
Floating Point Arithmetic
Lecture 9: Shift, Mult, Div Fixed & Floating Point
CS 105 “Tour of the Black Holes of Computing!”
Presentation transcript:

15-213 “The course that gives CMU its Zip!” Floating Point Sept 2, 2008 Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties class03.ppt 15-213, F’08

Creating Floating Point Number Steps Normalize to have leading 1 Round to fit within fraction Postnormalize to deal with effects of rounding Case Study Convert 8-bit unsigned numbers to tiny floating point format Example Numbers 128 10000000 15 00001101 33 00010001 35 00010011 138 10001010 63 00111111 s exp frac 2 3 6 7

Normalize Requirement Set binary point so that numbers of form 1.xxxxx exp frac 2 3 6 7 Requirement Set binary point so that numbers of form 1.xxxxx Adjust all to have leading one Decrement exponent as shift left Value Binary Fraction Exponent 128 10000000 1.0000000 7 15 00001101 1.1010000 3 17 00010001 1.0001000 5 19 00010011 1.0011000 5 138 10001010 1.0001010 7 63 00111111 1.1111100 5

Rounding 1.BBGRXXX Round up conditions Guard bit: LSB of result Sticky bit: OR of remaining bits Round bit: 1st bit removed Round up conditions Round = 1, Sticky = 1  > 0.5 Guard = 1, Round = 1, Sticky = 0  Round to even Value Fraction GRS Incr? Rounded 128 1.0000000 000 N 1.000 15 1.1010000 100 N 1.101 17 1.0001000 010 N 1.000 19 1.0011000 110 Y 1.010 138 1.0001010 011 Y 1.001 63 1.1111100 111 Y 10.000

Postnormalize Issue Rounding may have caused overflow Handle by shifting right once & incrementing exponent Value Rounded Exp Adjusted Result 128 1.000 7 128 15 1.101 3 15 17 1.000 4 16 19 1.010 4 20 138 1.001 7 134 63 10.000 5 1.000/6 64