I am trying to perform some bits of operation in Java for applying masks, representing sets, etc. Why:
int one=1; int two=2; int andop=1&2; System.out.println(andop);
Prints "0" if it is assumed that "3":
0...001 0...010 _______ 0...011
And how can I get this behavior?
Thanks in advance
source share