byte tByte = 2;
String str = Integer.toBinaryString(tByte);
String tString = Integer.toBinaryString((tByte & 0xFF) + 0x100).substring(1);

System.out.println("str:" + str);//str:10

System.out.println("tString:" + tString); //tString:00000010

 

相关文章:

  • 2022-02-21
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2021-09-05
  • 2021-11-13
  • 2022-12-23
相关资源
相似解决方案