i know how numerical values are represented in memory. like +3, -3, 0, 1 , 3321 and like this. can you tell me how float, double are represented in memory ? like 3.220, -9876.87 ? i mean how bits are presented in memory ? like for singed number 32th bit is 1(from left to right). so can you please throw some light on this thing that how number before decimal and after decimal is represnted in float and double data type ? thanks a lot. :-)
nitin1
15
Master Poster
Recommended Answers
Jump to PostThe representation is clearly described in the wikipedia articles:
sign
|exponent
|fraction
The
sign
is always a single bit. Theexponent
is a fixed size, but different for each of the precisions. Thefraction
also has a fixed size (different for each …
Jump to PostL7Sqr gave a great synopsis of this. It is not a simple subject. If you want more info, see this wikipedia article: https://en.wikipedia.org/wiki/IEEE_754-1985
FWIW, my best college buddy, Bruce Ravenel, was the architect …
All 6 Replies
Moschops
683
Practically a Master Poster
Featured Poster
nitin1
15
Master Poster
nitin1
15
Master Poster
L7Sqr
227
Practically a Master Poster
rubberman
commented:
Nice! :-)
+12
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Moschops
commented:
I like to reward name-dropping :)
+8
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.