title: Is there a reason why I am getting this unexpected result for >> operator?
body: <p>I have a long which is made with this code:</p>
  <pre><code>long binary = 0b1L&lt;&lt; 63;
  </code></pre>
  <p>This gives the expected result, a one at the 63rd index:</p>
  <pre><code>1000000000000000000000000000000000000000000000000000000000000000
  </code></pre>
  <p>But when I take this long, and apply the &gt;&gt; operator to it, it gives me an unexpected result.
  For example, when I call this code snippet on the above binary:</p>
  <pre><code>long newBinary = binary &gt;&gt;8;
  </code></pre>
  <p>It shifts right the right amount, but it fills the leading zeros with ones:</p>
  <pre><code>1111111110000000000000000000000000000000000000000000000000000000
  </code></pre>
  <p>Is there a specific reason why this is happening?</p>