Java BigInteger
sign-magnitude BigInteger
参考
https://stackoverflow.com/a/42913853
1 2byte[] arr = new byte[]{(byte) 1, (byte) 2, (byte) 3}; BigInteger num = new BigInteger(1, arr);
构造函数
- BigInteger(int signnum, byte[] magnitude)
取值
- signnum
- 0 –> 0
- -1 –> negative 负数
1 –> positive 正数
- byte[] magnitude
big-endian byte array
- 高位在末尾(右侧)
- 1000 0000 —> 0000 0001