title: Calculate the log base n with Shift left or Shift right
body: <p>I have a little problem.
  Who knows how we can calculate the log 
  base n with Shift_L or Shift_R?</p>
  
  <p>for example: for n=2 we had this solution:</p>
  
  <pre><code>int log(int n){
  int res = 0;
  while((n&gt;&gt;=1))
      res++;
  return res;
  }
  </code></pre>