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) Digital Logic digital-logic turing-machine theory-of-computation number + – Parimal Paritosh asked Sep 20, 2017 Parimal Paritosh 3.8k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes 1001(-7) + 1010(-6) =10011(result is in 2's form) 10011(-13) 01100 +1 =1101(+13) Ankit001 answered Sep 21, 2017 Ankit001 comment Share Follow See all 0 reply Please log in or register to add a comment.
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) pawan kumarln answered Sep 21, 2017 pawan kumarln comment Share Follow See all 0 reply Please log in or register to add a comment.
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. ♥_Less answered Oct 7, 2017 ♥_Less comment Share Follow See all 0 reply Please log in or register to add a comment.