Description:

  • Representing signed integers (both positive and negative numbers) in binary form, where the most significant bit (MSB) signifies the sign as well as the supposed value but negative
    • ex:

Signed extension & truncation:

  • Given MSB is 1, more s added in the most left doesnt change its value.
    • Same as
    • ex:
  • But truncation will not change value if the MSB is not 1

Calculation:

  • Much simplier than Signed integer
  • Given B1+B2
  • Addition:
    1. Convert negative numbers to their two’s complement form.
    2. Perform regular binary addition.
    3. If there’s an overflow (carry-out from the MSB), the result overflows and might need correction depending on the specific application.
  • Subtraction:
    1. Negate the subtrahend (the number being subtracted) by taking its two’s complement.
    2. Perform addition as described above.