title: Casting long to byte in Java
body: <p>I am unable to understand the following:</p>
  
  <p>In java, </p>
  
  <pre><code>long l = 130L;  
  byte b = (byte)l;
  </code></pre>
  
  <p>If I print the value of b, why do I get -126? What is the bit representation of long l?</p>