Subtraction of binary numbers with $1$’s complement

120 Views Asked by At

A digital calculating system uses $1$’s complement for its computation. Illustrate how the calculating $d$ perform this operation. $$(10000)_2 – (11101)_2$$

1

There are 1 best solutions below

0
On

The rules of subtraction using 1's complement are as follows:

1. Obtain the 1's complement of the subtrahend and then add it to the minuend.

2. (a) If the number obtained in step 1, has an end carry then discard it and add the carry to the least significant digit of the result.

(b) If the number obtained in step 1, has no end carry then obtain 1's complement of the number obtained in step 1 and place a negative sign before it.

Now coming to your question,

Step -1:   minuend = (10000)2
           subtrahend = (11101)2 ----> 1's complement ----> (00010)2
           Binary Addition:  (10000)2 + (00010)2 = (10010)2

Here we don't have an end carry so by applying rule 2(b),

Step -2:  1's complement of the result of step -1, (10010)2 ---> (01101)2
          putting a negative sign before it we get, -(01101)2

So, the result is: -(01101)2