I'm working with double
s and need to find the binary version of 827.0
.
From looking around the way to do it is this.
So I do:
double myDouble = 827.0;
Long.toBinaryString(Double.doubleToRawLongBits(myDouble))
However this is returning:
100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000100000010001001110110000000000000000000000000000000000000000000
instead of 1100111011
.
Any idea where I'm going wrong?