Computer Architecture Lecture 22 Fasih ur Rehman.

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

Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Topics covered: Floating point arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Binary Arithmetic Binary addition Binary subtraction
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Datorteknik FloatingPoint bild 1 Floating point Number system corresponding to the decimal notation 1,837 * 10 significand exponent a great number of corresponding.
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.
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Floating Point Numbers
1 CSE1301 Computer Programming Lecture 30: Real Number Representation.
CSE1301 Computer Programming Lecture 33: Real Number Representation
Dr Damian Conway Room 132 Building 26
Number Systems Standard positional representation of numbers:
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
Floating Point Numbers
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
ECEN 248 Integer Multiplication, Number Format Adopted from Copyright 2002 David H. Albonesi and the University of Rochester.
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
Computer Architecture Lecture 3: Logical circuits, computer arithmetics Piotr Bilski.
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
Computing Systems Basic arithmetic for computers.
Fundamental of Computer Architecture By Panyayot Chaikan November 01, 2003.
ECE232: Hardware Organization and Design
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
Floating Point Numbers Topics –IEEE Floating Point Standard –Rounding –Floating Point Operations –Mathematical properties.
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Floating-Point Arithmetic Operations.
Operations on Scientific Notation Addition and Subtraction 1. If they have the same exponent - add/subtract the number in front - keep the same exponent.
Lecture 9: Floating Point
CSC 221 Computer Organization and Assembly Language
Floating Point Arithmetic
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Floating Point Representation.
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the 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:
Floating Point Arithmetic
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
1 Floating Point Operations - Part II. Multiplication Do unsigned multiplication on the mantissas including the hidden bits Do unsigned multiplication.
Integer and Fixed Point P & H: Chapter 3
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
Computer Architecture Lecture 32 Fasih ur Rehman.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Floating Point Numbers Representation, Operations, and Accuracy CS223 Digital Design.
Computer Architecture Lecture 15 Fasih ur Rehman.
Addition Multiplication Subtraction Division. 1.If the signs are the same, add the numbers and keep the same sign = = If the.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
Number Representation Fixed and Floating Point
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Introduction to Numerical Analysis I
Floating Point Representations
2.4. Floating Point Numbers
CSCI206 - Computer Organization & Programming
Integer Division.
Lecture 9: Floating Point
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.
Multiplying and Dividing Powers
ECE/CS 552: Floating Point
Number Representations
The IEEE Floating Point Standard and execution units for it
CSCI206 - Computer Organization & Programming
How to represent real numbers
The IEEE Floating Point Standard and execution units for it
Number Representations
Lecture 9: Shift, Mult, Div Fixed & Floating Point
Presentation transcript:

Computer Architecture Lecture 22 Fasih ur Rehman

Last Class Floating point numbers IEEE Standard

Today’s Agenda Floating Point Numbers – IEEE Standard for representation of Floating Point Numbers – Floating point Arithmetic

IEEE Standard for Representation

Example

Special Values S. NoE’MValue (0)00 2 ≠ 0De normal value (255)0Infinity (255)≠ 0NaN

Special Values Infinity can positive or negative depending upon sign bit De normal values are used to allow gradual underflow – Denormal value is smaller than the smallest value that can be represented NaN means Not a Number: 0/0 or square root of a negative number

Main Features Floating point numbers are represented in a normalized form. MSB of the mantissa is always equal to 1. We can represent numbers without storing the MSB. The values of the numbers represented in the IEEE single precision notation are of the form (+,-) 1.M x 2 (E - 127)

Addition / Subtraction Rules Choose the number with the smaller exponent and shift its mantissa right a number of steps equal to the difference in exponents. Set the exponent of the result equal to the larger exponent. Perform addition/subtraction on the mantissas and determine the sign of the result. Normalize the resulting value, if necessary x x 10 6 = x x 10 8 = x 10 8

Multiplication Rules Add the exponents and subtract 127 to maintain the excess-127 representation. Multiply the mantissas and determine the sign of the result. Normalize the resulting value, if necessary.

Division Rules Subtract the exponents and add 127 to maintain the excess-127 representation. Divide the mantissas and determine the sign of the result. Normalize the resulting value, if necessary.

Implementation of Addition

Summary Floating Point Numbers – IEEE Standard for representation of Floating Point Numbers – Arithmetic