Lab 8 of 15 · rank 07

2-bit adder

Inputs A0 A1 B0 B1. Outputs S0 S1 Cout. Treat A1/B1 as MSB.

← All labsNext lab →

Learn first

Chain adders to add bigger numbers: each column passes its carry to the next.

A 2-bit number has two columns: A1 A0. To add two of them, add the right column first (a half adder, no carry in), then feed its carry into the left column (a full adder).

That pattern — carry rippling from column to column — is exactly how the adder in a real CPU works, just with 32 or 64 columns.

Try this

Half adder on A0 and B0 gives S0 and a carry. Full adder on A1, B1 and that carry gives S1 and Cout. Try 3 + 1: A=11, B=01 should give S=00 with Cout=1, which is 100 — four.

A+B=CS0 + 0 = 0 00 + 1 = 0 11 + 1 = 1 0S = sum bitC = carry bit
  1. 1
    Build itPorts named A0, A1, B0, B1 and S0, S1, Cout
  2. 2
    Pass the truth table16 rows checked
  3. 3
    Etch it (optional)a verified die in your project
⊼
Cellsclick one, then click the canvas

Build your die

Turn logic into a permanent, verifiable part.

NAND used0 / par 18
LATCH used0 / par 0
Ainput · pin0Youtput · pin
Pick a cell on the left, click to place it · drag from an output pin to an input pin to wire · click a wire to remove it · click a cell to rename it
→ Y=0

What it should do

A0 A1 B0 B1S0 S1 Cout
0 0 0 00 0 0
0 0 0 10 1 0
0 0 1 01 0 0
0 0 1 11 1 0
0 1 0 00 1 0
0 1 0 10 0 1
0 1 1 01 1 0
0 1 1 11 0 1
1 0 0 01 0 0
1 0 0 11 1 0
1 0 1 00 1 0
1 0 1 10 0 1
1 1 0 01 1 0
1 1 0 11 0 1
1 1 1 00 0 1
1 1 1 10 1 1

Stuck?

FA on the low bits with Cin=0, ripple into a second FA.

Par is 18 NAND. Using more still passes here. To etch it as a verified die that mines, keep it within 36 NAND-equivalent (a LATCH counts 2): the verifier refuses bigger designs, so padding can't buy mining weight.

Etch it as a die (optional)

Turn this circuit into a verified die you own. It burns 0 NAND. Get materials at the Foundry.

connect a wallet to pick a project