FLOATING-POINT NUMBER REPRESENTATION

Slides:



Advertisements
Similar presentations
COMP2130 Winter 2015 Storing signed numbers in memory.
Advertisements

Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Representing fractions – Fixed point The problem: How to represent fractions with finite number of bits ?
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Floating Point Numbers
Computer ArchitectureFall 2007 © September 5, 2007 Karem Sakallah CS 447 – Computer Architecture.
Booth’s Algorithm.
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.
1 Lecture 3 Bit Operations Floating Point – 32 bits or 64 bits 1.
Floating Point Numbers
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
Computer ArchitectureFall 2008 © August 27, CS 447 – Computer Architecture Lecture 4 Computer Arithmetic (2)
Computer Science 210 Computer Organization Floating Point Representation.
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Binary Representation and Computer Arithmetic
Simple Data Type Representation and conversion of numbers
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Computer Architecture
COMPSCI 210 Semester Tutorial 1
Floating Point (a brief look) We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large numbers,
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
The Teacher CP4 Binary and all that… CP4 Revision.
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
The Teacher CP4 Binary and all that… CP4 Revision.
Integer & Floating Point Representations CDA 3101 Discussion Session 05.
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.
CSPP58001 Floating Point Numbers. CSPP58001 Floating vs. fixed point Floating point refers to a binary decimal representation where there is not a fixed.
Floating Point in Binary 1.Place Value Chart:
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
Floating Point Numbers
CS 160 Lecture 4 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
IT11004: Data Representation and Organization Floating Point Representation.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
R EPRESENTATION OF REAL NUMBER Presented by: Pawan yadav Puneet vinayak.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
Floating Point Numbers Dr. Mohsen NASRI College of Computer and Information Sciences, Majmaah University, Al Majmaah
CSCI206 - Computer Organization & Programming
Floating Point Numbers
Fundamentals of Computer Science
Data Representation Covering… Binary addition / subtraction
Computer Science 210 Computer Organization
A brief comparison of integer and double representation
Introduction To Computer Science
Numbers in a Computer Unsigned integers Signed magnitude
Floating Point Number system corresponding to the decimal notation
ECE 103 Engineering Programming Chapter 3 Numbers
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
Systems Architecture I
Floating Point Representation
CSCI206 - Computer Organization & Programming
Computer Science 210 Computer Organization
Systems Architecture I
COMS 161 Introduction to Computing
IT11004: Data Representation and Organization
Chapter3 Fixed Point Representation
Numbers with fractions Could be done in pure binary
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:

FLOATING-POINT NUMBER REPRESENTATION Dr. Konstantinos Tatas ACOE161 - Digital Logic for Computers - Frederick University

The range/accuracy problem The range of numbers that can be represented with n bits is In 2’s complement: from - /2 to /2 -1 For n=8: From –128 to +127 For n=16: From –32,768 to +32,767 Still, in many application an even larger range is required ACOE161 - Digital Logic for Computers - Frederick University

ACOE161 - Digital Logic for Computers - Frederick University Real numbers Instead of representing the actual value, in the base system, we represent the sign, M, b and e ACOE161 - Digital Logic for Computers - Frederick University

FLOATING-POINT REPRESENTATION IEEE short real: 8 bits for the exponent (in Ex-127), 23 bits for the mantissa IEEE long real: 11 bits for the exponent, 52 bits for the mantissa Sign (S) Biased exponent (E) Unsigned normalized mantissa (M) ACOE161 - Digital Logic for Computers - Frederick University

ACOE161 - Digital Logic for Computers - Frederick University RESERVED VALUES ACOE161 - Digital Logic for Computers - Frederick University

Examples (IEEE short real format) Binary value Normalized Binary value exponent Biased Exponent (Excess -127 Sign, exponent, mantissa -1.01 127 1 01111111 0100000000000000000000 +1011.0101 +1.0110101 +3 130 0 01000010 0110101000000000000000 -0.0000011 -1.1 -6 121 1 01111001 1000000000000000000000 +11010101 +1.11010101 +7 134 0 10000110 1101010100000000000000 ACOE161 - Digital Logic for Computers - Frederick University

ACOE161 - Digital Logic for Computers - Frederick University Homework Convert the following 2’s complement values to IEEE short real floating-point representation 10011010 0110.0101 0.1111110 1100.0001 ACOE161 - Digital Logic for Computers - Frederick University