09-09-25 Lab 4
Class: CSCE-312
Notes:
57 Unsigned -> 0011 1001
-57 -> Use 2's complement
- 1's complement: Invert all bits
- 1100 0110
- Now add 1 to these bits (+1):
- 1100 0111
9 - 7 -> 9 + (-7)
- It is easier to do addition rather than subtraction
- 9: 1001
- 7: 0111
- -7: Use 2's complement
- Add one bit
- 1's complement: Invert all bits
- 11000
- Now add 1 to these bits (+1)
- 11001
- 9 + (-7)
- 01001
- 11001
- = 100010 = 2