Decimal Type Complications
"The Decimal value type represents decimal numbers ranging from positive 79,228,162,514,264,337,593,543,950,335 to negative 79,228,162,514,264,337,593,543,950,335. The Decimal value type is appropriate for financial calculations requiring large numbers of significant integral and fractional digits and no round-off errors.
"A decimal number is a floating-point value that consists of a sign, a numeric value where each digit in the value ranges from 0 to 9, and a scaling factor that indicates the position of a floating decimal point that separates the integral and fractional parts of the numeric value.
"The binary representation of a Decimal value consists of a 1-bit sign, a 96-bit integer number, and a scaling factor used to divide the 96-bit integer and specify what portion of it is a decimal fraction. The scaling factor is implicitly the number 10, raised to an exponent ranging from 0 to 28. Therefore, the binary representation of a Decimal value is of the form, ((-2^96 to 2^96) / 10^(0 to 28), where -2^96-1 is equal to MinValue, and 2^96-1 is equal to MaxValue."
Here is the problem: the decimal type takes 12 bytes of space, i.e. 96 bits. How does it then accomodate a 96-bit integer number, a sign bit and the scaling factor. Surely, it sums up to more than 96 bits, while we are told that the decimal type takes only 96 bits, i.e. 12 bytes.
Since the "binary representation" of a decimal value is presented here in decimal itself, I didn't quite get the picture of how an actual binary representation of some decimal value would really look like. If you can provide an example, please do so.
Karim

