Add two signed numbers examples
below.
EX1: -
-
Step 1: Convert to 2's complement for negative numbers.
-
+6 (in Binary 4’b0110).
Step 2
Add and store the result in sum register of 5 bits wide.
1 001
0 110
-
1 111
-
Step 3
No carry into signed bit and no carry out of signed bit. In this scenario keep MSB as sign and take 2’s complement of lower 3 bits.
Result: 4’b1 001 = 0x11 = -