0

The input number is 0-15 so it is a 4 bit number.
This 4 bit number is then multiplied by 6.
I guess really my question is, "how do I multiply any 4 bit integer by 6 using no full/half adders?"

I've made the following 4 bit binary multiplier using a breadboard and in multisim. I have an adder connected to the multiplier, but I'm not getting correct results on my breadboard (I have LED's wired at the output to indicate the answer).
I understand the multisim simulation isn't going to alternate given the inputs are constant (it was more a proof of concept testing before building the multiplier on my breadboard)

Logically does this multiplier circuit make sense, or have I made a mistake somewhere? I was hoping someone on here might spot an error with my design.

enter image description here

greybeard
  • 1,469
  • 1
  • 4
  • 17
  • 1
    If it is a multiplier for a 4-bit number, what does it do to the number? It multiplies it with what value? You might want to explain what it should before we can answer your question if it is correct or not. – Justme Feb 11 '21 at 05:48
  • See [this](https://electronics.stackexchange.com/a/258106/38098) for sufficient details about a 4x4 multiplier. It's based upon summing up partial products. Very basic and easy to follow. – jonk Feb 11 '21 at 06:00
  • 1
    You don't show two 4-bit numbers being multiplied. Or, at least, I don't see both 4-bit numbers present in your diagram. So what you have cannot work as a 4x4 multiplier. – jonk Feb 11 '21 at 07:29
  • I'd expect a 4 bit binary multiplier to have 8 inputs (2 x 4 bit) and 8 outputs. Your circuit has 6 inputs (assuming U1 - U6 are the inputs) and 7 outputs (there's an LED8 but no LED2). It's conventional to use different letters for the 2 input numbers to make it easier to distinguish them, so U0-U3 and V0-V3 or more usually A0-A3 and B0-B3. Are your 4 bit numbers signed or unsigned? – Graham Nye Feb 11 '21 at 12:37
  • 1
    What **exactly** are the part numbers of your logic chips? What is the supply voltage? What is the specified forward voltage of the LEDs? What is the logical meaning of each input? – Elliot Alderson Feb 11 '21 at 12:55
  • Thank you guys for pointing out a major flaw in my logic. Now that I think about it, I do believe I should have 8 inputs. The input number is 0-15 so it is a 4 bit number which means I probably do need 8 inputs. The 4 bit number is then multiplied by 6. I guess really my question is, "how do I multiply any 4 bit integer by 6 using no full/half adders?" – johnson8ryley Feb 11 '21 at 17:58
  • @johnson8ryley That means that ***Justme*** was tilting in the right direction at the outset. So you are only multiplying by 6. That's just the sum of two partial products. These two partial products are just "lane changes" so they need zero logic. It's just wire. There should be very little trouble here. So the input is only a 4-bit number (not all those inputs I see above.) and the output is at most 7 bits, which it appears you've already identified. – jonk Feb 11 '21 at 20:06

1 Answers1

1

I strongly recommend adding an addendum at the bottom of your question that incorporates your comment that extends your question. You are now talking about multiplying a 4-bit binary input by 0x6. This requires at most a 7-bit result. (4 bits times 3 bits.)

Referring to the sidelined discussion I gave earlier (see below), multiplying by 6 just means that two of the partial products, \$PP_1\$ and \$PP_2\$, carry a meaningful value. The other two are just zero. And since you already know the constant is 6, these two partial products are just "lane changes" (shift left or shift right) for the bits. So there's no need for any AND logic, at all. So the partial product generator requires zero logic.

The only remaining thing is to sum up the two 4-bit partial terms aligned correctly with the output. A really simple modular approach is to use a half-adder for the lowest order computational output bit and full-adders for the rest.

Since the lowest order output bit is guaranteed to be '0', nothing is needed there. It's always '0'. The next lowest order output bit is just a copy of \$PP_1\$'s low-order bit. So no logic there, either. Just pass along the bit. The next lowest order bit has to perform a half-adder function. Etc.

If A is the 4-bit input then:

     0  A3  A2  A1  A0   0
 +  A3  A2  A1  A0   0   0
--------------------------
C2  S2  S2  S1  S0  A0   0

 ^   ^   ^   ^   ^
 |   |   |   |   |
 +<-HA<-FA<-FA<-HA

So you'll need two half-adders and two full-adders.

Do you think you can arrange that?

General Multiplier Approach

(What's below was my initial prodding answer. The OP has updated the question in comments so the following is no longer as directly relevant as it may have been before.)

I'll start you off. There are some "less obvious" methods. But, by and large, multiplier methods have a great deal of similarity with multi-digit multiplication techniques taught in grade school. You prepare partial products, shift them relative to each other, and then just add.

Suppose you arrange a schematic like this:

schematic

simulate this circuit – Schematic created using CircuitLab

In short, the A word enters from the left, the partial product term exits at right, and one of the bits from the B word determines whether the output is the A value or 0.

Now, you cobble up four of the above, such that:

schematic

simulate this circuit

That provides you with all four 4-bit partial products.

Now, at this point you can either add them up in the traditional way using half-adders and full-adders to get your final result or else, perhaps, you can study up on Wallace Trees, for example. Both will require 4 half-adders and 8 full-adders. But the Wallace Tree arrangement will have three fewer full-adder delays in the worst case path. So it's slightly better.

You can also review some more details found here.

I'll stop here, for now, and see how you respond. I may add more on the basis of what I see.

jonk
  • 77,059
  • 6
  • 73
  • 185