title: How to divide integer by a constant integer with right shift operators?
body: <p>I'm interested how to do this, because I just found out you can do integer multiplication easily, by using left shift operators:</p>
  
  <pre><code>x * 25 = (x &lt;&lt; 4) + (x &lt;&lt; 3) + x
  </code></pre>
  
  <p>Where the sum of base 2 powers equals to 25: 2^4+2^3+2^0 = 25</p>
  
  <p>How does <code>x / 25</code> work out with right shifts?</p>
  
  <p>Edit: I'm not going to replace division and multiplication in my programs by these shift operators in hope of speed boost ;)</p>