How to multiply 8 and -6 using 2's compliment method?
- DixonLv 71 month ago
If you are given 8 x (-6) as decimal numbers (ie like in this question) the answer is clearly decimal -48. Then convert 48 to binary and do 2's complement.
If you are given the numbers electronically in binary, like in an ALU, the -6 is already in 2's complement form. Multiplication works directly on 2's complement numbers just the same as with positive numbers. So in this case x8 is achieved by shifting binary -6 left three places and filling with zeros from the right.
- geezerLv 71 month ago
In 2's compliment form, a negative number is the 2's compliment of it's positive number, with the subraction of the two numbers being A - B = A + (2's compliment of B) using much the same method as before, as basically, 2's compliment is 1's compliment + 1.
To get the 2's compliment negative notation of an integer you write out the number in binary .. invert the digits .. and add 1.