0
4.8kviews
Perform the following operation using 2's compliment

i) (7)10(15)10

ii) (50)10(2A)16

Comment on results of (i) and (ii)

1 Answer
0
354views

1) (7)10(15)10

(7)10=(0111)2

(15)10=(1111)2

1's Complement of (15)10 = (0000)2

2's Complement of (15)10 = (0000)2+(0001)2=(0001)2

Now,

(7)10(15)10=(0111)2+(0001)2=(1000)2

Since, no carry over is generated, the result of subtraction is Negative.

The result of subtraction is obtained by taking the 2's Complement of (1000)2

The 2's Complement of (1000)2 is -

1's Complement of (1000)2+(0001)2 ----> (0111)2+(0001)2=(1000)2

Therefore, (7)10(15)10=(8)10

2) (50)10(2A)16

(50)10=(110010)2

(2A)16=(101010)2

1's Complement of (2A)16 = (010101)2

2's Complement of (2A)16 = (010101)2+(000001)2=(010110)2

Now,

(50)10(2A)16=(110010)2+(010110)2=1(001000)2

Since, carry over is generated, the result of subtraction (8)10 is Positive.

Therefore, (50)10(2A)16=(8)10

Please log in to add an answer.