Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Unfortunately, my Digital Design text does a rather poor job ofexplaining how ex

ID: 3613355 • Letter: U

Question

Unfortunately, my Digital Design text does a rather poor job ofexplaining how exactly Two's Complement by computer circuitry isused to add and subtract Boolean numbers. I realize how acomplement is obtained: You just flip all the 1s to 0s andall the 0s to 1 and then add 1. I'd just like to know how itall ties together to ultimately add and subtract positive andnegative numbers. Does the circuitry deal with the actualnumber and its' complement separately and then tie themtogether somehow? Would appreciate a complete and clearexplanation of this.

Explanation / Answer

please rate - thanks Hope this helps to do subtraction, the computer just finds the 2's complement ofthe subtrahend (bottom number) and adds suppose you have a negative number, and you're subtracting apositive number, so you're going to end up with another negativenumber, i.e. adding the two's complement of a number is the samething as subtracting the number. if your subtracting a negative number, and you find the 2'scomplement and then add, well what do you do when you subtract anegative number, you add. If when you do the addition if there is an extra carry. example you have a 32 bit word, but the answer is 33 bits, throwaway the extra bit example 5 + 3        101+11=1000 example 5-3   (using only 4 bits) 5-3 is the same as5+(-3)          -3 in 4 bits   0011   change to 1100 + 1-3 in 4 bits = 1101           0101 +1101=10010 ignore the extra bit answer is 0010 5-3=2