Solved

How is Decimal data type stored in 32-bit memory?

Posted on 2011-02-13
4
424 Views
Last Modified: 2012-05-11
How is the Decimal data type stored in 32-bit memory?

(e.g. i = 100M )
0
Comment
Question by:deleyd
4 Comments
 
LVL 16

Accepted Solution

by:
BurnieP earned 167 total points
ID: 34884711
Hi,

Why are you saying 32 bit?

If you check http://msdn.microsoft.com/en-us/library/364x0z75(v=VS.100).aspx you will see that it is a 128 bit data type.  Even checking other versions of VS by using the link you can see that it was 128 bit in every release of Visual Studio.

0
 
LVL 6

Assisted Solution

by:ViceroyFizzlebottom
ViceroyFizzlebottom earned 167 total points
ID: 34885271
If I'm not mistaken, decimals converted and stored using the IEEE 754 standard. I'm not sure if this will help, but the technical specs can be found here:

http://grouper.ieee.org/groups/754/
0
 
LVL 12

Assisted Solution

by:mwochnick
mwochnick earned 166 total points
ID: 34885366
Below are links with some explanation of the differences in between float, double and Decimal.
The main thing is that float (32bit) and double (64 bit) can be handled by the hardware Decimal - 128bit has to be handled by software in the case of C# by the CLR.  How Decimal works in C# is explained in the first article.  As to how exactly this is done by the CLR on the 32 bit hardware, i was unable to find anything.  

http://gregs-blog.com/2007/12/10/dot-net-decimal-type-vs-float-type/
http://stackoverflow.com/questions/618535/what-is-the-difference-between-decimal-float-and-double-in-c
0
 

Author Closing Comment

by:deleyd
ID: 34889868
Excellent. Thank you.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Entity Framework 7 41
how to convert MM/dd/YYYY hh:mm:ss AM to YYYY-MM-dd datetime format by linq? 4 48
Video Player 2017 5 20
InputLanguage 1 25
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now