<<< The Overfow Output     Index     Signed Numbers Addition, Cont. >>>

9. Signed Numbers Addition


  • Two-bit signed data type:

    BINARY DECIMAL
    sign bit data bit
    0 0 0
    0 1 1
    1 1 -1
    1 0 -2

  •  

  • Notice that when operands have opposite signs, their sum will never overflow:

        1 + -2 = -1
        1 + -1 = 0
    
  • Therefore, overflow can only occur when the operands have the same sign:

          1 + 1 = 2
        -2 + -2 = -4
        -2 + -1 = -3
    
  • None of the results  { 2, -4, -3 }  can fit into the two-bit signed data type.


<<< The Overfow Output     Index     Signed Numbers Addition, Cont. >>>