1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:

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

CENG536 Computer Engineering department Çankaya University.
Topics covered: Floating point arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
2-1 Chapter 2 - Data Representation Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture.
Chapter 2: Data Representation
Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 2: Data Representation.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
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.
1 Lecture 9: Floating Point Today’s topics:  Division  IEEE 754 representations  FP arithmetic Reminder: assignment 4 will be posted later today.
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.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
Floating Point Numbers
ECEN 248 Integer Multiplication, Number Format Adopted from Copyright 2002 David H. Albonesi and the University of Rochester.
Computer Science 210 Computer Organization Floating Point Representation.
Lecture 8 Floating point format
Binary Representation and Computer Arithmetic
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
The Binary Number System
IT 251 Computer Organization and Architecture Introduction to Floating Point Numbers Chia-Chi Teng.
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
Information Representation (Level ISA3) Floating point numbers.
Computer Arithmetic Nizamettin AYDIN
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.
Computing Systems Basic arithmetic for computers.
Computer Architecture
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer.
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.
Data Representation in Computer Systems
S. Rawat I.I.T. Kanpur. Floating-point representation IEEE numbers are stored using a kind of scientific notation. ± mantissa * 2 exponent We can represent.
Floating Point (a brief look) We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large numbers,
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
9.4 FLOATING-POINT REPRESENTATION
Fixed and Floating Point Numbers Lesson 3 Ioan Despi.
Lecture 9: Floating Point
1 Lecture 2  Complement  Floating Point Number  Character Encoding.
CSC 221 Computer Organization and Assembly Language
Conversion to Larger Number of Bits Ex: Immediate Field (signed 16 bit) to 32 bit Positive numbers have implied 0’s to the left. So, put 16 bit number.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
CSC 4250 Computer Architectures September 5, 2006 Appendix H. Computer Arithmetic.
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
IT11004: Data Representation and Organization Floating Point Representation.
Numbers in Computers.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
COSC2410: LAB 2 BINARY ARITHMETIC SIGNED NUMBERS FLOATING POINT REPRESENTATION BOOLEAN ALGEBRA 1.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Floating Point Representations
Dr. Clincy Professor of CS
Topic 3d Representation of Real Numbers
Number Representations
Data Representation Data Types Complements Fixed Point Representation
COMS 161 Introduction to Computing
Topic 3d Representation of Real Numbers
Chapter3 Fixed Point Representation
Number Representations
Presentation transcript:

1 Module 2: Floating-Point Representation

2 Floating Point Numbers ■ Significant x base exponent ■ Example:

3 Example1 Fixed point Floating point Significant/fraction Base/Radix Exponent

4 Normalized and Unnormalized ■ A floating point number is said to be normalized if the number after the radix point is a non-zero that is, it is not a ‘0’ value. ■ Unnormalized floating number is when the number after the radix point is ‘0’. ■ Example:  normalized  unnormalized  normalized

5 Normalization Process ■ Normalization is the process of deleting the zeroes until a non-zero value is detected. ■ Example : ■ A rule of thumb: –moving the radix point to the right  subtract exponent –moving the radix point to the left  add exponent

6 Example 2 Decimal Binary - -

7 Floating Point Format for Binary Numbers ■ General form: ■ In binary: sign Exponent

8 Biased Exponent ■ To eliminate the sign for the exponent value that is the exponent will be positive. sign Biased exponent

9 Conversion to Floating Point Number ■ Normalized the number ■ Change the number to biased exponent ■ Form the word (3 fields)

10 Example 3 ■ Transform – to floating point word using the following format (radix 2) ■ The biased constant

11 Floating-Point Representation

12 Overflow and Underflow

13 Normalized Scientific Notation

14 IEEE 754 Floating-Point Standard

15 IEEE 754 Encoding of Floating-Point Numbers ■ Purpose of NaNs is to allow programmers to postpone some tests and decision a later time in the program when it is convenient.

16 Challenge of Negative Exponents ■ Placing the exponent before the significand simplifies sorting of floating-point numbers using integer comparison instructions. ■ However, using 2’s complement in the exponent field makes a negative exponent look like a big number.

17 Biased Notation

18 Convert 10.4 ten to single precision floating point IEEE 754 Conversion : Example 1

19 IEEE 754 Conversion : Example = -0.11

20 IEEE 754 Conversion : Example 2

21 Converting Binary to Decimal Floating-Point Fraction = 0.01b = 0.25

22 Module 2: Floating-Point Operations

23 Floating-Point Addition Flows

24 Decimal Floating-Point Addition Assume 4 decimal digit for significand and 2 decimal digits for exponent

25 Binary Floating-Point Addition

26 Floating-Point Multiplication Flows

27 Decimal Floating-Point Multiplication Assume 4 decimal digit for significand and 2 decimal digits for exponent

28 Binary Floating-Point Multiplication

29 Floating-Point ALU

30 Accurate Arithmetic

31 … Accurate Arithmetic