show floating point binary
show floating point binary
(OP)
I'm doing some work in Matlab that requires the analysis (and modification) of numbers on a bit level.
I want to convert numbers like this: -0.00300634
into it's double-precision floating point binary representation (1 bit sign, 11 bit exponent, 52 bit mantissa) so I can perform hamming distance calculations as well as modify certain bits in the sequence. I know that Matlab stores and performs arithmetic on numbers in this format so I was wondering if there exists functions that allow this sort of thing to be done.
I want to convert numbers like this: -0.00300634
into it's double-precision floating point binary representation (1 bit sign, 11 bit exponent, 52 bit mantissa) so I can perform hamming distance calculations as well as modify certain bits in the sequence. I know that Matlab stores and performs arithmetic on numbers in this format so I was wondering if there exists functions that allow this sort of thing to be done.





RE: show floating point binary
>> format hex
>> typecast(-0.00300634,'uint64')
ans =
bf68a0c07f618a09