Binary Lesson 11 – Binary Multiplication

September 25, 2014
lesson11Binary multiplication is performed the same as decimal multiplication. The numbers we are multiplying together are called factors, and the result of multiplication is called the product.

The only challenge comes from multi-row addition, which is facilitated if we perform the addition two rows at a time.

Multiplying Binary Whole Numbers

   11
 x 11
------
   11
+ 11
------
 1001b

It sometimes helps to pad the rows with zeros to make column alignment more obvious and to avoid addition mistakes.

   11
 x 11
------
  011
+ 110
------
 1001b

The multiplication part is ridiculously easy because we are multiplying by 1 or 0. In fact, when multiplying by 1, simply copy the row. When multiplying by zero, fill the row with all zeros, and indent the zero row properly. Do not skip zero rows since they help us obtain the correct answer.

   101
 x 101
-------
   101  <--- Copy the top row
  000   <--- All zeros
 101    <--- Copy the top row
-------

If we omit the second row containing all zeros, then it is easy to forget to indent the third row by two places.

Multiply 111b x 111b

     111
  x  111
---------
     111
    111
 + 111
------------

Here we see three rows to add after the multiplication is complete. While it is possible to add multiple rows together, binary addition is easiest when performed two rows at a time. Sum two rows at a time starting from the top row. Maintain the alignment by padding each row with zeros so each row contains the same number of bits and in their proper place values. If a bit is misaligned, the product will be wrong. The shape of the columns should be a square or a rectangle.

      111            00111  
     111     --->    01110
 +  111            + 11100
-----------        -------- 

Perform the two-row addition off to the side, and cross out completed rows.

a

Adding three rows together, two at a time. While it is possible to add multiple rows in binary, breaking the addition into steps of two helps reduce binary addition errors.

111b x 111b = 110001b. Verify by converting to decimal and multiplying.

111b = 7d. 7 x 7 = 49d. Convert 49d to binary: 110001b. Therefore, the product is correct.

Multiplying Binary Fractions

Align both rows by the least significant bit and multiply the same way as in decimal multiplication. The final position of the radix point is the sum of the number of radix point places from both factors.

    10.10b     2.5d
  x  1.01b    1.25d
-----------
     1010
    0000
   1010
----------------
  11.0010b  (3 1/8 = 3.125d)

When multiplying, binary fractions do not need to be lined up by the radix point.

   101.1      5.5d
 x  1.01      1.25d
----------
 110.111      6.825d
    ^
    |
    +---- Radix point is placed three places from the least significant bit.
          The top factor has a radix point at one place from the right, and the
          bottom factor has a radix point three places from the right.
          
          1 place + 2 places = 3 places, so we insert a radix point at three places.

As for adding,

   101.1    
 x  1.01      
----------
    1011                
   0000
  1011
----------

We pad with 0s to help avoid alignment mistakes.

   101.1    
 x  1.01      
----------
  001011                
  000000
  101100
----------

We could add two rows at a time, but in this case, there is no need. A row consisting of all 0s can be ignored, so we add the top and bottom rows in one step. Use binary addition.

   101.1    
 x  1.01      
----------
   1 <------ Carry bit from the sum of column 4. 1 + 1 = 10b, remember?
  001011                
  000000
  101100
----------
  110111

Now, we include the radix point in the product at three places from the right.

   101.1    
 x  1.01      
----------
  001011                
  000000
  101100
----------
 110.111  <--- Radix point added at three places because 1 place + 2 places = 3 places.

We can verify the correct product by converting to decimal, multiplying in decimal, and then converting back to binary. If the resulting binary number matches the original binary product, then the answer is correct.

101.1b = 5.5d
1.01b = 1.25d

   1.25
 x  5.5
---------
  6.875
   
6.875d = 110.111b  Correct

We have not covered conversion from a decimal fraction into binary yet, so this example used a pattern that we have seen before: .111 = .875. Always. (0.5 + 0.25 + 0.125 = 0.875d)

Practice

Surprisingly, binary multiplication will consume the most time with addition, so this is excellent addition practice. Try these practice problems using pencil and paper. You may use a calculator only to verify binary/decimal conversions.

  1. 11b x 11b  Verify the correct product by multiplying in decimal.
  2. 1.1b x 1.1b   Convert product to decimal.
  3. 101.1b x 1.01b Verify by multiplying in decimal.
  4. 1111b x 0b
  5. 111b x 101b
  6. 0.001b x 0.0001b
  7. 1b x .01b
  8. 10.10b x 1.01b Convert product to decimal.

Answers

  1.  1001b. 11b = 3d. 3 x 3 = 9d. 9d = 1001b.
  2. 10.01b = 3.25d or 3 1/4
  3. 110.111b  = 6.875d
  4. 0. Anything multiplied by 0 is 0 no matter the base system. How can you get something from nothing?
  5. 100011b = 35d  (7 x 5 = 35d)
  6. 0.0000001b  or 2^-7 or 1/8 x 1/16 = 1/128 = .0078125d
  7. 0.01b or 0.25d or 1/4d. Anything multiplied by 1 is the number itself.
  8. 11.001b = 3.125d

  1. Leave a comment

Leave a comment