1
votes

Guys need some help to solve a question. I am trying to learning Complement notation which is in my bca course. Recently i finished the 2's complement notation chapter, ans stuck at question. Can some one describe me that how to subtract

a)10 from 14

b)14 from 10

using 2's complement notation.

What i have done is

Above numbers in binary. 10=1010 14=1110

two's complement of the two numbers. 1010=>0101+1=0110 1110=>1110+1=1111

Now i am stuck how will i solve the

a)Subtraction of 10 from 14

b)Subtraction of 14 from 10

Please use descriptive way so i can understand each step for both subtraction. Thanks in advance.

3
To get Two's Compliment you invert the bits. To Subtract, you add one side of the expression to the Two's Compliment of the other. I don't understand what you mean by notation. - Jodrell
@Jodrell my question here is the BCA exam question. I need to find Perform 2’s complement subtraction of following: A) 10 from 14 b) 14 from 10 - jyoti

3 Answers

1
votes

At last, we have found the solution


10 in binary 00001010 2's complement of 10 is 0110

14 in binary 00001110 2's complement of 14 is 0010

4 in binary 0000 0100 2's complement of 4 is 1111 1100

2's Complement Subtraction=>

10 - 14 = (-4) 0000 1010 = +10

+ 1111 0010 = -14

1111 1100 = -4

2's Complement Addition=>

14 - 10 = (+4) 0000 1110 = +14

+ 1111 0110 = -10

10000 0100 = +4

0
votes

Once you are done with 2' complement, You just need to add it.

Subtraction of 14 from 10 1010=>0101+1=0110 [This means -10] 14 + (-10)

1110 +

0110

0100 [Do not worry about the carry]

0
votes

Subtraction of 10 from 14

10=1010 14=1110

2's complement of 1110 is 0010

  1 0 1 0 + 0 0 1 0 = 1 1 0 0

2's complement of 1100 is 0100 10 - 14 = -4 1010 - 1110 =0100