Prepared By: S.Visnu D harsini Assistant Professor-CSE FLOATING POINT REPRESENTATION
Floating Point Representation IEEE 754
It is not represented by 85.236 56620.856647783 It is represented by 1.101101*2^6 0.001011011*2^9 How a Floating point is Represented in our computer? Exponent Both of this in Normalized form
Sign Exponent Mantissa Sign is 101110110 First bit is the sign bit in Binary (0+ ve ) (1- ve ) Exponent is derived from 2 formulas Mantissa is also derived from this 2 formulas Single Precision Double Precision Parts of a floating point (1.N)2 E-127 (1.N)2 E-1023 Comparison should be made to get E N is the Mantissa part
Representing a Floating point (IEEE 754)
Single Precision Example
Single Precision Example
Addition Subtraction Multiplication Division Operation Available in Floating Point
Add (1.1100*2 4 ) + (1.100*2 2 ) Sol:- Make the Exponent equal like (1.1100*2 4 ) + (0.01100*2 4 ) Now ADD the Digit 1.1100 *2 4 + 0.0110 *2 4 10.0010 *2 4 Now Normalize the result like: 10.0010*2 4 0.100010 *2 6 (Ans) Addition
Add (1.1100*2 4 ) + (1.100*2 2 ) Sol:- Make the Exponent equal like (1.1100*2 4 ) - (0.01100*2 4 ) Now ADD the Digit 1.1100 *2 4 - 0.0110 *2 4 1.0110 *2 4 Now Normalize the result like: 1.0110*2 4 (Ans) Subtraction