title: clear all bits from MSB through i (inclusive)
body: <p>Below is the code about clearing all the MSB’s (Most Significant Bits) through i (inclusive)</p>
  
  <pre><code>public int clearBitsMSBThrough(int num, int i) {
      int mask = ( 1 &lt;&lt; (i + 1) ) - 1;
      return num &amp; mask;
  }
  </code></pre>
  
  <p>I am confused about "inclusive". 
  For example, if the number is 0011 1010 and i = 3.
  mask will be 0000 1111, and result is 0000 1010,but the bit in position 3 is not cleared as zero.</p>
  
  <p>Am I misunderstanding the question?
  And I think it should be:</p>
  
  <pre><code>int mask = (1 &lt;&lt; i) - 1;
  </code></pre>