plunker에 simcirjs 그 3

개요

plunker에서 simcirjs를 시도했습니다.
전 가산기 만들어 보았다.

사진



샘플 코드


{
  "width":800,
  "height":400,
  "showToolbox":true,
  "toolbox":[

  ],
  "devices":[
    {"type":"DC","id":"dev0","x":104,"y":184,"label":"DC"},
    {"type":"Toggle","id":"dev1","x":168,"y":136,"label":"Toggle","state":{"on":false}},
    {"type":"LED","id":"dev2","x":224,"y":176,"label":"LED"},
    {"type":"LED","id":"dev3","x":224,"y":272,"label":"LED"},
    {"type":"XOR","id":"dev4","x":296,"y":128,"label":"XOR"},
    {"type":"LED","id":"dev5","x":560,"y":104,"label":"LED"},
    {"type":"LED","id":"dev6","x":560,"y":224,"label":"LED"},
    {"type":"XOR","id":"dev7","x":416,"y":128,"label":"XOR"},
    {"type":"AND","id":"dev8","x":368,"y":184,"label":"AND"},
    {"type":"AND","id":"dev9","x":304,"y":240,"label":"AND"},
    {"type":"OR","id":"dev10","x":424,"y":232,"label":"OR"},
    {"type":"LED","id":"dev11","x":224,"y":112,"label":"LED"},
    {"type":"Toggle","id":"dev12","x":168,"y":56,"label":"Toggle","state":{"on":false}},
    {"type":"Toggle","id":"dev13","x":168,"y":216,"label":"Toggle","state":{"on":false}}
  ],
  "connectors":[
    {"from":"dev1.in0","to":"dev0.out0"},
    {"from":"dev2.in0","to":"dev1.out0"},
    {"from":"dev3.in0","to":"dev13.out0"},
    {"from":"dev4.in0","to":"dev1.out0"},
    {"from":"dev4.in1","to":"dev13.out0"},
    {"from":"dev5.in0","to":"dev10.out0"},
    {"from":"dev6.in0","to":"dev7.out0"},
    {"from":"dev7.in0","to":"dev12.out0"},
    {"from":"dev7.in1","to":"dev4.out0"},
    {"from":"dev8.in0","to":"dev12.out0"},
    {"from":"dev8.in1","to":"dev4.out0"},
    {"from":"dev9.in0","to":"dev1.out0"},
    {"from":"dev9.in1","to":"dev13.out0"},
    {"from":"dev10.in0","to":"dev8.out0"},
    {"from":"dev10.in1","to":"dev9.out0"},
    {"from":"dev11.in0","to":"dev12.out0"},
    {"from":"dev12.in0","to":"dev0.out0"},
    {"from":"dev13.in0","to":"dev0.out0"}
  ]
}

사진



내장에 fulladder 이었다.



이상.

좋은 웹페이지 즐겨찾기