Lab 10 of 15 · rank 09

2-to-4 decoder

Inputs A0 A1 (A0 the lowest bit). Outputs Y0–Y3: exactly one is 1, the one whose number A1A0 spells. A=0 lights Y0, A=3 lights Y3.

← All labsNext lab →
  1. 1
    Build itPorts named A0, A1 and Y0, Y1, Y2, Y3
  2. 2
    Pass the truth table4 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 10
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 A1Y0 Y1 Y2 Y3
0 01 0 0 0
0 10 0 1 0
1 00 1 0 0
1 10 0 0 1

Stuck?

Y0 is NOR(A0, A1) and Y3 is AND(A0, A1). Y1 and Y2 are an AND with one input inverted.

Par is 10 NAND. Using more still passes here. To etch it as a verified die that mines, keep it within 20 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