Hojo
0
Q:

bitwise operator in java

int a=a<<n;
//where n is the number of places a is shifted towards left.
1
a = 5 = 0101 (In Binary)
b = 7 = 0111 (In Binary)

Bitwise AND Operation of 5 and 7
  0101
& 0111
 ________
  0101  = 5 (In decimal) 
0

New to Communities?

Join the community