Lab 13 of 15 · rank 12
Inputs OP1 OP0 (instruction), D0–D3 (data), CLK. Outputs A0–A3 (accumulator), C (carry), Z (zero). On each CLK rising edge: 00 LOAD A←D, 01 ADD A←A+D with C = carry-out, 10 AND A←A&D, 11 XOR A←A^D. C is 0 for every instruction but ADD; Z is 1 when the new A is 0. A, C and Z are all registers that update on the clock edge.
Turn logic into a permanent, verifiable part.
…and 84 more rows, all checked.
Per bit: an adder (HA for bit 0, FA above it), an AND and an XOR; two MUXes pick on OP0 and a third on OP1; a DFF clocked by CLK holds the bit. C = cout3 AND (NOT OP1 AND OP0) into a DFF; Z = NOR of the next A bits into a DFF.
Par is 117 NAND and 12 LATCH. Using more still passes here. To etch it as a verified die that mines, keep it within 282 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.