{
  "schema": "digital-logic-sim-web/chip/1",
  "name": "MUX 2:1",
  "updatedAt": "2026-08-11T00:26:06.605Z",
  "description": {
    "id": "chip-mux-2-1",
    "name": "MUX 2:1",
    "type": "custom",
    "kind": "custom",
    "size": {
      "x": 360,
      "y": 240
    },
    "colour": "#647488",
    "nameLocation": "top",
    "inputPins": [
      {
        "id": "d0",
        "name": "D0",
        "bits": 1,
        "direction": "input",
        "x": -420,
        "y": -120,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "d1",
        "name": "D1",
        "bits": 1,
        "direction": "input",
        "x": -420,
        "y": 0,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "select",
        "name": "SELECT",
        "bits": 1,
        "direction": "input",
        "x": -420,
        "y": 120,
        "valueDisplay": "off",
        "colour": "gray"
      }
    ],
    "outputPins": [
      {
        "id": "out",
        "name": "OUT",
        "bits": 1,
        "direction": "output",
        "x": 420,
        "y": 0,
        "valueDisplay": "off",
        "colour": "green"
      }
    ],
    "instances": [
      {
        "id": "not-select",
        "name": "NOT",
        "position": {
          "x": -160,
          "y": 0
        },
        "rotation": 0,
        "label": "NOT SELECT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "and-d0",
        "name": "AND",
        "position": {
          "x": 0,
          "y": -60
        },
        "rotation": 0,
        "label": "D0 & !SELECT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "and-d1",
        "name": "AND",
        "position": {
          "x": 0,
          "y": 60
        },
        "rotation": 0,
        "label": "D1 & SELECT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "or-out",
        "name": "OR",
        "position": {
          "x": 160,
          "y": 0
        },
        "rotation": 0,
        "label": "SELECTED OUT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "interface-input-d0",
        "name": "IN-1",
        "position": {
          "x": -320,
          "y": -120
        },
        "rotation": 0,
        "label": "D0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "d0",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-d1",
        "name": "IN-1",
        "position": {
          "x": -320,
          "y": 0
        },
        "rotation": 0,
        "label": "D1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "d1",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-select",
        "name": "IN-1",
        "position": {
          "x": -320,
          "y": 120
        },
        "rotation": 0,
        "label": "SELECT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "select",
        "outputPinColours": {}
      },
      {
        "id": "interface-output-out",
        "name": "OUT-1",
        "position": {
          "x": 320,
          "y": 0
        },
        "rotation": 0,
        "label": "OUT",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "out",
        "outputPinColours": {}
      }
    ],
    "wires": [
      {
        "id": "d0-and",
        "source": {
          "owner": "interface-input-d0",
          "pin": "0"
        },
        "target": {
          "owner": "and-d0",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "select-not",
        "source": {
          "owner": "interface-input-select",
          "pin": "0"
        },
        "target": {
          "owner": "not-select",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "not-d0-and",
        "source": {
          "owner": "not-select",
          "pin": "1"
        },
        "target": {
          "owner": "and-d0",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d1-and",
        "source": {
          "owner": "interface-input-d1",
          "pin": "0"
        },
        "target": {
          "owner": "and-d1",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "select-d1-and",
        "source": {
          "owner": "interface-input-select",
          "pin": "0"
        },
        "target": {
          "owner": "and-d1",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d0-or",
        "source": {
          "owner": "and-d0",
          "pin": "2"
        },
        "target": {
          "owner": "or-out",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "d1-or",
        "source": {
          "owner": "and-d1",
          "pin": "2"
        },
        "target": {
          "owner": "or-out",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "or-out-interface",
        "source": {
          "owner": "or-out",
          "pin": "2"
        },
        "target": {
          "owner": "interface-output-out",
          "pin": "0"
        },
        "points": [],
        "colour": null
      }
    ],
    "junctions": [],
    "displays": [],
    "annotations": [
      {
        "id": "mux-title",
        "type": "label",
        "text": "2:1 MULTIPLEXER",
        "position": {
          "x": -280,
          "y": -220
        },
        "width": 380,
        "height": 26,
        "fontSize": 14,
        "colour": "#f3d36b",
        "background": "#352e18"
      },
      {
        "id": "mux-formula",
        "type": "text",
        "text": "OUT = (D0 AND NOT SELECT) OR (D1 AND SELECT)\nSELECT=0 chooses D0; SELECT=1 chooses D1.",
        "position": {
          "x": -280,
          "y": 180
        },
        "width": 480,
        "height": 60,
        "fontSize": 11,
        "colour": "#d7eaff",
        "background": "#2f3338"
      }
    ],
    "interfaceBindings": {
      "inputs": [
        {
          "publicId": "d0",
          "instanceId": "interface-input-d0",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "d1",
          "instanceId": "interface-input-d1",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "select",
          "instanceId": "interface-input-select",
          "pinId": "0",
          "direction": "input"
        }
      ],
      "outputs": [
        {
          "publicId": "out",
          "instanceId": "interface-output-out",
          "pinId": "0",
          "direction": "output"
        }
      ]
    },
    "fit": {
      "version": 1,
      "bounds": {
        "x": -420,
        "y": -200,
        "w": 840,
        "h": 400
      }
    }
  }
}
