{
  "schema": "digital-logic-sim-web/chip/1",
  "name": "MUX 4:1",
  "updatedAt": "2026-08-10T12:00:00.000Z",
  "description": {
    "id": "chip-mux-4-1",
    "name": "MUX 4:1",
    "type": "custom",
    "kind": "custom",
    "size": {
      "x": 420,
      "y": 360
    },
    "colour": "#647488",
    "nameLocation": "top",
    "inputPins": [
      {
        "id": "d0",
        "name": "D0",
        "bits": 1,
        "direction": "input",
        "x": -580,
        "y": -300,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "d1",
        "name": "D1",
        "bits": 1,
        "direction": "input",
        "x": -580,
        "y": -180,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "d2",
        "name": "D2",
        "bits": 1,
        "direction": "input",
        "x": -580,
        "y": -60,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "d3",
        "name": "D3",
        "bits": 1,
        "direction": "input",
        "x": -580,
        "y": 60,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "s0",
        "name": "S0",
        "bits": 1,
        "direction": "input",
        "x": -580,
        "y": 180,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "s1",
        "name": "S1",
        "bits": 1,
        "direction": "input",
        "x": -580,
        "y": 300,
        "valueDisplay": "off",
        "colour": "gray"
      }
    ],
    "outputPins": [
      {
        "id": "out",
        "name": "OUT",
        "bits": 1,
        "direction": "output",
        "x": 580,
        "y": 0,
        "valueDisplay": "off",
        "colour": "green"
      }
    ],
    "instances": [
      {
        "id": "not-s0",
        "name": "NOT",
        "position": {
          "x": -320,
          "y": -60
        },
        "rotation": 0,
        "label": "!S0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "not-s1",
        "name": "NOT",
        "position": {
          "x": -320,
          "y": 60
        },
        "rotation": 0,
        "label": "!S1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d0-a",
        "name": "AND",
        "position": {
          "x": -160,
          "y": -180
        },
        "rotation": 0,
        "label": "D0 !S1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d0-b",
        "name": "AND",
        "position": {
          "x": 0,
          "y": -180
        },
        "rotation": 0,
        "label": "D0 !S1 !S0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d1-a",
        "name": "AND",
        "position": {
          "x": -160,
          "y": -60
        },
        "rotation": 0,
        "label": "D1 !S1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d1-b",
        "name": "AND",
        "position": {
          "x": 0,
          "y": -60
        },
        "rotation": 0,
        "label": "D1 !S1 S0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d2-a",
        "name": "AND",
        "position": {
          "x": -160,
          "y": 60
        },
        "rotation": 0,
        "label": "D2 S1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d2-b",
        "name": "AND",
        "position": {
          "x": 0,
          "y": 60
        },
        "rotation": 0,
        "label": "D2 S1 !S0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d3-a",
        "name": "AND",
        "position": {
          "x": -160,
          "y": 180
        },
        "rotation": 0,
        "label": "D3 S1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "d3-b",
        "name": "AND",
        "position": {
          "x": 0,
          "y": 180
        },
        "rotation": 0,
        "label": "D3 S1 S0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "or-01",
        "name": "OR",
        "position": {
          "x": 160,
          "y": -60
        },
        "rotation": 0,
        "label": "D0/D1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "or-23",
        "name": "OR",
        "position": {
          "x": 160,
          "y": 60
        },
        "rotation": 0,
        "label": "D2/D3",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "or-out",
        "name": "OR",
        "position": {
          "x": 320,
          "y": 0
        },
        "rotation": 0,
        "label": "OUT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "interface-input-d0",
        "name": "IN-1",
        "position": {
          "x": -480,
          "y": -300
        },
        "rotation": 0,
        "label": "D0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "d0",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-d1",
        "name": "IN-1",
        "position": {
          "x": -480,
          "y": -180
        },
        "rotation": 0,
        "label": "D1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "d1",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-d2",
        "name": "IN-1",
        "position": {
          "x": -480,
          "y": -60
        },
        "rotation": 0,
        "label": "D2",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "d2",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-d3",
        "name": "IN-1",
        "position": {
          "x": -480,
          "y": 60
        },
        "rotation": 0,
        "label": "D3",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "d3",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-s0",
        "name": "IN-1",
        "position": {
          "x": -480,
          "y": 180
        },
        "rotation": 0,
        "label": "S0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "s0",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-s1",
        "name": "IN-1",
        "position": {
          "x": -480,
          "y": 300
        },
        "rotation": 0,
        "label": "S1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "s1",
        "outputPinColours": {}
      },
      {
        "id": "interface-output-out",
        "name": "OUT-1",
        "position": {
          "x": 480,
          "y": 0
        },
        "rotation": 0,
        "label": "OUT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "out",
        "outputPinColours": {}
      }
    ],
    "wires": [
      {
        "id": "s0-not",
        "source": {
          "owner": "interface-input-s0",
          "pin": "0"
        },
        "target": {
          "owner": "not-s0",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "s1-not",
        "source": {
          "owner": "interface-input-s1",
          "pin": "0"
        },
        "target": {
          "owner": "not-s1",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d0-a",
        "source": {
          "owner": "interface-input-d0",
          "pin": "0"
        },
        "target": {
          "owner": "d0-a",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "ns1-d0",
        "source": {
          "owner": "not-s1",
          "pin": "1"
        },
        "target": {
          "owner": "d0-a",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d0-b",
        "source": {
          "owner": "d0-a",
          "pin": "2"
        },
        "target": {
          "owner": "d0-b",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "ns0-d0",
        "source": {
          "owner": "not-s0",
          "pin": "1"
        },
        "target": {
          "owner": "d0-b",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d1-a",
        "source": {
          "owner": "interface-input-d1",
          "pin": "0"
        },
        "target": {
          "owner": "d1-a",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "ns1-d1",
        "source": {
          "owner": "not-s1",
          "pin": "1"
        },
        "target": {
          "owner": "d1-a",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d1-b",
        "source": {
          "owner": "d1-a",
          "pin": "2"
        },
        "target": {
          "owner": "d1-b",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "s0-d1",
        "source": {
          "owner": "interface-input-s0",
          "pin": "0"
        },
        "target": {
          "owner": "d1-b",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d2-a",
        "source": {
          "owner": "interface-input-d2",
          "pin": "0"
        },
        "target": {
          "owner": "d2-a",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "s1-d2",
        "source": {
          "owner": "interface-input-s1",
          "pin": "0"
        },
        "target": {
          "owner": "d2-a",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d2-b",
        "source": {
          "owner": "d2-a",
          "pin": "2"
        },
        "target": {
          "owner": "d2-b",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "ns0-d2",
        "source": {
          "owner": "not-s0",
          "pin": "1"
        },
        "target": {
          "owner": "d2-b",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d3-a",
        "source": {
          "owner": "interface-input-d3",
          "pin": "0"
        },
        "target": {
          "owner": "d3-a",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "s1-d3",
        "source": {
          "owner": "interface-input-s1",
          "pin": "0"
        },
        "target": {
          "owner": "d3-a",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d3-b",
        "source": {
          "owner": "d3-a",
          "pin": "2"
        },
        "target": {
          "owner": "d3-b",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "s0-d3",
        "source": {
          "owner": "interface-input-s0",
          "pin": "0"
        },
        "target": {
          "owner": "d3-b",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d0-or",
        "source": {
          "owner": "d0-b",
          "pin": "2"
        },
        "target": {
          "owner": "or-01",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d1-or",
        "source": {
          "owner": "d1-b",
          "pin": "2"
        },
        "target": {
          "owner": "or-01",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d2-or",
        "source": {
          "owner": "d2-b",
          "pin": "2"
        },
        "target": {
          "owner": "or-23",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d3-or",
        "source": {
          "owner": "d3-b",
          "pin": "2"
        },
        "target": {
          "owner": "or-23",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "or01-out",
        "source": {
          "owner": "or-01",
          "pin": "2"
        },
        "target": {
          "owner": "or-out",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "or23-out",
        "source": {
          "owner": "or-23",
          "pin": "2"
        },
        "target": {
          "owner": "or-out",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "mux-out",
        "source": {
          "owner": "or-out",
          "pin": "2"
        },
        "target": {
          "owner": "interface-output-out",
          "pin": "0"
        },
        "points": [],
        "colour": null
      }
    ],
    "junctions": [],
    "displays": [],
    "annotations": [],
    "interfaceBindings": {
      "inputs": [
        {
          "publicId": "d0",
          "instanceId": "interface-input-d0",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "d1",
          "instanceId": "interface-input-d1",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "d2",
          "instanceId": "interface-input-d2",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "d3",
          "instanceId": "interface-input-d3",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "s0",
          "instanceId": "interface-input-s0",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "s1",
          "instanceId": "interface-input-s1",
          "pinId": "0",
          "direction": "input"
        }
      ],
      "outputs": [
        {
          "publicId": "out",
          "instanceId": "interface-output-out",
          "pinId": "0",
          "direction": "output"
        }
      ]
    },
    "fit": {
      "version": 1,
      "bounds": {
        "x": -580,
        "y": -380,
        "w": 1160,
        "h": 760
      }
    }
  }
}
