TapeFoundry Docs
Docs menu

Running a drawing

Every netlist is public, and the browser can execute it gate by gate. That is what makes a card a circuit rather than an image of one.

What the simulator does

The netlist is a flat byte string. Each gate is seven bytes: one operation byte, then three bytes for input A and three for input B. Node 0 and 1 are constants; inputs start at node 2.

The simulator decodes that string in your browser, wires the nodes, and evaluates the circuit for the inputs you set. Nothing is sent to a server, and no wallet is needed.

Reading the output

For a 4-bit adder, inputs A and B are two 4-bit numbers; the outputs are the sum and the carry. For a comparator, the outputs are three bits: equal, greater, less. For the 12×12 multiplier, two 12-bit inputs produce a 24-bit product.

DrawingInputsOutputsWhat it computes
MUL122424multiplies two 12-bit numbers
ALU163516eight operations on 16-bit words
DIV81616quotient and remainder of 8-bit division
MUL81616multiplies two 8-bit numbers
CMP641283equal / greater / less for 64-bit words
CMP483equal / greater / less for 4-bit words
EQ81611 when two 8-bit words match
SUB485difference and borrow
ADD495adds two 4-bit numbers with carry
MUL244multiplies two 2-bit numbers
SHIFT464shifts a 4-bit word by 0–3

The gate array

Under the inputs the page draws one small block per gate, in netlist order, and lights them with their real values as evaluation runs. The length of that strip is the gate count. A multiplier's strip is 53 times longer than a shifter's, which is the most direct explanation of why it costs more.

What this proves

Try it before buying. A circuit that does not compute what it claims is visible in ten seconds. That is the point of publishing the netlist.

Limits

The simulator evaluates the netlist; it does not prove the drawing is the most efficient implementation of that function. A 976-gate divider and a 400-gate divider could compute the same thing — the price follows the gates, not the elegance.