1. ## two's complement

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..

2. $29_{10} = 00011101_2$. To get $-29$ invert the digits and add one.

$(-29)_{10} = (11100010+1)_2 = 11100011_2$, so yes you are correct.

3. The idea behind 2's complement arithmetic is to represent 29 as a negative binary number

$89-29=80+(-29)$

In binary, $29=2^4+2^3+2^2+2^0=00011101_2$

To write $-29$ 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.

$01011001_2+11100011_2=00111100_2$

with a carry into the 9th bit position, which means the result is positive.

The result should be 60.

$00111100_2=2^2+2^3+2^4+2^5=4+8+16+32=60$