in Digital Logic
3,828 views
0 votes
0 votes
Please give me an example of adding two negative numbers using 2's complement number system.

Let's say:

-7 + (-6)
in Digital Logic
3.8k views

3 Answers

1 vote
1 vote
1001(-7) + 1010(-6) =10011(result is in 2's form)

10011(-13)

01100

+1

=1101(+13)
0 votes
0 votes
-7 + (-6) = -13

13 = 00001101 (in 8 bit format,,,,,,+ve number represent in true form)
-13 = 11110011 (in 2's compliment)
0 votes
0 votes
+Range of 2s compliment is -(2^n) to +(2^n-1). So with 4 bits we can represent numbers between -8 to +7.

-7 in 2s compliment = 1001

-6 in 2s compliment = 1010

1001+1010= 0011 with carry 1. Carry of the sign bit and carry into the sign bit are different so overflow occured here.

Answer is 1-0011 in 2s compliment.

so answer is 011 in 2s compliment.

Related questions

1 vote
1 vote
0 answers
4
Ketty asked in Unknown Category Jun 8, 2016
553 views
Ketty asked in Unknown Category Jun 8, 2016
by Ketty
553 views