# Digital Multiplier

#### Joe24

Joined May 18, 2007
52
Hello all,

Does anyone know how to construct a multiplier circuit using just logic gates?? Say an 4x4 bit or an 8x8 bit multiplier?

Thanks

#### Salgat

Joined Dec 23, 2006
221
If your multiplier is by 4 or 8 you can use a bit shift circuit, but if you want a broader range then I'm not sure.

#### thingmaker3

Joined May 16, 2005
5,084
I would use an EPROM, but I'm lazy.

#### Joe24

Joined May 18, 2007
52
If your multiplier is by 4 or 8 you can use a bit shift circuit, but if you want a broader range then I'm not sure.
No, a bit shift circuit is too limited. I need a circuit that would multiply any pair of numbers (bit sequences).

#### RiJoRI

Joined Aug 15, 2007
536
Just some musings:
You might be able to use
* A 16-bit shift-left register with only the lower 8 bits programmable -- the upper 8 bits are always loaded with zeros.
* An 8-bit shift-right register with the output fed to
* a 16-bit accumulator. The accumulator adds in the value of the 16-bit register whenever the output from the 8-bit register goes high, OR when the 16-bit register is initially loaded.
* A clock that generates 8 pulses and stops. It clocks both registers.
* Assorted switches, resistors, and LEDs for input, run, and output.

Timing and race conditions are left for the poor student to puzzle his or her head over.

--Rich

#### hgmjr

Joined Jan 28, 2005
9,029
I would use an EPROM, but I'm lazy.
I second thingmaker3's EPROM approach. A 4-bit by 4-bit multiply should be fairly easy to manually create with such an approach. It has the added advantage of being very fast.

hgmjr

#### Joe24

Joined May 18, 2007
52
The EPROM approach would be a good one. But, I can't use it in my project. The point is to use just logic gates.

Here is on approach that I found in Wikipedia:

http://en.wikipedia.org/wiki/Binary_multiplier

Thanks....

#### thingmaker3

Joined May 16, 2005
5,084
The EPROM approach would be a good one. But, I can't use it in my project. The point is to use just logic gates.
Oh, those nasty professors! Always making someone work hard to remember their lessons.

I guess I'd go with counters. Increment count by fist term, and repeat a number of times equal to second term.

Or use an adder and a counter. Add first term to itself a number of times equal to second term.

Aw, heck. Who are we kidding? I'd argue with the professor until I was blue in the face that EPROMs are just fancy latches and all latches are made from gates!

#### Papabravo

Joined Feb 24, 2006
16,792
Try googling "Wallace Trees"

#### Joe24

Joined May 18, 2007
52
Oh, those nasty professors! Always making someone work hard to remember their lessons.

I guess I'd go with counters. Increment count by fist term, and repeat a number of times equal to second term.

Or use an adder and a counter. Add first term to itself a number of times equal to second term.

Aw, heck. Who are we kidding? I'd argue with the professor until I was blue in the face that EPROMs are just fancy latches and all latches are made from gates!
Yeah, that's a good argument. But now, If I use a counter, I would have to implement that counter with logic gates. No IC's are allowed basically. So what type of scheme can I use that implements the least # of gates?

#### Joe24

Joined May 18, 2007
52

#### mozikluv

Joined Jan 22, 2004
1,437
also check on dadda multiplier by googling

moz

#### thingmaker3

Joined May 16, 2005
5,084
Go with PapaBravo's advice. I was quite impressed with what I found when I did. Also google "Dadda multiplier." Be sure to give PapaBravo a hearty "thank you."

#### Papabravo

Joined Feb 24, 2006
16,792
The respect of one's peers is a precious thing to be savored and enjoyed. Thank's for those kind words.