This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'XOR', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
1: 'x', | |
0: 'y' | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'NAND', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
1: 'x', | |
0: 'y' | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'OR', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
1: 'x', | |
0: 'y' | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'AND', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
1: 'x', | |
0: 'y' | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'NOT', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
HIGH: 'off', | |
LOW: 'on' | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'transistor', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
HIGH: 'on', | |
LOW: 'off' | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine({ | |
id: 'switch', | |
initial: 'off', | |
states: { | |
off: { | |
on: { | |
FLIP: 'on' | |
} | |
}, | |
on: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class layer4 { | |
constructor(){ | |
this.distal = [ | |
// X,A,B,C,D,Y | |
[0,0,0,0,0,0], // X | |
[0,0,0,0,0,0], // A | |
[1,1,0,0,0,0], // B | |
[0,0,1,0,0,0], // C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inputs = [ | |
[0,0], | |
[1,0], | |
[0,1], | |
[1,1] | |
] | |
var outputs = [ | |
// AND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inputs = [ | |
[0,0], | |
[1,0], | |
[0,1], | |
[1,1] | |
] | |
var outputs = [ | |
0, 0, 0, 1 |
NewerOlder