1 COMS 161 Introduction to Computing Title: Numeric Processing Date: November 08, 2004 Lecture Number: 30.

Slides:



Advertisements
Similar presentations
Fixed Point Numbers The binary integer arithmetic you are used to is known by the more general term of Fixed Point arithmetic. Fixed Point means that we.
Advertisements

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.
Lecture - 2 Number systems and computer data formats
Floating Point Numbers
Faculty of Computer Science © 2006 CMPUT 229 Floating Point Representation Operating with Real Numbers.
COMP3221: Microprocessors and Embedded Systems Lecture 14: Floating Point Numbers Lecturer: Hui Wu Session 2, 2004.
University of Washington Today Topics: Floating Point Background: Fractional binary numbers IEEE floating point standard: Definition Example and properties.
Floating Point Numbers. CMPE12cGabriel Hugh Elkaim 2 Floating Point Numbers Registers for real numbers usually contain 32 or 64 bits, allowing 2 32 or.
Floating Point Numbers. CMPE12cCyrus Bazeghi 2 Floating Point Numbers Registers for real numbers usually contain 32 or 64 bits, allowing 2 32 or 2 64.
1 Lecture 3 Bit Operations Floating Point – 32 bits or 64 bits 1.
Representing Real Numbers Using Floating Point Notation Lecture 6 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
CSE 378 Floating-point1 How to represent real numbers In decimal scientific notation –sign –fraction –base (i.e., 10) to some power Most of the time, usual.
Floating Point Numbers
Computer Science 210 Computer Organization Floating Point Representation.
The IEEE Format for storing float (single precision) data type Use the “enter” key to proceed through the show.
IEEE Floating Point Numbers Overview Noah Mendelsohn Tufts University Web: COMP.
Simple Data Type Representation and conversion of numbers
Numbers and number systems
Ch. 2 Floating Point Numbers
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 22, 2004 Lecture Number: 24.
Introduction to Numerical Analysis I
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 29, 2004 Lecture Number: 26.
Floating Point Numbers Topics –IEEE Floating Point Standard –Rounding –Floating Point Operations –Mathematical properties.
Data Representation - Part II. Characters A variable may not be a non-numerical type Character is the most common non- numerical type in a programming.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Floating Point Representations CDA 3101 Discussion Session 02.
CSC 221 Computer Organization and Assembly Language
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Floating Point Representation.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
Floating Point Numbers
IT11004: Data Representation and Organization Floating Point Representation.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
FLOATING-POINT NUMBER REPRESENTATION
CSCI206 - Computer Organization & Programming
Introduction to Numerical Analysis I
Floating Point Representations
Computer Science 210 Computer Organization
2.4. Floating Point Numbers
Floating Point Representations
CSCI206 - Computer Organization & Programming
Recitation 4&5 and review 1 & 2 & 3
Topics IEEE Floating Point Standard Rounding Floating Point Operations
Floating Point Number system corresponding to the decimal notation
PRESENTED BY J.SARAVANAN. Introduction: Objective: To provide hardware support for floating point arithmetic. To understand how to represent floating.
Luddy Harrison CS433G Spring 2007
CSCI206 - Computer Organization & Programming
Number Representations
Floating Point Representation
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
Computer Science 210 Computer Organization
How to represent real numbers
How to represent real numbers
COMS 361 Computer Organization
Faculty of Cybernetics, Statistics and Economic Informatics –
COMS 161 Introduction to Computing
IT11004: Data Representation and Organization
39 32 Exponent Sign 31 Mantissa 30 Operations are perfomred with an implied binary point between bits 31 and 30. When the implied most significant.
Number Representations
Presentation transcript:

1 COMS 161 Introduction to Computing Title: Numeric Processing Date: November 08, 2004 Lecture Number: 30

2 Announcements

3 Review Real numbers –Representation –Limitations

4 Outline Real numbers –Representation –Limitations

5 IEEE Standard 754 Provides two floating point types –Single 24-bits of significand precision –Double 53-bits of significand precision

6 Single Precision IEEE standard 754 –Floating point number representation –32-bit s eeeeeeee fffffff ffffffffffffffff –s: (1) sign bit 0 means positive, 1 means negative sexponentsignificand

7 Single Precision s eeeeeeee fffffff ffffffffffffffff –e: (8) exponent bits [-126 … 127] A bias of 127 is added to the exponent –f: (24) fractional part [23 bits + 1 implied bit] Normalize the fractional part 1 will always be on the left side of the binary point

8 Special Single Cases Two zeros –Signed zero –e = 0, f = 0 (exponent and fractional bits are all 0) –(-1) s x –0x (+0) –0x (-0)

9 Special Single Cases Positive infinity –+INF –s = 0, e = 255, f = 0 (all fractional bits are all 0) x7f Negative infinity –-INF –s = 1, e = 255, f = 0 (all fractional bits are all 0) xff

10 Special Single Cases Not-A-Number (NaN) –s = 0 | 1, e = 255, f != 0 (at least one fractional bit is NOT 0) –There are many representations for NaN –Here is one example x7fc0 0000

11 Special Single Cases Maximum single number – –0x7f7f ffff – x Minimum positive single number – –0x – x To represent larger numbers

12 Double Precision IEEE standard 754 –Floating point number representation –64-bit s eeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffff –s: (1) sign bit 0 means positive, 1 means negative sexponentsignificand significand 310

13 Single Precision s eeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffff –e: (11) exponent bits [-1022 … 1023] A bias of 1023 is added to the exponent –f: (53) fractional part [52 bits + 1 implied bit] Normalize the fractional part 1 will always be on the left side of the binary point

14 Real (Decimal) Number Storage Double precision floating point numbers –s: (1) sign bit –e: (11) exponent bits [-1022 … 1023] –f: (53) fractional part [52 bits + 1 implied bit] seeeeeeeeee f f f ff f f f Byte f f f f Byte

15 Special Double Cases Two zeros –Signed zero –e = 0, f = 0 (exponent and fractional bits are all 0) –(-1) s x bits … 0000 –0x (+0) … 0000 –0x (-0)

16 Special Double Cases Positive infinity –+INF –s = 0, e = 2047, f = 0 (all fractional bits are all 0) … x7ff Negative infinity –-INF –s = 1, e = 2047, f = 0 (all fractional bits are all 0) … xfff

17 Special Double Cases Not-A-Number (NaN) –s = 0 | 1, e = 2047, f != 0 (at least one fractional bit is NOT 0) –There are many representations for NaN –Here is one example … x7ff

18 Special Double Cases Maximum double number – … 1111 –0x7fef ffff ffff ffff – x Minimum positive single number – … 0000 –0x – x –Don’t forget about the implied 1 bit!!

19 Decimal to Float Conversion Show – in IEEE single precision format –First, save sign (negative so 1) and convert to binary… – = x 2 0 –Normalize… – = x 2 4 –Strip 1 off the mantissa and extend to form significand – = –Bias the exponent… –Exp + Bias = = 131 =

20 Real (Decimal) Number Storage Hex value : 0xC1C10000 Link me baby