title: Binary numbers in Java Least Significant
body: <p>Im trying to write a method that returns me the least 2 significant binary numbers of any number from 0 to 255 both inclusive, which returns it in decimal, apparently I could use mod operator % but I dont know what to do because with this method it doesnt return me the correct 2 least sig. For 19, it should return 3 since the last 2 significant (11) are equal to 3 in decimal</p>
  
  <pre><code>public static int getLeastSignificant2( int num )
  
  {
  
      int first = num&lt;&lt;6
  
      int finalD = first&gt;&gt;&gt;6;
  
      return finalD; 
  }
  </code></pre>