Master Addition and Subtraction with Interactive Learning
In digital systems, signed-magnitude representation is one of the simplest ways to represent positive and negative numbers.
0 → Positive Number
1 → Negative Number
| Operation | Add Magnitudes | Subtract Magnitudes | ||
|---|---|---|---|---|
| Same Signs | A > B | A < B | A = B | |
| (+A) + (+B) | +(A + B) | – | – | – |
| (+A) + (−B) | – | +(A − B) | −(B − A) | +0 |
| (−A) + (+B) | – | −(A − B) | +(B − A) | +0 |
| (−A) + (−B) | −(A + B) | – | – | – |
| (+A) − (+B) | – | +(A − B) | −(B − A) | +0 |
| (+A) − (−B) | +(A + B) | – | – | – |
| (−A) − (+B) | −(A + B) | – | – | – |
| (−A) − (−B) | – | −(A − B) | +(B − A) | +0 |