Binary Multiplier - A More Advanced Approach: An Unsigned Example

A More Advanced Approach: An Unsigned Example

For example, suppose we want to multiply two unsigned eight bit integers together: a and b. We can produce eight partial products by performing eight one-bit multiplications, one for each bit in multiplicand a:

p0 = a × b = {8{a}} & b p1 = a × b = {8{a}} & b p2 = a × b = {8{a}} & b p3 = a × b = {8{a}} & b p4 = a × b = {8{a}} & b p5 = a × b = {8{a}} & b p6 = a × b = {8{a}} & b p7 = a × b = {8{a}} & b

where {8{a}} means repeating a (the 0th bit of a) 8 times (Verilog notation).

To produce our product, we then need to add up all eight of our partial products, as shown here:

p0 p0 p0 p0 p0 p0 p0 p0 + p1 p1 p1 p1 p1 p1 p1 p1 0 + p2 p2 p2 p2 p2 p2 p2 p2 0 0 + p3 p3 p3 p3 p3 p3 p3 p3 0 0 0 + p4 p4 p4 p4 p4 p4 p4 p4 0 0 0 0 + p5 p5 p5 p5 p5 p5 p5 p5 0 0 0 0 0 + p6 p6 p6 p6 p6 p6 p6 p6 0 0 0 0 0 0 + p7 p7 p7 p7 p7 p7 p7 p7 0 0 0 0 0 0 0 ------------------------------------------------------------------------------------------- P P P P P P P P P P P P P P P P

In other words, P is produced by summing p0, p1 << 1, p2 << 2, and so forth, to produce our final unsigned 16-bit product.

Read more about this topic:  Binary Multiplier

Famous quotes containing the words advanced and/or unsigned:

    I don’t say ‘tis impossible for an impudent man not to rise in the world, but a moderate merit with a large share of impudence is more probable to be advanced than the greatest qualifications without it.
    Mary Wortley, Lady Montagu (1689–1762)

    There yet remains but one concluding tale,
    And then this chronicle of mine is ended—
    Fulfilled, the duty God ordained to me,
    A sinner. Not without purpose did the Lord
    Put me to witness much for many years
    And educate me in the love of books.
    One day some indefatigable monk
    Will find my conscientious, unsigned work;
    Like me, he will light up his ikon-lamp
    And, shaking from the scroll the age-old dust,
    He will transcribe these tales in all their truth.
    Alexander Pushkin (1799–1837)