3

I am trying to learn Binary Multiplication, 2's complement negative numbers.

-10
x 3

I know there is a simple way of doing this. Like sign extension and initial partial product.

-10         0110 twos complement
x 3       x 0011
----      ------
          000000  (initial partial product) with sign extension at the MSB
          10110  (bit 0 of the 3 times 10, sign extended at MSB)

          110110  (sign extended sum of initial partial product and
                           Multiplicand)

          10110- (bit 1 of the 3 multiplied by the 10. sign extension at the MSB Note the
                         Multiplicand is shifted left by one bit)

I am lost on how to continue. I am not even sure if i was completely right up to this point. Can someone show me how to do it by steps? I dont want to do it any other way. If i do it the traditional way big numbers could be bad. Thank you

2 Answers2

4

Your interpretation of -10 is off.

   ..11110110  (-10)
×    00000011    (3)
-------------
   ..11110110  (-10)
+ ..111101100  (-20)
-------------
   ..11100010  (-30)
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • 3
    To clarify: you *can't* represent -10 in twos complement in only 4 bits: a 4 bit, 2s-complement integer runs from -8 to +7. So you must do your math with at least 5 bit integers and use at least 10 bits for representing the product. – dmckee --- ex-moderator kitten Oct 10 '10 at 07:44
0

Hope This will help you. Use 2's complement. Overflows are discarded.

-10 in 2's complement is 0110. Add 1111 in front to make it 8 bits.

    11110110  (-10)
    00000011  (3)
  -----------
    11110110
   11110110
  -----------
  1011100010 (discard [10]) 

answer = 11100010

when converted back, it's 30. that means the number represented by,11100010 is -30. (2's comp.)

Uthpala Dl
  • 45
  • 8