{
  "schema": "digital-logic-sim-web/chip/1",
  "name": "RIPPLE ADDER 4",
  "updatedAt": "2026-08-10T12:00:00.000Z",
  "description": {
    "id": "chip-ripple-adder-4",
    "name": "RIPPLE ADDER 4",
    "type": "custom",
    "kind": "custom",
    "size": {
      "x": 1120,
      "y": 520
    },
    "colour": "#5c8d78",
    "nameLocation": "top",
    "inputPins": [
      {
        "id": "a",
        "name": "A[3:0]",
        "bits": 4,
        "direction": "input",
        "x": -1520,
        "y": -120,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "b",
        "name": "B[3:0]",
        "bits": 4,
        "direction": "input",
        "x": -1520,
        "y": 0,
        "valueDisplay": "off",
        "colour": "gray"
      },
      {
        "id": "cin",
        "name": "CIN",
        "bits": 1,
        "direction": "input",
        "x": -1520,
        "y": 120,
        "valueDisplay": "off",
        "colour": "gray"
      }
    ],
    "outputPins": [
      {
        "id": "sum",
        "name": "SUM[3:0]",
        "bits": 4,
        "direction": "output",
        "x": 1520,
        "y": -60,
        "valueDisplay": "off",
        "colour": "green"
      },
      {
        "id": "carry",
        "name": "CARRY",
        "bits": 1,
        "direction": "output",
        "x": 1520,
        "y": 60,
        "valueDisplay": "off",
        "colour": "green"
      }
    ],
    "instances": [
      {
        "id": "split-a",
        "name": "4-1BIT",
        "position": {
          "x": -1230,
          "y": -60
        },
        "rotation": 0,
        "label": "A bits",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "split-b",
        "name": "4-1BIT",
        "position": {
          "x": -1230,
          "y": 60
        },
        "rotation": 0,
        "label": "B bits",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "fa0",
        "name": "FULL ADDER",
        "position": {
          "x": -560,
          "y": -360
        },
        "rotation": 0,
        "label": "BIT 0",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "fa1",
        "name": "FULL ADDER",
        "position": {
          "x": -560,
          "y": 360
        },
        "rotation": 0,
        "label": "BIT 1",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "fa2",
        "name": "FULL ADDER",
        "position": {
          "x": 560,
          "y": -360
        },
        "rotation": 0,
        "label": "BIT 2",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "fa3",
        "name": "FULL ADDER",
        "position": {
          "x": 560,
          "y": 360
        },
        "rotation": 0,
        "label": "BIT 3",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "merge-sum",
        "name": "1-4BIT",
        "position": {
          "x": 1230,
          "y": 0
        },
        "rotation": 0,
        "label": "SUM",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": null,
        "outputPinColours": {}
      },
      {
        "id": "interface-input-a",
        "name": "IN-4",
        "position": {
          "x": -1420,
          "y": -120
        },
        "rotation": 0,
        "label": "A[3:0]",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "a",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-b",
        "name": "IN-4",
        "position": {
          "x": -1420,
          "y": 0
        },
        "rotation": 0,
        "label": "B[3:0]",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "b",
        "outputPinColours": {}
      },
      {
        "id": "interface-input-cin",
        "name": "IN-1",
        "position": {
          "x": -1420,
          "y": 120
        },
        "rotation": 0,
        "label": "CIN",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "cin",
        "outputPinColours": {}
      },
      {
        "id": "interface-output-sum",
        "name": "OUT-4",
        "position": {
          "x": 1420,
          "y": -60
        },
        "rotation": 0,
        "label": "SUM[3:0]",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "sum",
        "outputPinColours": {}
      },
      {
        "id": "interface-output-carry",
        "name": "OUT-1",
        "position": {
          "x": 1420,
          "y": 60
        },
        "rotation": 0,
        "label": "CARRY",
        "internalData": {},
        "linkedBusPairId": null,
        "interfaceId": "carry",
        "outputPinColours": {}
      }
    ],
    "wires": [
      {
        "id": "a0",
        "source": {
          "owner": "split-a",
          "pin": "4"
        },
        "target": {
          "owner": "fa0",
          "pin": "a"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "a1",
        "source": {
          "owner": "split-a",
          "pin": "3"
        },
        "target": {
          "owner": "fa1",
          "pin": "a"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "a2",
        "source": {
          "owner": "split-a",
          "pin": "2"
        },
        "target": {
          "owner": "fa2",
          "pin": "a"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "a3",
        "source": {
          "owner": "split-a",
          "pin": "1"
        },
        "target": {
          "owner": "fa3",
          "pin": "a"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "b0",
        "source": {
          "owner": "split-b",
          "pin": "4"
        },
        "target": {
          "owner": "fa0",
          "pin": "b"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "b1",
        "source": {
          "owner": "split-b",
          "pin": "3"
        },
        "target": {
          "owner": "fa1",
          "pin": "b"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "b2",
        "source": {
          "owner": "split-b",
          "pin": "2"
        },
        "target": {
          "owner": "fa2",
          "pin": "b"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "b3",
        "source": {
          "owner": "split-b",
          "pin": "1"
        },
        "target": {
          "owner": "fa3",
          "pin": "b"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "cin0",
        "source": {
          "owner": "interface-input-cin",
          "pin": "0"
        },
        "target": {
          "owner": "fa0",
          "pin": "cin"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "carry0",
        "source": {
          "owner": "fa0",
          "pin": "carry"
        },
        "target": {
          "owner": "fa1",
          "pin": "cin"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "carry1",
        "source": {
          "owner": "fa1",
          "pin": "carry"
        },
        "target": {
          "owner": "fa2",
          "pin": "cin"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "carry2",
        "source": {
          "owner": "fa2",
          "pin": "carry"
        },
        "target": {
          "owner": "fa3",
          "pin": "cin"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "carry-out",
        "source": {
          "owner": "fa3",
          "pin": "carry"
        },
        "target": {
          "owner": "interface-output-carry",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "sum0",
        "source": {
          "owner": "fa0",
          "pin": "sum"
        },
        "target": {
          "owner": "merge-sum",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "sum1",
        "source": {
          "owner": "fa1",
          "pin": "sum"
        },
        "target": {
          "owner": "merge-sum",
          "pin": "1"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "sum2",
        "source": {
          "owner": "fa2",
          "pin": "sum"
        },
        "target": {
          "owner": "merge-sum",
          "pin": "2"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "sum3",
        "source": {
          "owner": "fa3",
          "pin": "sum"
        },
        "target": {
          "owner": "merge-sum",
          "pin": "3"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "sum-out",
        "source": {
          "owner": "merge-sum",
          "pin": "4"
        },
        "target": {
          "owner": "interface-output-sum",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "root-a",
        "source": {
          "owner": "interface-input-a",
          "pin": "0"
        },
        "target": {
          "owner": "split-a",
          "pin": "0"
        },
        "points": [],
        "colour": null
      },
      {
        "id": "root-b",
        "source": {
          "owner": "interface-input-b",
          "pin": "0"
        },
        "target": {
          "owner": "split-b",
          "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"
        },
        {
          "publicId": "cin",
          "instanceId": "interface-input-cin",
          "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": -1520,
        "y": -740,
        "w": 3040,
        "h": 1480
      }
    }
  }
}
