Check out example codes for "bitwise operator in java". It will help you in understanding the concepts better.

Code Example 1

int a=a<<n;
//where n is the number of places a is shifted towards left.

Code Example 2

a = 5 = 0101 (In Binary)
b = 7 = 0111 (In Binary)

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

Learn ReactJs, React Native from akashmittal.com