# Decimal Constructor (Int32[])

**.NET Framework 4.5**

Initializes a new instance of Decimal to a decimal value represented in binary and contained in a specified array.

**Namespace:**System

**Assembly:**mscorlib (in mscorlib.dll)

Exception | Condition |
---|---|

ArgumentNullException | bits is a null reference (Nothing in Visual Basic). |

ArgumentException | The length of the bits is not 4. -or- The representation of the decimal value in bits is not valid. |

The binary representation of a Decimal number consists of a 1-bit sign, a 96-bit integer number, and a scaling factor used to divide the integer number 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.

bits is a four-element long array of 32-bit signed integers.

bits [0], bits [1], and bits [2] contain the low, middle, and high 32 bits of the 96-bit integer number.

bits [3] contains the scale factor and sign, and consists of following parts:

Bits 0 to 15, the lower word, are unused and must be zero.

Bits 16 to 23 must contain an exponent between 0 and 28, which indicates the power of 10 to divide the integer number.

Bits 24 to 30 are unused and must be zero.

Bit 31 contains the sign; 0 meaning positive, and 1 meaning negative.

A numeric value might have several possible binary representations; all are equally valid and numerically equivalent. Note that the bit representation differentiates between negative and positive zero. These values are treated as being equal in all operations.

#### .NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1#### .NET Framework Client Profile

Supported in: 4, 3.5 SP1#### XNA Framework

Supported in: 3.0, 2.0, 1.0#### Portable Class Library

Supported in: Portable Class LibrarySupported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8