{
  "schema": "digital-logic-sim-web/chip/1",
  "name": "HALF ADDER",
  "updatedAt": "2026-08-10T12:00:00.000Z",
  "description": {
    "id": "chip-half-adder",
    "name": "HALF ADDER",
    "type": "custom",
    "kind": "custom",
    "size": {
      "x": 260,
      "y": 160
    },
    "colour": "#5c8d78",
    "nameLocation": "top",
    "inputPins": [
      {
        "id": "a",
        "name": "A",
        "bits": 1,
        "direction": "input",
        "x": -260,
        "y": -60,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "b",
        "name": "B",
        "bits": 1,
        "direction": "input",
        "x": -260,
        "y": 60,
        "valueDisplay": "off",
        "colour": "gray"
      }
    ],
    "outputPins": [
      {
        "id": "sum",
        "name": "SUM",
        "bits": 1,
        "direction": "output",
        "x": 260,
        "y": -60,
        "valueDisplay": "off",
        "colour": "green"
      },
      {
        "id": "carry",
        "name": "CARRY",
        "bits": 1,
        "direction": "output",
        "x": 260,
        "y": 60,
        "valueDisplay": "off",
        "colour": "green"
      }
    ],
    "instances": [
      {
        "id": "xor",
        "name": "XOR",
        "position": {
          "x": 0,
          "y": -60
        },
        "rotation": 0,
        "label": "SUM",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "and",
        "name": "AND",
        "position": {
          "x": 0,
          "y": 60
        },
        "rotation": 0,
        "label": "CARRY",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "interface-input-a",
        "name": "IN-1",
        "position": {
          "x": -160,
          "y": -60
        },
        "rotation": 0,
        "label": "A",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "a",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-b",
        "name": "IN-1",
        "position": {
          "x": -160,
          "y": 60
        },
        "rotation": 0,
        "label": "B",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "b",
        "outputPinColours": {}
      },
      {
        "id": "interface-output-sum",
        "name": "OUT-1",
        "position": {
          "x": 160,
          "y": -60
        },
        "rotation": 0,
        "label": "SUM",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "sum",
        "outputPinColours": {}
      },
      {
        "id": "interface-output-carry",
        "name": "OUT-1",
        "position": {
          "x": 160,
          "y": 60
        },
        "rotation": 0,
        "label": "CARRY",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "carry",
        "outputPinColours": {}
      }
    ],
    "wires": [
      {
        "id": "a-xor",
        "source": {
          "owner": "interface-input-a",
          "pin": "0"
        },
        "target": {
          "owner": "xor",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "b-xor",
        "source": {
          "owner": "interface-input-b",
          "pin": "0"
        },
        "target": {
          "owner": "xor",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "a-and",
        "source": {
          "owner": "interface-input-a",
          "pin": "0"
        },
        "target": {
          "owner": "and",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "b-and",
        "source": {
          "owner": "interface-input-b",
          "pin": "0"
        },
        "target": {
          "owner": "and",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "xor-sum",
        "source": {
          "owner": "xor",
          "pin": "2"
        },
        "target": {
          "owner": "interface-output-sum",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "and-carry",
        "source": {
          "owner": "and",
          "pin": "2"
        },
        "target": {
          "owner": "interface-output-carry",
          "pin": "0"
        },
        "points": [],
        "colour": null
      }
    ],
    "junctions": [],
    "displays": [],
    "annotations": [],
    "interfaceBindings": {
      "inputs": [
        {
          "publicId": "a",
          "instanceId": "interface-input-a",
          "pinId": "0",
          "direction": "input"
        },
        {
          "publicId": "b",
          "instanceId": "interface-input-b",
          "pinId": "0",
          "direction": "input"
        }
      ],
      "outputs": [
        {
          "publicId": "sum",
          "instanceId": "interface-output-sum",
          "pinId": "0",
          "direction": "output"
        },
        {
          "publicId": "carry",
          "instanceId": "interface-output-carry",
          "pinId": "0",
          "direction": "output"
        }
      ]
    },
    "fit": {
      "version": 1,
      "bounds": {
        "x": -260,
        "y": -140,
        "w": 520,
        "h": 280
      }
    }
  }
}
