Skip to content

Commit

Permalink
Add 3-bit OR,NOR gates
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus89 committed May 22, 2017
1 parent 90dc3f6 commit a884180
Show file tree
Hide file tree
Showing 2 changed files with 354 additions and 0 deletions.
177 changes: 177 additions & 0 deletions blocks/Gates/3 bit/NOR.ice
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"version": "1.1",
"package": {
"name": "NOR",
"version": "1.0.0",
"description": "NOR logic gate",
"author": "Jesús Arroyo, Carlos Diaz",
"image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%22-252%20400.9%2090%2040%22%3E%3Cpath%20d=%22M-252%20419.9h28.434v2H-252zM-252%20409.9h26v2h-26zm0%2020h27v2h-27zm74.7-10h15.3v2h-15.3z%22/%3E%3Cpath%20d=%22M-181.4%20426.2c-2.9%200-5.3-2.4-5.3-5.3s2.4-5.3%205.3-5.3%205.3%202.4%205.3%205.3-2.4%205.3-5.3%205.3zm0-8.6c-1.8%200-3.3%201.5-3.3%203.3%200%201.8%201.5%203.3%203.3%203.3s3.3-1.5%203.3-3.3c0-1.8-1.5-3.3-3.3-3.3z%22/%3E%3Cpath%20d=%22M-185.3%20422.6l-.3-2.1.4-1.6c-10.3-17.8-26-18-30.6-18H-233l2%202.4s5.7%207%205.7%2017.6c0%2010.6-5.7%2017.6-5.7%2017.6l-2%202.4h17.2c2.4%200%207.7%200%2013.6-2.4%205.7-2.3%2012-6.9%2017-15.7l-.1-.2zm-18.2%2013.1c-5.4%202.2-9.8%202.2-12.3%202.2H-227c1.9-3.1%204.8-9%204.8-17s-2.9-13.9-4.8-17h11.3c4.7%200%2018.3-.1%2028%2017-4.8%208.4-10.6%2012.7-15.8%2014.8z%22/%3E%3C/svg%3E"
},
"design": {
"board": "icezum",
"graph": {
"blocks": [
{
"id": "18c2ebc7-5152-439c-9b3f-851c59bac834",
"type": "basic.input",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 64,
"y": 56
}
},
{
"id": "664caf9e-5f40-4df4-800a-b626af702e62",
"type": "basic.output",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 752,
"y": 144
}
},
{
"id": "97b51945-d716-4b6c-9db9-970d08541249",
"type": "basic.input",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 64,
"y": 144
}
},
{
"id": "67a049c8-94a8-4fd2-ba99-15a3d09124d9",
"type": "basic.input",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 64,
"y": 232
}
},
{
"id": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"type": "basic.code",
"data": {
"code": "// NOR logic gate\n\nassign d = ~(a | b | c);",
"params": [],
"ports": {
"in": [
{
"name": "a"
},
{
"name": "b"
},
{
"name": "c"
}
],
"out": [
{
"name": "d"
}
]
}
},
"position": {
"x": 256,
"y": 48
},
"size": {
"width": 384,
"height": 256
}
}
],
"wires": [
{
"source": {
"block": "18c2ebc7-5152-439c-9b3f-851c59bac834",
"port": "out"
},
"target": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "a"
}
},
{
"source": {
"block": "97b51945-d716-4b6c-9db9-970d08541249",
"port": "out"
},
"target": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "b"
}
},
{
"source": {
"block": "67a049c8-94a8-4fd2-ba99-15a3d09124d9",
"port": "out"
},
"target": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "c"
}
},
{
"source": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "d"
},
"target": {
"block": "664caf9e-5f40-4df4-800a-b626af702e62",
"port": "in"
}
}
]
},
"state": {
"pan": {
"x": -6,
"y": 87.5
},
"zoom": 1
}
},
"dependencies": {}
}
177 changes: 177 additions & 0 deletions blocks/Gates/3 bit/OR.ice
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"version": "1.1",
"package": {
"name": "OR",
"version": "1.0.0",
"description": "OR logic gate",
"author": "Jesús Arroyo",
"image": "%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2290%22%20height=%2240%22%20version=%221%22%3E%3Cpath%20d=%22M28.118%2020H0%22%20fill=%22none%22%20stroke=%22#000%22%20stroke-width=%222.08%22/%3E%3Cpath%20d=%22M65%2020h25M26%2010H0m27%2020H0%22%20fill=%22none%22%20stroke=%22#000%22%20stroke-width=%222%22/%3E%3Cpath%20d=%22M19.094%200l2%202.438s5.656%207%205.656%2017.562c0%2010.562-5.656%2017.563-5.656%2017.563l-2%202.437H36.25c2.408%200%207.69.025%2013.625-2.406s12.537-7.344%2017.688-16.875L66.25%2020l1.313-.719C57.258.216%2041.007%200%2036.25%200H19.094zm5.875%203H36.25c4.684%200%2018.287-.13%2027.969%2017-4.767%208.43-10.522%2012.684-15.719%2014.813C43.14%2037.008%2038.658%2037%2036.25%2037H25c1.874-3.108%204.75-9.05%204.75-17%200-7.973-2.909-13.9-4.781-17z%22%20fill-rule=%22evenodd%22/%3E%3C/svg%3E"
},
"design": {
"board": "icezum",
"graph": {
"blocks": [
{
"id": "18c2ebc7-5152-439c-9b3f-851c59bac834",
"type": "basic.input",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 64,
"y": 56
}
},
{
"id": "664caf9e-5f40-4df4-800a-b626af702e62",
"type": "basic.output",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 752,
"y": 144
}
},
{
"id": "97b51945-d716-4b6c-9db9-970d08541249",
"type": "basic.input",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 64,
"y": 144
}
},
{
"id": "8c6fa652-986f-4435-88d8-447fac8c1c0e",
"type": "basic.input",
"data": {
"name": "",
"pins": [
{
"index": "0",
"name": "",
"value": "0"
}
],
"virtual": true
},
"position": {
"x": 64,
"y": 232
}
},
{
"id": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"type": "basic.code",
"data": {
"code": "// OR logic gate\n\nassign d = a | b | c;",
"params": [],
"ports": {
"in": [
{
"name": "a"
},
{
"name": "b"
},
{
"name": "c"
}
],
"out": [
{
"name": "d"
}
]
}
},
"position": {
"x": 256,
"y": 48
},
"size": {
"width": 384,
"height": 256
}
}
],
"wires": [
{
"source": {
"block": "18c2ebc7-5152-439c-9b3f-851c59bac834",
"port": "out"
},
"target": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "a"
}
},
{
"source": {
"block": "97b51945-d716-4b6c-9db9-970d08541249",
"port": "out"
},
"target": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "b"
}
},
{
"source": {
"block": "8c6fa652-986f-4435-88d8-447fac8c1c0e",
"port": "out"
},
"target": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "c"
}
},
{
"source": {
"block": "00925b04-5004-4307-a737-fa4e97c8b6ab",
"port": "d"
},
"target": {
"block": "664caf9e-5f40-4df4-800a-b626af702e62",
"port": "in"
}
}
]
},
"state": {
"pan": {
"x": -6,
"y": 87.5
},
"zoom": 1
}
},
"dependencies": {}
}

0 comments on commit a884180

Please sign in to comment.