{
  "draw2d": [
    {
      "type": "shape_designer.figure.PolyRect",
      "id": "e72b4754-e04e-21df-6937-669d31471b19",
      "x": 7965,
      "y": 7971.5776000000005,
      "width": 70,
      "height": 60,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "baseClass": "draw2d.SetFigure",
        "code": "/**\n * by 'Draw2D Shape Designer'\n *\n * Custom JS code to tweak the standard behaviour of the generated\n * shape. add your custome code and event handler here.\n *\n *\n */\ntestShape = testShape.extend({\n\n    init: function(attr, setter, getter){\n        this._super(attr, setter, getter);\n\n        this.attr({resizeable:false});\n        this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy());\n    },\n\n    /**\n     *  Called by the simulator for every calculation\n     *  loop\n     *  @required\n     **/\n    calculate:function()\n    {\n        var a = this.getInputPort(\"input_a\").getValue();\n        var b = this.getInputPort(\"input_b\").getValue();\n        \n        // s = a XOR b\n        this.getOutputPort(\"output_s\").setValue(( a ? !b : b ));\n        \n        // c = a AND b\n        this.getOutputPort(\"output_c\").setValue(( a & b ));\n    },\n\n\n    /**\n     *  Called if the simulation mode is starting\n     *  @required\n     **/\n    onStart:function()\n    {\n    },\n\n    /**\n     *  Called if the simulation mode is stopping\n     *  @required\n     **/\n    onStop:function()\n    {\n    }\n});",
        "name": "Rectangle",
        "markdown": "# Half Adder\n\nHalf adder is a combinational logic circuit with two \ninputs and two outputs. \n\nThe half adder circuit is designed to add two single \nbit binary number `A` and `B`. \n\nIt is the basic building block for addition of two \nsingle bit numbers. This circuit has two outputs \n`carry` and `sum`.\n\n\n|  A    |    B    |     S    |    C   |\n|:-----:|:-------:|:--------:|:-------|\n|   0   |    0    |     0    |     0  |\n|   0   |    1    |     1    |     0  |\n|   1   |    0    |     1    |     0  |\n|   1   |    1    |     0    |     1  |\n"
      },
      "cssClass": "shape_designer_figure_PolyRect",
      "ports": [],
      "bgColor": "#FFFFFF",
      "color": "#303030",
      "stroke": 1,
      "radius": 1,
      "dasharray": null,
      "vertices": [
        {
          "x": 7965,
          "y": 7971.5776000000005
        },
        {
          "x": 8035,
          "y": 7971.5776000000005
        },
        {
          "x": 8035,
          "y": 8031.5776000000005
        },
        {
          "x": 7965,
          "y": 8031.5776000000005
        }
      ],
      "blur": 0,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.SizeFilter"
        },
        {
          "name": "shape_designer.filter.StrokeFilter"
        },
        {
          "name": "shape_designer.filter.FillColorFilter"
        },
        {
          "name": "shape_designer.filter.RadiusFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "aa347e18-3b28-dada-f134-ecac6c2ffa84",
      "x": 7982.65625,
      "y": 7979.5625,
      "width": 28.328125,
      "height": 21,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "Half",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 10,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "5d534841-5021-4cdb-260b-9229aaa38720",
      "x": 7981.717000000001,
      "y": 7989.8117999999995,
      "width": 34.828125,
      "height": 21,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "Adder",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 10,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "e7565a76-9e96-5cb7-3a96-f888e06f053c",
      "x": 7966,
      "y": 7967.4375,
      "width": 28.328125,
      "height": 20.734375,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "A",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 16,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "511fb62f-8edb-1b20-4894-3a53b4d1949b",
      "x": 7966,
      "y": 8006.5625,
      "width": 28.328125,
      "height": 20.734375,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "B",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 16,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "8a2d55b6-32a0-fdfd-68b7-d3df1035e143",
      "x": 8013.34375,
      "y": 7967.4375,
      "width": 28.328125,
      "height": 20.734375,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "S",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 16,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "a2956abc-b259-7b38-17f9-1bcb2abee403",
      "x": 8013.34375,
      "y": 8006.5625,
      "width": 28.328125,
      "height": 20.734375,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "C",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 16,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "3e46095d-560c-8139-3ea0-f44e93718983",
      "x": 8030.8256,
      "y": 7976.5,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "output_s",
        "type": "Output",
        "direction": 1,
        "fanout": 20
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "#37B1DE",
      "color": "#1B1B1B",
      "stroke": 1,
      "dasharray": null,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FanoutFilter"
        },
        {
          "name": "shape_designer.filter.PortDirectionFilter"
        },
        {
          "name": "shape_designer.filter.PortTypeFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "71ba1c80-5739-1862-2a6e-fbcca41e28cb",
      "x": 8031.8256,
      "y": 8015.8117999999995,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "output_c",
        "type": "Output",
        "direction": 1,
        "fanout": 20
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "#37B1DE",
      "color": "#1B1B1B",
      "stroke": 1,
      "dasharray": null,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FanoutFilter"
        },
        {
          "name": "shape_designer.filter.PortDirectionFilter"
        },
        {
          "name": "shape_designer.filter.PortTypeFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "a4825e75-c25c-5cca-36d3-7aad8c012d1a",
      "x": 7959.0768,
      "y": 7975.5,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "input_a",
        "type": "Input",
        "direction": 3,
        "fanout": 20
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "#37B1DE",
      "color": "#1B1B1B",
      "stroke": 1,
      "dasharray": null,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FanoutFilter"
        },
        {
          "name": "shape_designer.filter.PortDirectionFilter"
        },
        {
          "name": "shape_designer.filter.PortTypeFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "eed37de1-e11c-3573-2e0c-74b7ce7b718e",
      "x": 7958.0768,
      "y": 8016.6875,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "input_b",
        "type": "Input",
        "direction": 3,
        "fanout": 20
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "#37B1DE",
      "color": "#1B1B1B",
      "stroke": 1,
      "dasharray": null,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FanoutFilter"
        },
        {
          "name": "shape_designer.filter.PortDirectionFilter"
        },
        {
          "name": "shape_designer.filter.PortTypeFilter"
        }
      ]
    }
  ],
  "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABVCAYAAADJ/vPXAAABGUlEQVR4Xu3SMQ0AAAzDsJU/6bHwlRKIZHXXiMBIpcgFjU4QdNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGV6dNBIAGUemygAVuUySTUAAAAASUVORK5CYII="
}
