9.4 FLOATING-POINT REPRESENTATION

Slides:



Advertisements
Similar presentations
Faculty of Computer Science © 2006 CMPUT 229 Floating Point Representation Operating with Real Numbers.
Advertisements

COMP3221: Microprocessors and Embedded Systems Lecture 14: Floating Point Numbers Lecturer: Hui Wu Session 2, 2004.
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Computer ArchitectureFall 2007 © September 5, 2007 Karem Sakallah CS 447 – Computer Architecture.
Chapter 5 Floating Point Numbers. Real Numbers l Floating point representation is used whenever the number to be represented is outside the range of integer.
Number Systems Standard positional representation of numbers:
1 Lecture 3 Bit Operations Floating Point – 32 bits or 64 bits 1.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
Lecture 8 Floating point format
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
Computer Organization and Architecture Computer Arithmetic Chapter 9.
Computer Arithmetic Nizamettin AYDIN
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
Fixed-Point Arithmetics: Part II
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
Computing Systems Basic arithmetic for computers.
Computer Architecture
Floating Point. Agenda  History  Basic Terms  General representation of floating point  Constructing a simple floating point representation  Floating.
Data Representation in Computer Systems
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.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Oct. 18, 2007SYSC 2001* - Fall SYSC2001-Ch9.ppt1 See Stallings Chapter 9 Computer Arithmetic.
1 Lecture 2  Complement  Floating Point Number  Character Encoding.
CSC 221 Computer Organization and Assembly Language
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Floating Point Arithmetic
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
CSC 4250 Computer Architectures September 5, 2006 Appendix H. Computer Arithmetic.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
IT1004: Data Representation and Organization Negative number representation.
IT11004: Data Representation and Organization Floating Point Representation.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
Representation of Data (Part II) Computer Studies Notes: chapter 19 Ma King Man.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
1 Integer Representations V1.0 (22/10/2005). 2 Integer Representations  Unsigned integer  Signed integer  Sign and magnitude  Complements  One’s.
1 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Chapter 9 Computer Arithmetic
William Stallings Computer Organization and Architecture 8th Edition
Department of Computer Science Georgia State University
Dr. Clincy Professor of CS
Expressible Numbers.
William Stallings Computer Organization and Architecture 7th Edition
Number Representations
Data Representation Data Types Complements Fixed Point Representation
Floating Point Arithmetic
ECEG-3202 Computer Architecture and Organization
Numbers with fractions Could be done in pure binary
Number Representations
Presentation transcript:

9.4 FLOATING-POINT REPRESENTATION With a fixed-point notation (e.g., twos complement) it is possible to represent a range of positive and negative integers centered on 0. By assuming a fixed binary or radix point, this format allows the representation of numbers with a fractional component as well. It is important to note that we are not representing more individual values with floating-point notation. The maximum number of different values that can be represented with 32 bits is still

This number can be stored in a binary word with three fields: Sign: plus or minus Significand S Exponent E

IEEE Standard for Binary Floating-Point Representation The IEEE standard defines both a 32-bit single and a 64-bit double format with 8-bit and 11-bit exponents Figure 9.21 the standard defines two extended formats, single and double

9.5 FLOATING-POINT ARITHMETIC Table 9.5 summarizes the basic operations for floating-point arithmetic. For addition and subtraction it is necessary to ensure that both operands have the same exponent value. - Exponent overflow: A positive exponent exceeds the maximum possible exponent value. - Exponent underflow: A negative exponent is less than the minimum possible exponent value - Significand underflow: - Significand overflow:

Addition and Subtraction Check for zeros Align significands (adjusting exponents) Add or subtract significands Normalize result