作者:婉里去_ | 来源:互联网 | 2023-05-19 07:56
IamworkingonanapplicationinwhichIreceiveda16bytearrayresponse.Inthatresponsethere
I am working on an application in which I received a 16 byte array response. In that response there will be 1 bit set to indicate a position value. For example I may get:
我正在处理一个应用程序,其中我收到了一个16字节的数组响应。在该响应中,将设置1位以指示位置值。例如,我可能得到:
0000 01000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 01000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Which would represent that device #5 has responded (first bit represents device #0).
这表示设备#5已响应(第一位表示设备#0)。
Is there a simple way to get convert a byte array of this length to it's decimal value?
是否有一种简单的方法可以将此长度的字节数组转换为十进制值?
3 个解决方案