0
4.6kviews
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
335views

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.