×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

show floating point binary

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.

RE: show floating point binary

If you are running v7.1, try the new typecast() function.

>> format hex
>> typecast(-0.00300634,'uint64')

ans =

   bf68a0c07f618a09

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources