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?

4 bit binary multiplier circuit

4 bit binary adder

  • 2
    \$\begingroup\$ 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) \$\endgroup\$ – Eugene Sh. Oct 3 '18 at 15:26
  • 2
    \$\begingroup\$ 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! \$\endgroup\$ – 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.

  • \$\begingroup\$ 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 \$\endgroup\$ – Eugene Sh. Oct 3 '18 at 15:47
  • \$\begingroup\$ @EugeneSh.: That doesn't matter in this application. \$\endgroup\$ – Dave Tweed Oct 3 '18 at 15:48
  • \$\begingroup\$ You mean the ground symbol in this sim is not a ground? \$\endgroup\$ – Eugene Sh. Oct 3 '18 at 15:49
  • 1
    \$\begingroup\$ @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. \$\endgroup\$ – Dave Tweed Oct 3 '18 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.