hudi
hudi

Reputation: 16555

Which operation in BigInteger I can use

I have bigInteger = 256 which is 100000000 in binary. What operations do I have to use to get the result 1 = 000000001 in binary?

EDIT:

BigInteger.valueOf(256).xxx = 1

Upvotes: 0

Views: 82

Answers (1)

GriffeyDog
GriffeyDog

Reputation: 8386

BigInteger newInt = new BigInteger("256").shiftRight(8);

Upvotes: 3

Related Questions