Add two signed
numbers examples below.
EX1: +7, -
+7 -
Step 1: Convert to 2's complement for negative numbers.
+7 (in Binary 4’b0111)
-
Step 2
Add and store the result in sum register of 5 bits wide.
0 111
1 010
-
1 0 001
-
Step 3
Carry into signed bit and carry out of signed bit. In this scenario discard MSB msb bit. Use lower 4 bits as signed representation.
Result: 4’b0 001 = 0x1 = +1