c#中 字节数组到浮点型转换

第一种方法:     
byte j1 = ReceiveBytes[4]; //还原第1字节(低位) int j2 = ReceiveBytes[5] * 256; //还原第2字节 << 8 int j3 = j1 + j2;//得到整型 float j4 = j3 / 1000;

串口通信中用到的 http://www.cnblogs.com/binfire/archive/2011/10/08/2201973.html 讲了串口通信操作

第二种方法:

 float S_acc_x = (float)((Int16)(ReceiveBytes[j] << 8 | ReceiveBytes[j + 1])) / 100;//字节处理