boolean algebra - multiplication and division

Discussion in 'Homework Help' started by arwin, Jan 31, 2008.

  1. arwin

    Thread Starter Guest

    about arithmetic multiplication and division, how do we implement it in OR, AND gates.Although I know we can implement it using addition and subtraction respectively like for example:
    2 x 3 = 2 + 2 + 2, we have 2 addition
    6/2 = 6 - 2=4 - 2= 2 - 2; we have 3 subtraction.

    But its too long if we have two or more variables multiplying together.

    a x b x c. Is there a direct way of writing multiplication and division in boolean way.

    Thanking you a lot in advance for spending time to read this.
     
  2. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    145
    This thread has been moved to a more appropriate forum.

    We have made it possible for persons to leave commentary and feedback on the All About Circuits e-book, site and forums in an anonymous fashion, but we require registration to participate in the other board functions, such as technical discussion with other members and requesting information.

    Please read our FAQ for reasons as why to register here at All About Circuits.

    Dave
     
  3. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    145
    Multiplication is a valid operator in Boolean algebra, as it is in normal algebra (essentially the AND function). For complex multiplication, the method is as you have pointed out, a compounded addition. Division is not a valid operator in Boolean algebra and, as you point out, is nothing more than a compounded subtraction. Strangely, subtraction is not wholly valid as an operation - subtraction is achieved by addition of a negative number.

    http://www.allaboutcircuits.com/vol_4/chpt_7/2.html

    The reality is that modern computing technology that relies so much on the fundamentals of Boolean logic is so fast that the effect of a long winded method such as this is negligible.

    Dave
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,793
    One way to do multiplcation is to "shift and add". It is the binary equivalent of the way we learned to do decimal multiplication back in the 3rd grade.

    There are similar algorithms for division. In both cases the calculation time is proportional to the number of bits.

    Neither of these methods is combinatorial. That's a fancy way of saying that you can't write a Boolean expression to represent them. They are examples of sequential circuits that involve the use of memory. Sequential circuits have inputs, outputs, and internal memory to keep track of the present state of the circuit. At each clock pulse they evaluate the inputs and the present state to compute the next state and the outputs.

    One additional thing that might interest you is "Wallace Trees"
     
  5. arwin

    New Member

    Feb 3, 2008
    1
    0
    Do you know exactly how many "shift and add" will be needed for the multiplication of a number?
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,793
    Yes. It is equal to the number of bits in the multiplier. The number of bits in the multiplicand is irrelevant.
     
Loading...