@divye and abhishek : Thanks :)

On Tue, Aug 9, 2011 at 11:00 PM, DK <[email protected]> wrote:

> Please read the specifications IEEE 754 for representation of single digit
> floating point numbers.
>
> http://en.wikipedia.org/wiki/Single_precision_floating-point_format
> http://en.wikipedia.org/wiki/IEEE_754-2008
>
> In short, the format is:
>    (1)            (8)                    (23)
> | sign bit | exponent + 127 | mantissa |
>
> given the number is represented in base 2 format.
>
> eg. 5.375 = 101 + bin(.375)
> bin(.375)
> 0.375 x 2 = 0.75 (0)
> 0.75 x 2 = 1.5 (1)
> 0.5 x 2 = 1.
> therefore bin(5.375) = 101.011
> Shifting decimal point = 1.01011 x 2^2
>
> Sign bit = 0
> Exponent = 127 + 2 = 129 = 1000 0001
> Mantissa = 0101 1000 0000 0000 0000 000
>
>
> Floating point representation:
> 0 | 1000 0001 | 0101 1000 0000 0000 0000 000|
>
> --
> DK
>
> http://www.divye.in
> http://twitter.com/divyekapoor
> http://gplus.to/divyekapoor
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/GahSJFDLuF0J.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Rajeev N B <http://www.opensourcemania.co.cc>

"*Winners Don't do Different things , they do things Differently"*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to