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: 10112=−8+2+1=−5
Signed extension & truncation:
Given MSB is 1, more 1s added in the most left doesnt change its value.
Same as 0
ex: 10112=1110112=−32+16+8+2+1=5
But truncation will not change value if the MSB is not 1
Calculation:
Much simplier than Signed integer
Given B1+B2
Addition:
Convert negative numbers to their two’s complement form.
Perform regular binary addition.
If there’s an overflow (carry-out from the MSB), the result overflows and might need correction depending on the specific application.
Subtraction:
Negate the subtrahend (the number being subtracted) by taking its two’s complement.