Carnegie Mellon Floating Point 15-213: Introduction to Computer Systems – Recitation January 24, 2011.

Slides:



Advertisements
Similar presentations
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Advertisements

Socratic Method, Understanding Floats. Float Cheat Sheet ExponentSignificandValue 000 0nonzeroDenorm 1~ 2 E - 2Anything+/- fl. Pt # 2 E - 1 (all 1s)0+/-
Datorteknik FloatingPoint bild 1 Floating point Number system corresponding to the decimal notation 1,837 * 10 significand exponent a great number of corresponding.
1 IEEE Floating Point Revision Guide for Phase Test Week 5.
Floating Point Numbers
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.
M68K Assembly Language Programming Bob Britton Chapter 12 IEEE Floating Point Notice: Chapter slides in this series originally provided by B.Britton. This.
Floating Point Numbers
Representing Real Numbers Using Floating Point Notation Lecture 6 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Floating Point Numbers
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
The IEEE Format for storing float (single precision) data type Use the “enter” key to proceed through the show.
IT 251 Computer Organization and Architecture Introduction to Floating Point Numbers Chia-Chi Teng.
Ch. 2 Floating Point Numbers
Numeric precision in SAS. Two aspects of numeric data in SAS The first is how numeric data are stored (how a number is represented in the computer). –
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
Introduction to Numerical Analysis I
ECE232: Hardware Organization and Design
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.
Fractions, decimals and percentages
Carnegie Mellon 1 Representing Data : Introduction to Computer Systems Recitation 3: Monday, Sept. 9 th, 2013 Marjorie Carlson Section A.
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems October 14, 2013.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: November 08, 2004 Lecture Number: 30.
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.
Floating Point in Binary 1.Place Value Chart:
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
1 Carnegie Mellon Welcome to recitation! : Introduction to Computer Systems 3 rd Recitation, Sept. 10, 2012 Instructor: Adrian Trejo (atrejo) Section.
Carnegie Mellon 1 Midterm Review : Introduction to Computer Systems Recitation 8: Monday, Oct. 14, 2013 Marjorie Carlson Section A.
Numbers in Computers.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
Lecture 4 IEEE 754 Floating Point Topics IEEE 754 standard Tiny float January 25, 2016 CSCE 212 Computer Architecture.
Binary & Normalization What is Normalization? We discussed this the other day (special review session slides, near the end) Can someone tell us.
Learning Objectives 3.3.1f - Describe the nature and uses of floating point form 3.3.1h - Convert a real number to floating point form Learn how to normalise.
Floating Point Numbers
Floating Point Numbers
Introduction to Numerical Analysis I
Floating Point Representations
Data Representation Covering… Binary addition / subtraction
Objectives Today: P4 Data Types – Floating Points P4 Variable Quiz P3 Iteration and Selection Practical Are you logged on? Then come around the table Unit.
A brief comparison of integer and double representation
Floating Point Representations
CSCI206 - Computer Organization & Programming
Recitation 4&5 and review 1 & 2 & 3
Integer Division.
Floating Point Number system corresponding to the decimal notation
IEEE floating point format
CS/COE0447 Computer Organization & Assembly Language
PRESENTED BY J.SARAVANAN. Introduction: Objective: To provide hardware support for floating point arithmetic. To understand how to represent floating.
Outline Introduction Floating Point Arithmetic Adder Multiplier.
Topic 3d Representation of Real Numbers
Luddy Harrison CS433G Spring 2007
CSCI206 - Computer Organization & Programming
Number Representations
Floating Point Representation
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
How to represent real numbers
Faculty of Cybernetics, Statistics and Economic Informatics –
Normalised Floating Point Numbers
Topic 3d Representation of Real Numbers
Floating Point Numbers
Number Representations
Presentation transcript:

Carnegie Mellon Floating Point : Introduction to Computer Systems – Recitation January 24, 2011

Today: Floating Point  Data Lab  Floating Point Basics  Representation  Interpreting the bits  Rounding  Floating Point Examples  Number to Float  Float to Number Carnegie Mellon

Data Lab  Due tomorrow at 11:59pm  Any questions? Carnegie Mellon

Representation  Basic format of bit representation (single precision): Carnegie Mellon SignExponentFraction (Mantissa) 1-bit 8-bits 23-bits Where E is based on the Bias

Interpreting the Bits Carnegie Mellon 0000 Exponent 1111 EEEENormalized Denormalized Special Fraction 000 FFFNaN Infinity 8-bit floating point number Positive/Negative S EEEE FFF

Rounding Carnegie Mellon Greater then 0.5, round up Less than 0.5, round down Round to even up Round to even down1.10  Round to even  Like regular rounding except for the exactly half case  If the last rounded bit is 1 round up, else round down

Number to Float  Convert: -5 Carnegie Mellon 8-bit floating point number S EEEE FFF

Number to Float Carnegie Mellon

Number to Float Carnegie Mellon

Number to Float Carnegie Mellon  Convert: 6/512

Number to Float Carnegie Mellon  Convert: 6/512  Is it denormalized? Check the largest denormalized:  Denormalized, we know the exponent is going to be:  So we know the form of the answer is going to be:  Lets remove the decimal point to make it a bit easier:  The fraction bits are the top of the fraction:

Number to Float Carnegie Mellon  Why does that work? Lets remove the decimal point to make it a bit easier to see:  Remembering that these are fractions:  We can see the table in terms on 512ths:  We want 6 512ths which are the bits we used.

Number to Float Carnegie Mellon

Number to Float Carnegie Mellon  Convert: 27

Number to Float Carnegie Mellon

Number to Float Carnegie Mellon

Float to Number Carnegie Mellon

Float to Number Carnegie Mellon

Float to Number Carnegie Mellon

Float to Number Carnegie Mellon

Float to Number Carnegie Mellon  Put it all together:  Now lets examine our fraction chart:  Answer: 6/512

Float to Number Carnegie Mellon

Float to Number Carnegie Mellon

Questions? Carnegie Mellon