title: Assembly, overflow detection
body: <p>I'm using pcspim.
  I have two N bits length binary numbers.(2's complements)
  say one of them is in $8(register 8)
  another one of them is in $9 (register 9)
  This numbers are "2's complements" of corresponding given numbers.
  (one 2's complement is in register 8,
  another 2's complement is in register 9)</p>
  
  <p>I want to do the following:
  add these 2 numbers
  setup any register (say $10) to all 0s if there is no overflow with the positive numbers adding and setup all ones if there is overflow. 
  setup any register (say $11) to all 0s if there is no overflow with the negative numbers adding and setup all ones if there is overflow.</p>
  
  <p>(In one case i have 2's complements of 2 positive numbers(in $8 and $9),
  in 2-n case i have 2's complements of 2 negative numbers(in $8 and $9))</p>
  
  <p>How can i do this? (without using if)</p>
  
  <p>For the case when these numbers are not two's complements, i just could shift the addition result for corresponding number of bits, to detect overflow.</p>
  
  <p>I don't imagine what to do in this case.</p>