title: Binary int to double without typecasting
body: <p>I am doing some microcontroller programming in C. I am reading from various sensors 4 bytes that represent either <code>float</code>, <code>int</code> or <code>unsigned int</code>. Currently, I am storing them in <code>unsigned int</code> format in the microcontroller even though the data may be <code>float</code> since to a microcontroller they are just bytes. This data is then transferred to PC. I want the PC to interpret the <em>binary data</em> as a <code>float</code> or an <code>int</code> or an <code>unsigned int</code> whenever I wish. Is there a way to do that? </p>
  
  <p>Ex.</p>
  
  <pre><code>unsigned int value = 0x40040000; // This is 2.0625 in double
  double result = convert_binary_to_double(value); // result = 2.0625
  </code></pre>
  
  <p>Thanks.</p>
  
  <p>PS: I tried typecasting and that does not work.</p>