examining our adder

Let’s take a closer look at some features of our adder.

00/0000/00
loading…

adder

input size

Calculators typically have a maximum size of numbers they can add. If you try to input more digits, they won’t let you. This is because the calculator has a finite amount of memory to store the input.

But here, because we supply its inputs digit by digit, our adder has no maximum input size — it just keeps adding the two streams forever. It doesn’t run out of memory, because it doesn’t have to store anything other than the carry.

So even though our adder is small, it’s powerful enough to perform sums like 18,000,272 + 987,153,226 — we’d have to wait a long time for the full result, but we’d get it eventually.

sequential output

Because our adder outputs a stream, we can start doing things with the result immediately — we don’t have to wait for the finished calculation.

For example, if we want to calculate 549 + 123 + 641, we might could set up two adders in sequence. We can input 549 + 123 into the first one, then feed the result into the second adder along with +641 while the first calculation is still ongoing. The two adders work in parallel, saving us time.

resetting the adder

If we use our adder more than once, we need to make sure there’s no carry left over from a previous addition.

To reset the adder, we just leave it idle for a single step, which is equivalent to inputting 0 + 0. This will flush the carry out, and leave it ready for the next addition.

next

Our adder works, but the results are still in binary. Next we’ll look at how we might display the result in a way we can read.

continue