Making chips

Build a circuit once, package it into a named chip, and place it as often as you like, inside other chips too.

This is how a computer is built out of NAND gates on the logic path.

Make a chip

  1. Build the circuit with bit switches on its inputs and bit lamps (or number parts) on its outputs, and give each one a label.
  2. Select the circuit, or select nothing to use the whole canvas.
  3. Open the More menu and choose Make chip, or press Make chip in a lesson.
  4. Name it, and press Make chip.

The switches become the chip's input pins and the lamps its output pins, named by their labels and ordered top to bottom as they sit on the canvas. A number switch labeled A with width 4 becomes four pins, A0 to A3. The circuit folds into one box, and the chip appears in the part panel under Chips in this project.

The card lists the pins as you type, and says what is in the way: two parts with the same label, no output, a wire leaving the selection, a board or a breadboard inside.

Change a chip

Click the chip and press Unpack in the panel. It opens back into its circuit where it stands, with any wires that reached its pins moved to the switches and lamps inside. Fix it, then make it again under the same name: the old definition is replaced, and every copy of it on the canvas updates. A wire to a pin the new version no longer has comes off, and the serial panel says how many.

Use a chip in another project

Check Also keep it in my blocks when you make it. The chip goes on your shelf of blocks, which is at the top of the part panel in every project, and on your account when you are signed in. Copy and paste carry a chip too, with every chip inside it.

How chips run

A chip never reaches the simulator. When the circuit runs, every chip is opened into the gates inside it, however deep, and its switches and lamps are dropped, so a chip costs exactly what its gates cost. Feedback loops and clocks behave as they would wired flat, because they are wired flat.

Limits

A chip is changed by unpacking it; there is no separate view of its inside yet. A chip cannot contain itself, and nesting stops at 32 levels. There are no bus wires yet, so an 8-bit port is eight pins and eight wires.