实现60的二进制到十六进制的转换
手动实现:
int i1 = 60;
int i2 = i1 & 15;
String j = (i2 > 9) ? (char)(i2-10 + 'A') + "" : i2 + "";
int temp = i1 >>> 4;
i2 = temp & 15;
String k = (i2 > 9) ? (char)(i2-10 + 'A') + "" : i2 + "";
System.out.println(k + "" + j);
实现60的二进制到十六进制的转换
手动实现:
int i1 = 60;
int i2 = i1 & 15;
String j = (i2 > 9) ? (char)(i2-10 + 'A') + "" : i2 + "";
int temp = i1 >>> 4;
i2 = temp & 15;
String k = (i2 > 9) ? (char)(i2-10 + 'A') + "" : i2 + "";
System.out.println(k + "" + j);