title: Java Bitwise & operator multiple permission
body: <p>I am working on a java web application and in a database table i have a column of type number. but that column is for storing the multiple values . (ie Permission like below) </p>
  
  <ol>
  <li>nothing = 1; </li>
  <li>view = 2;</li>
  <li>add = 4;</li>
  <li>edit = 8;</li>
  <li>insert = 16;</li>
  <li>delete = 32;</li>
  <li>all = 64;</li>
  </ol>
  
  <p>Problem </p>
  
  <ol>
  <li>if that column has value 3 --> then i need to pick nothing,view as
  permission .</li>
  <li>if that column has value 12 --> then i need to pick add ,
      edit.</li>
  </ol>
  
  <p>something like this</p>
  
  <p>I undserstood like we can do this by bitwise operator . Any code to acheive this would be great .</p>