如何用8位转换两个单独数字中的两个字节数?(How to convert a two bytes number in two indivudal numbers with 8 bits? [duplicate])
如何用8位转换两个单独数字中的两个字节数?(How to convert a two bytes number in two indivudal numbers with 8 bits? [duplicate])
这个问题在这里已有答案:
将整数转换为字节数组(Java) 9个答案
假设我有两个字节映射的数字520给我数字:
如何用8位转换两个单独数字中的两个字节数?(How to convert a two bytes number in two indivudal numbers with 8 bits? [duplicate])
这个问题在这里已有答案:
将整数转换为字节数组(Java) 9个答案假设我有两个字节映射的数字520给我数字:1000001000我想将这个数字(520)转换为另外两个数字,这些数字应该是:2和8因为00000010会给我2和00001000会给我8.我怎么能用java做到这一点?
This question already has an answer here:
Convert integer into byte array (Java) 9 answersSuppose i have the number 520 that is mapped in two bytes that gives me the number: 1000001000 and i want to convert this number (520) to two other numbers, these numbers should be: 2 and 8 because 00000010 will give me 2 and 00001000 will give me 8. how can i do this with java?
最满意答案
像这样:
int theumber = 520; byte oneumber = (byte)theumber; byte otherumber = (byte)(theumber >> 8);Like this:
int theumber = 520; byte oneumber = (byte)theumber; byte otherumber = (byte)(theumber >> 8);#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
上传时间: 2023-07-26 17:24:11
推荐阅读
留言与评论(共有 17 条评论) |
本站网友 福州小区 | 0秒前 发表 |
这些数字应该是:2和8因为00000010会给我2和00001000会给我8.我怎么能用java做到这一点? This question already has an answer here | |
本站网友 thead | 1分钟前 发表 |
1000001000 and i want to convert this number (520) to two other numbers | |
本站网友 如此竞争 | 8分钟前 发表 |
这些数字应该是:2和8因为00000010会给我2和00001000会给我8.我怎么能用java做到这一点? This question already has an answer here | |
本站网友 青岛复印机租赁 | 23分钟前 发表 |
如何用8位转换两个单独数字中的两个字节数?(How to convert a two bytes number in two indivudal numbers with 8 bits? [duplicate]) 这个问题在这里已有答案: 将整数转换为字节数组(Java) 9个答案 假设我有两个字节映射的数字520给我数字:1000001000我想将这个数字(520)转换为另外两个数字 | |
本站网友 bias指标详解 | 24分钟前 发表 |
int theumber = 520; byte oneumber = (byte)theumber; byte otherumber = (byte)(theumber >> 8); | |
本站网友 常州新城金郡 | 10分钟前 发表 |
these numbers should be | |
本站网友 红桥租房 | 10分钟前 发表 |
如何用8位转换两个单独数字中的两个字节数?(How to convert a two bytes number in two indivudal numbers with 8 bits? [duplicate]) 这个问题在这里已有答案: 将整数转换为字节数组(Java) 9个答案 假设我有两个字节映射的数字520给我数字:1000001000我想将这个数字(520)转换为另外两个数字 | |
本站网友 云爆发 | 4分钟前 发表 |
1000001000 and i want to convert this number (520) to two other numbers | |
本站网友 温岭二手房 | 8分钟前 发表 |
int theumber = 520; byte oneumber = (byte)theumber; byte otherumber = (byte)(theumber >> 8); | |
本站网友 无损音乐论坛 | 1分钟前 发表 |
如何用8位转换两个单独数字中的两个字节数?(How to convert a two bytes number in two indivudal numbers with 8 bits? [duplicate]) 这个问题在这里已有答案: 将整数转换为字节数组(Java) 9个答案 假设我有两个字节映射的数字520给我数字:1000001000我想将这个数字(520)转换为另外两个数字 | |
本站网友 丢雷 | 29分钟前 发表 |
these numbers should be | |
本站网友 周北辰 | 12分钟前 发表 |
如何用8位转换两个单独数字中的两个字节数?(How to convert a two bytes number in two indivudal numbers with 8 bits? [duplicate]) 这个问题在这里已有答案: 将整数转换为字节数组(Java) 9个答案 假设我有两个字节映射的数字520给我数字:1000001000我想将这个数字(520)转换为另外两个数字 | |
本站网友 恩奇都 | 23分钟前 发表 |
these numbers should be | |
本站网友 丹参片 | 0秒前 发表 |
Convert integer into byte array (Java) 9 answers Suppose i have the number 520 that is mapped in two bytes that gives me the number | |
本站网友 辛香汇菜单 | 26分钟前 发表 |
2 and 8 because 00000010 will give me 2 and 00001000 will give me 8. how can i do this with java? 最满意答案 像这样: int theumber = 520; byte oneumber = (byte)theumber; byte otherumber = (byte)(theumber >> 8); Like this | |
本站网友 白癜风的早期症状 | 28分钟前 发表 |
这些数字应该是:2和8因为00000010会给我2和00001000会给我8.我怎么能用java做到这一点? This question already has an answer here |