how to do two complement multiplication and division of integers?
I have read this post on binary multiplication using two complement. but it is not very clear to me. Even I have difficulty understanding the wiki article on this. I want to know how to go about calculating multiplications of negative numbers: eg: -1 with -7 should give 7. A 4-bit, 2's complement of -1 is : 1111 A 4-bit, 2's complement of -7 is : 1001 some step-wise way of calculating the multiplication will be helpful. No article I came across talks about division. How to approach this? step 1: sign extend both integers to twice as many bits. This is safe to do, though may not always be