-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatasets.js
41 lines (33 loc) · 1.07 KB
/
datasets.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const data = {};
data._datasetmodel = [
{ in: [], out: [] }
]
data.ANDdataset = [ // for AND logic gate. Returns true only if both inputs are true;
{ in: [0,0], out: [0] },
{ in: [0,1], out: [0] },
{ in: [1,0], out: [0] },
{ in: [1,1], out: [1] }
];
data.ORdataset = [ // for OR logic gate. Returns true if one or both inputs are true;
{ in: [0,0], out: [0] },
{ in: [0,1], out: [1] },
{ in: [1,0], out: [1] },
{ in: [1,1], out: [1] }
];
data.XORdataset = [ // for XOR logic gate. Returns true only if one of the inputs is true;
{ in: [0,0], out: [0] },
{ in: [0,1], out: [1] },
{ in: [1,0], out: [1] },
{ in: [1,1], out: [0] }
];
data.TRIdataset = [ // for custom logic gate. Returns true only if at least two inputs are true;
{ in: [0,0,0], out: [0] },
{ in: [0,0,1], out: [0] },
{ in: [0,1,0], out: [0] },
{ in: [0,1,1], out: [1] },
{ in: [1,0,0], out: [0] },
{ in: [1,0,1], out: [1] },
{ in: [1,1,0], out: [1] },
{ in: [1,1,1], out: [1] }
];
module.exports = data;