bit « biginteger « Java Data Type Q&A





1. Get the maximum value for a BigInteger with n bits    stackoverflow.com

I want to compare two multiplication methods implemented in Java which use shift operations on big numbers. Thus I need sufficiently large BigIntegers. Since I want to compare them bit-wise, what would ...

2. Bits to BigInteger    forums.oracle.com

Hi friends!, I want to convert a bit set in a BigInteger. I have tried with a byte array but I have the following problem: BigInteger a = new BigInteger(new byte[]{127}); !That is good!, because when I print my BigInteger the value is 127. BigInteger a = new BigInteger(new byte[]{1,127}); That is wrong because my BigInteger print 383, that is equivalent ...