title: Big O Notation-Please explain O(log2n)
body: <p>I'm having trouble understanding why this piece of code is O(log 2^n) for its Big O Notation:</p>
  
  <pre><code>for (int i = n; i&gt;=1; i=i/2){
      sum = i+j;
  }
  </code></pre>
  
  <p>I thought it would be O(n).</p>