title: How do I convert byte values into decimals?
body: <p>I'm trying to load some decimal values from a file but I can't work out the correct way to take the raw values and convert them into decimals.</p>
  <p>I've read the file out into a byte array, and each chunk of four bytes is supposed to represent one decimal value. To help figure it out, I've constructed a table of how the decimal values 1 through to 46 are represented as four byte chunks.</p>
  <p>For instance, the number 1 appears as 0,0,128,63 the number 2 as 0,0,0,64 and so on up to 46, which is 0,0,56,66. The full table is available <a href="http://dl.dropbox.com/u/635601/Example1.txt" rel="nofollow noreferrer">here</a>.</p>
  <p>There is also another series of numbers which go to three decimal places and include negatives, which is <a href="http://dl.dropbox.com/u/635601/Example2.txt" rel="nofollow noreferrer">here</a>.</p>
  <p>The only documentation I have states</p>
  <p>They are stored least significant byte first:  1's,  256's,  65536's,  16777216's.  This makes the hex sequence 01 01 00 00 into the number 257 (decimal).  In C/C++, to read e.g. a float, do:   float x;   fread(&amp;x, sizeof(float), 1, fileptr);</p>
  <p>However I'm using .NET's File.ReadAllBytes method so this isn't much help. If anyone can spare a few minutes to look at the examples files and see if they can spot a way to convert the values to decimals I'd be most grateful.</p>