I have some piece of code where is use BigInteger.and operation and I am not sure what is this doing. In javadoc is written bigIng & bigInt but this doesn help me to. Can someone explain me in this example ?
512.and(113078212145816597093331040047546785012958969400039613319782796882727665664)
The
andoperation returns the result of performing bitwise and on binary representations of two big integers. In your particular example, bit number ten is extracted, because the binary representation of 512 is1000000000.