title: .Net GetHashcode Bit Shifting Operation
body: <p>I was looking through some of the .net source yesterday and saw several implementations of GetHashcode with something along the lines of this:</p>
  
  <pre><code>(i1 &lt;&lt; 5) + i ^ i2
  </code></pre>
  
  <p>I understand what the code is doing and why.  What I want to know is why they used (i1 &lt;&lt; 5) <strong>+</strong> i instead of (i1 &lt;&lt; 5) <strong>-</strong> i.</p>
  
  <p>Most frameworks I've seen use -i because that's equivalent to multiplying by 31 which is prime, but the Microsoft way is equivalent to multiplying by 33 which has 11 and 3 as factors and thus isn't prime.</p>
  
  <p>Is there a known justification for this?  Any reasonable hypotheses? </p>