# Multiplier

This time, part of an competition-winning circuit, changed to be much
smaller and simpler: the multiplier. See the original
here (with display).

## Theory

How do you multiplicate two numbers? You multiply each one by each digit
of the second one, you shift them the right number of times, and
you finally sum the results.

123
x 321
------
123
+ 246
+ 369
------
39483

We will basically just do the same thing, except that we will work in
binary. What is good with that is that multiplicating a number by a single
digit is easy: indeed, the later can either be 0, and the result will then
be 0, or be 1 and the result will then be the former. Summing the results is
not difficult, since if we sum them each time we compute a partial product,
we only have to sum two numbers at once, which is easy.

101
x 110
------
000
+ 101
+ 101
------
11110

## Circuit

First we will create a multiply-add circuit, which will then be stacked in
one direction to get a partial product and summing it to the previous sum. It
will then be stacked in the other direction, creating a multiplier.

Here is the multiply-add circuit:

We will then stack them in the following way (all unconnected inputs are
set to 0), A and B the input numbers, C the output:

## Building

First, build the multipliy-add circuit:

Then, you should stack them like that:

Next, you need to link the carry-out of the leftmost multiply-add circuits
to the input of the following ones:

Finally, add some wires and inputs/outputs.

Multiply-add circuit schematic

Full multiplier schematic