以2’s complement 計算-10-33=?

以2’s complement 計算-10-33=?

以2’s complement 計算-10-33=?

1 Answer

Rating
  • Favorite Answer

    -10-33可看作 (-10)+(-33)+10 = 1010 → 做1’s complement = 0101 → 再做2’s complement = 0101+1 = 11110110 = -10+33 = 100001 → 做1’s complement = 011110 → 再做2’s complement = 011110+1 = 11011111 = -33因為是負數,所以不足要補1故(-10)+(-33) = 11110110+11011111 = 111010101 進位可捨,無須端回進位 若要驗算,則倒回做11010101 – 1 = 11010100 再將1變0、0變1即可 → 00101011 = -43

    Source(s): 有問題再提問
Still have questions? Get your answers by asking now.