I am working with HART protocol to send data to a device over serial com port. The HART protocol requires that floats use IEEE-754 format. For example to send the float 4.025 to the device I have to convert it to IEEE-754 format which is 0x40 80 CC CD and send this to the device.
Receiving data is the reverse--the device sends a float to me such as 0x40 80 CC CD and I have to convert it to decimal 4.025.
Are there any suggestions as to how to convert both ways: 1. decimal to binary and 2. binary to decimal?
I use C++ Borland