. To get invert the digits and add one.
, so yes you are correct.
Perform the following arithmetic operation using 8-bit
two's complement
a) 8710 - 2910
i just want to know.. am i converting the number correctly?
89 = 0101 1001
-29 = 1110 0011
or...
i should change from decimal to binary...
then, apply two's complement to the number?
i know how to perform the arithmetic.. just bit confused with the representation of the number..
The idea behind 2's complement arithmetic is to represent 29 as a negative binary number
and add instead of subtract.
In binary,
To write in 2's complement form, invert the bits and add 1.
8-bit negative numbers have a 1 in the most-significant bit position.
Positive numbers have a 0 there.
with a carry into the 9th bit position, which means the result is positive.
The result should be 60.