title: 64bit shift problem
body: <p>Why this code does not write 0 as a last element but 18446744073709551615?
  (compiled with g++)</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  int main(){
      unsigned long long x = (unsigned long long) (-1);
      for(int i=0; i &lt;= 64; i++)
          cout &lt;&lt; i &lt;&lt; " " &lt;&lt; (x &gt;&gt; i) &lt;&lt; endl;
      cout &lt;&lt; (x &gt;&gt; 64) &lt;&lt; endl;
      return 0;
  }
  </code></pre>