title: Why does a right shift on a signed integer causes an overflow?
body: <p>Given any 8 bits negative integer (signed so between -1 and -128), a right shift in HLA  causes an overflow and I don't understand why. If shifted once, it should basically divide the value by 2. This is true for positive numbers but obviously not for negative. Why? So for example if -10 is entered the result is +123.</p>
  
  <pre><code>       Program cpy;
  
         #include ("stdlib.hhf")
         #include ("hla.hhf")
  
  
       static
       i:int8;
  
  
      begin cpy;
      stdout.put("Enter value to divide by 2: ");
      stdin.geti8();
      mov(al,i);
  
  
     shr(1,i); //shift bits one position right
     if(@o)then   // if overlow
     stdout.put("overflow");
     endif;
  
     end cpy; 
  </code></pre>