tags:

views:

37

answers:

2

I've got two bytes (network order). Let's use them as a short. Now the first 11 bits should be the integer part and the last 5 bits the fractional part (e.g. resulting in 2.4). How do I?

A: 

The accepted answer in this post should more or less answer your question.

Serapth
A: 

Okay, thanks. But how do I make a decimal of that now? :(

aPoC
This isn't an answer. Please consider a comment instead of an answer when seeking more information.
Robaticus
In staying with the code provided, a long can be converted to a decimal as follows.http://msdn.microsoft.com/en-us/library/aa326784(VS.71).aspx
Serapth