急啊!进制转换
result1=Integer.parseInt(Integer.toBinaryString(number<<5));怎么将"Binary"二进制变十进制啊!
------解决方案--------------------给个例子:
public class Test {
public static void main(String args[]) {
String s1="11101001010100100101001011010010101111";
String s2="10001001010111111111001011010010101010";
BigInteger bi1 = new BigInteger(s1, 2);
BigInteger bi2 = new BigInteger(s2, 2);
BigInteger bi3 = bi1.xor(bi2);
String s3=bi3.toString(2);
System.out.println("s1 = " + s1);
System.out.println("s2 = " + s2);
System.out.println("s3 = " + s3);
}
明白了吧,给分哈!
------解决方案--------------------学习了 !!!!