0

# Perfor the following operation using 1's complement method (use 8 bit). 31+(-10)

please help me with this

1 Answer

0

+31 (base 10) = 00011111 (base 2)
+10 (base 10) = 00001010 (base 2)
-10 (base 10) = 11110110 (base 2) (*)
31-10 (base 10) = 00011111
+11110110
= 00010101 (base 2)(**)
= 21 (base 10)
Note that (*) is the binary complement, and (**) is truncated to 8 bits.