Decimal.GetBits() Method is used to convert the value of a specified instance of Decimal to its equivalent binary representation.
Syntax: public static int[] GetBits (decimal d);
Here, it takes the floating point value to convert.
Return Value: This method returns a 32-bit signed integer array with four elements that contain the binary representation of d.
Below programs illustrate the use of
Decimal.GetBits() Method
Example 1:
Output:
Bit[0] = FFFFFFFF
Bit[1] = FFFFFFFF
Bit[2] = 00000000
Bit[3] = 00000000
Example 2: