title: 24 bit signed data type
body: <p>I am recieving data from a ublox GPS module in 24 bit long bitfields (3 bytes of a 4 byte message), and I need to convert these 24 bit data fields to signed decimal values, but I can't find the description of how to do this in the specification. Also I know certain values from another program that came with the module. </p>
  
  <p>For positive values, it seems that it just simply converts the 24 bit binary number to dec and that's it, e.g. <code>0x000C19 = 3097</code> and <code>0x000BD0 = 3024</code> , but for negative numbers I'm in trouble. 2's complement doesn't seem to work. Here are some known values: <code>0xFFFFC8 = -57</code>, <code>0xFCB9FE = -214528</code>, <code>0xFF2C3B = -54215</code> and <code>0xFFFA48 = -1462</code>. Using 2's complement, the conversion is a few numbers off every time ( -56,  -214530, -54213, -1464, respectively). (Hex numbers are used to avoid having to write 24 digits every time.) </p>
  
  <p>Thanks for your help in advance! </p>