Decode floating point values from binary packets

Posted on 2012-09-15
Last Modified: 2013-11-29
I need to reverse engineer how propritory protocol encodes floating point numbers.

What are the different ways in which floating point values can be encoded in binary? Request to provide source code for encoding/Decoding floating point number.

in C# I know it is, BitConverter.GetBytes(float number)

Any other ways?
Question by:coolprg
    LVL 82

    Assisted Solution

    by:Dave Baldwin
    There are multiple sizes of  IEEE 754 (aka. IEC 60559) floating point numbers.  And there are other proprietary standards.  You may need more info about the protocol you're trying to decode.
    LVL 55

    Expert Comment

    by:Jaime Olivares
    What is the purpose of your research?
     Indeed there is not too much secrets about this, but it is rare a case where you need to know the details.

    Author Comment

    Here is the actual message packet:

    B1|B2|B3|B4|B5|B6|B7|B8 |B9 |B10 |B11|B12|B13|B14|B15|B16|B17|B18|B19|B20|B21|B22|B23|B24
    04|ff|00|31|04|01|e0|b2 |b8 |ff  |80 |3d |19 |0b |28 |0f |51 |42 |19 |73 |01 |42 |57 |b8

    Open in new window

    Byte 1 and Byte 2(B1, B2): Message header
    Byte 3 and byte 4(B3,B4): Message type
    B5 to B22: Message Data
    B23 and B24: Message CRC

    In above message, in message data portion(B5 to B22) below values are encoded. I need to determine what bytes and at what positions have these values by what algorithm

    Value1: 52.264801
    Value2: 32.362400
    LVL 55

    Accepted Solution

    Value1 is 42 51 0f 28 (B13 to B16), but is stored in reverse order
    Value2 is 42 01 73 19 (B17 to B20) in similar fashion
    They are encoded as standard IEEE 754

    Author Comment


    super quick and to the point, thanks a lot. Is there any strategy you would like me to suggest to crack similar values in future or tools you have used?
    LVL 55

    Expert Comment

    by:Jaime Olivares
    you can use any online tool like:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    Title # Comments Views Activity
    Code help needed for an 'animated balance scale' 8 40
    Implement VSS on 6509 Switches 52 119
    Silent WINSCP upload 2 41
    Blacklist a site 3 69
    The CRUD Functions CRUD, meaning "Create, Read, Update, Delete (,_read,_update_and_delete)" is a common term to data base developers.  It describes the essential functions of data base table maintenance.  This art…
    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now