title: Iterate through every bit mask of integer in bit count increasing order
body: <p>What is the most efficient way to iterate through all bit masks of the integer in the bit count increasing order?</p>
  
  <p>at first I need to iterate only through one bit masks:</p>
  
  <p><strong>0001
  0010
  0100
  1000</strong></p>
  
  <p>then through two bit masks:</p>
  
  <p><strong>0011
  0101
  1001
  0110
  1010
  1100</strong> </p>
  
  <p>and so on.</p>