Lab 7 of 15 · rank 06
A D-latch: when E is high, Q follows D. When E is low, Q holds. Use one tick per vector.
Learn first
All the gates so far forget everything the moment their inputs change. A latch is different: while the enable pin E is on, its output Q copies D; when E turns off, Q stays exactly where it was — even if D changes.
That is one bit of memory. A million of them make RAM. In Wafer, LATCH is the second and last primitive, and it's what makes a die able to count, store, and eventually run a program.
Place a LATCH cell with D and E as inputs and Q as the output. Set D=1 and E=1: Q becomes 1. Turn E off, then change D: Q should not move. That's memory.
Turn logic into a permanent, verifiable part.
Drop a LATCH cell. Wire D and E, read Q.
Par is 0 NAND and 1 LATCH. Using more still passes here. To etch it as a verified die that mines, keep it within 6 NAND-equivalent (a LATCH counts 2): the verifier refuses bigger designs, so padding can't buy mining weight.
Turn this circuit into a verified die you own. It burns 0 NAND. Get materials at the Foundry.