# 4-bit binary multiplier circuit

I have made this 4-bit binary multiplier circuit, but the product of, for example: B3B2B1B0 (1100) x A3A2A1A0 (0001) = P7P6P5P4P3P2P1P0 (00101000) and not 1100,

What have I done wrong?

• This is a nice simulator, showing you exactly which lines are having which values. Now try to trace it down where the values are becoming unexpected. Make sure you are using your adder correctly (the inputs seem to not be marked on the hierarchical block) – Eugene Sh. Oct 3 '18 at 15:26
• I don't think the output sequence of your 4 bit adder is what it appears. In the middle, you are adding 0001 and 0000, but it appears to give you 00100 instead of 0001. Similarly for the bottom one, 0001 + 0010 gives 00101. So double check where your bits really come out of that block. As Eugene noted, it could be the order of inputs instead! – MikeP Oct 3 '18 at 15:32

You scrambled the order of the input connections on your 4-bit adder. On the submodule, you have

A3 B3 A2 B2 A1 B1 A0 B0


but in your main circuit, you have them wired up as if they were

A3 A2 A1 A0 B3 B2 B1 B0


... Unless there's some magic that I can't see in your diagrams.

• There seem to be another thing. These adders seem to have carry-in, but the bottom diagram has it grounded. So something is not consistent here – Eugene Sh. Oct 3 '18 at 15:47
• @EugeneSh.: That doesn't matter in this application. – Dave Tweed Oct 3 '18 at 15:48
• You mean the ground symbol in this sim is not a ground? – Eugene Sh. Oct 3 '18 at 15:49
• @EugeneSh.: No, it definitely is ground. The point is, the N-bit adders don't require a functional carry-in when building a multiplier in this way. – Dave Tweed Oct 3 '18 at 15:49