User:Madk/Binary Odyssey

From FSG Wiki

Jump to: navigation, search

Update log: Added single pixel half adder


#subversion 2

#Binary Odyssey - version 0.1


group Basic Empty greenWall goldWall silverWall whiteWall redWall
group Wires Wire0 Wire1 Wire2 Wire3 Wire4 Wire5 I I2 o o2 H2 L2
group Circutry Split Resistor Resist2 CrossA1 CrossA2 CrossB1 CrossB2
group Input Button Push
group Display LED0 LED1 LEDi
group Memory ROM_H ROM_L ROM2_1 ROM2_0 RAM_1 RAM_0
group Functions NOT NAND NOR XOR HalfAdder


#Emptiness, does absolutely nothing.
element Empty 0 0 0 0 0 0 0 1

#A green wall for making things pretty
element greenWall 30 85 32 0 0 1 0 1
#A gold colored wall
element goldWall 240 231 44 0 0 1 0 1
#A silver wall
element silverWall 150 152 168 0 0 1 0 1
#A light colored wall
element whiteWall 240 255 240 0 0 1 0 1
#Because there needs to be a colorful wall
element redWall 200 43 40 0 0 1 0 1

#Carries signals. Acts as an input.
element Wire0 64 64 64 0 0 1 0 1
#Carries signals.
element Wire1 128 128 128 0 0 1 0 1
#Carries signals. Acts as an output.
element Wire2 192 192 192 0 0 1 0 1
#An alternative to Wire2 that does not act as an output
element Wire3 255 255 255 0 0 1 0 1
#An alternative to Wire2 that does not continue signals through a wire
element Wire4 240 240 240 0 0 1 0 1
#An alternative to Wire0 that does not continue signals through a wire
element Wire5 86 86 86 0 0 1 0 1

#High voltage
element H0 255 255 0 0 0 1 0 0
element H1 255 255 1 0 0 1 0 0
element H2 255 255 2 0 0 1 0 1
element H3 255 255 3 0 0 1 0 0
element H4 255 255 4 0 0 1 0 0
element H5 255 255 5 0 0 1 0 0
neighbor 1 H0 Wire1 1 Wire0 H1
neighbor 1 H1 Wire2 1 Wire1 H2
neighbor 1 H2 Wire0 1 Wire2 H0
neighbor 1 H3 Wire0 1 Wire3 H0
#Low voltage
element L0 0 255 255 0 0 1 0 0
element L1 1 255 255 0 0 1 0 0
element L2 2 255 255 0 0 1 0 1
element L3 3 255 255 0 0 1 0 0
element L4 4 255 255 0 0 1 0 0
element L5 5 255 255 0 0 1 0 0
##
neighbor 1 L0 Wire1 1 Wire0 L1
neighbor 1 L1 Wire2 1 Wire1 L2
neighbor 1 L2 Wire0 1 Wire2 L0
neighbor 1 L3 Wire0 1 Wire3 L0

#Recieves a signal from a wire and transmits it to a device.
element I 0 210 210 0 0 1 0 1
#Some components need two separate inputs. Behold input no. 2
element I2 140 210 210 0 0 1 0 1
#Recieves a signal from a device and outputs it to Wire0
element o 0 163 163 0 0 1 0 1
#Some devices require two outpus. Here is output no. 2
element o2 140 163 163 0 0 1 0 1
##
element iH 4 200 200 0 0 1 0 0
element iH2 94 200 200 0 0 1 0 0
element iL 2 200 200 0 0 1 0 0
element iL2 92 200 200 0 0 1 0 0
element oH 4 200 200 0 0 1 0 0
element oH2 94 200 200 0 0 1 0 0
element oL 2 200 200 0 0 1 0 0
element oL2 92 200 200 0 0 1 0 0
neighbor 1 I H2 1 iH Wire2 
neighbor 1 I H4 1 iH Wire4
neighbor 1 I2 H2 1 iH2 Wire2 
neighbor 1 I2 H4 1 iH2 Wire4
neighbor 1 I L2 1 iL Wire2 
neighbor 1 I L4 1 iL Wire4
neighbor 1 I2 L2 1 iL2 Wire2 
neighbor 1 I2 L4 1 iL2 Wire4
neighbor 1 oH Wire0 1 o H0
neighbor 1 oH2 Wire0 1 o2 H0
neighbor 1 oL Wire0 1 o L0
neighbor 1 oL2 Wire0 1 o2 L0
neighbor 1 oH Wire5 1 o H5
neighbor 1 oH2 Wire5 1 o2 H5
neighbor 1 oL Wire5 1 o L5
neighbor 1 oL2 Wire5 1 o2 L5
neighbor 1 oH I 1 o iH
neighbor 1 oL I 1 o iL
neighbor 1 oH2 I2 1 o2 iH2
neighbor 1 oL2 I2 1 o2 iL2

#recieves a signal and duplicates it into 2 outputs
element Split 200 0 200 0 0 1 0 1
element sp0  200 1 200 0 0 1 0 0
element sp1  201 1 201 0 0 1 0 0
element sp02 200 2 200 0 0 1 0 0
element sp12 201 2 201 0 0 1 0 0
neighbor 1 Split iH 1 sp1 I
neighbor 1 Split iL 1 sp0 I
neighbor 1 sp0 o 1 sp02 oL
neighbor 1 sp1 o 1 sp12 oH
neighbor 1 sp02 o2 1 Split oL2
neighbor 1 sp12 o2 1 Split oH2

#A logic gate, it converts H to L and turns L to H
element NOT 240 130 72 0 0 1 0 1
element no1 250 130 72 0 0 1 0 0 
element no0 230 130 72 0 0 1 0 0
neighbor 1 NOT iH 1 no1 I
neighbor 1 NOT iL 1 no0 I
neighbor 1 no1 o 1 NOT oL
neighbor 1 no0 o 1 NOT oH

#Single pixel half adder. Outputs Carry through o and Sum through o2
element HalfAdder 156 152 21 0 0 1 0 1
element hadd0_ 131 132 42 0 0 1 0 0
element hadd1_ 131 132 41 0 0 1 0 0
element hadd11 132 132 41 0 0 1 0 0
element hadd00 133 132 41 0 0 1 0 0
element hadd10 134 132 41 0 0 1 0 0
element hadd11_2 137 132 41 0 0 1 0 0
element hadd00_2 138 132 41 0 0 1 0 0
element hadd10_2 139 132 41 0 0 1 0 0
neighbor 1 HalfAdder iH 1 hadd1_ I
neighbor 1 HalfAdder iL 1 hadd0_ I
neighbor 1 hadd1_ iH2 1 hadd11 I2
neighbor 1 hadd1_ iL2 1 hadd10 I2
neighbor 1 hadd0_ iH2 1 hadd10 I2
neighbor 1 hadd0_ iL2 1 hadd00 I2
neighbor 1 hadd11 o 1 hadd11_2 oH
neighbor 1 hadd00 o 1 hadd00_2 oL
neighbor 1 hadd10 o 1 hadd10_2 oL
neighbor 1 hadd11_2 o2 1 HalfAdder oL2
neighbor 1 hadd00_2 o2 1 HalfAdder oL2
neighbor 1 hadd10_2 o2 1 HalfAdder oH2

#A logic gate. Requires 2 inputs. 1+1=0 0+0=1 1+0=1
element NAND 0 200 0 0 0 1 0 1
element nan0_ 1 200 0 0 0 1 0 0
element nan1_ 1 200 0 0 0 1 0 0
element nan11 2 200 0 0 0 1 0 0
element nan00 3 200 0 0 0 1 0 0
element nan10 4 200 0 0 0 1 0 0
neighbor 1 NAND iH 1 nan1_ I
neighbor 1 NAND iL 1 nan0_ I
neighbor 1 nan1_ iH2 1 nan11 I2
neighbor 1 nan1_ iL2 1 nan10 I2
neighbor 1 nan0_ iH2 1 nan10 I2
neighbor 1 nan0_ iL2 1 nan00 I2
neighbor 1 nan11 o 1 NAND oL
neighbor 1 nan00 o 1 NAND oH
neighbor 1 nan10 o 1 NAND oH

#A logic gate. Requires 2 inputs. 1+1=0 0+0=1 1+0=0
element NOR 0 90 200 0 0 1 0 1
element nor0_ 1 90 200 0 0 1 0 0
element nor1_ 1 90 200 0 0 1 0 0
element nor11 2 90 200 0 0 1 0 0
element nor00 3 90 200 0 0 1 0 0
element nor10 4 90 200 0 0 1 0 0
neighbor 1 NOR iH 1 nor1_ I
neighbor 1 NOR iL 1 nor0_ I
neighbor 1 nor1_ iH2 1 nor11 I2
neighbor 1 nor1_ iL2 1 nor10 I2
neighbor 1 nor0_ iH2 1 nor10 I2
neighbor 1 nor0_ iL2 1 nor00 I2
neighbor 1 nor11 o 1 NOR oL
neighbor 1 nor00 o 1 NOR oH
neighbor 1 nor10 o 1 NOR oL

#A logic gate. Requires 2 inputs. 1+1=0 0+0=0 1+0=1
element XOR 150 80 240 0 0 1 0 1
element xor0_ 151 80 240 0 0 1 0 0
element xor1_ 151 80 240 0 0 1 0 0
element xor11 152 80 240 0 0 1 0 0
element xor00 153 80 240 0 0 1 0 0
element xor10 154 80 240 0 0 1 0 0
neighbor 1 XOR iH 1 xor1_ I
neighbor 1 XOR iL 1 xor0_ I
neighbor 1 xor1_ iH2 1 xor11 I2
neighbor 1 xor1_ iL2 1 xor10 I2
neighbor 1 xor0_ iH2 1 xor10 I2
neighbor 1 xor0_ iL2 1 xor00 I2
neighbor 1 xor11 o 1 XOR oL
neighbor 1 xor00 o 1 XOR oL
neighbor 1 xor10 o 1 XOR oH

#It constantly outputs the stored signal
element ROM_H 148 124 60 0 0 1 0 1
element ROM_L 128 104 0 0 0 1 0 1
element ROMh 150 124 60 0 0 1 0 0
element ROMl 130 104 60 0 0 1 0 0
neighbor 1 ROM_H o 1 ROMh oH
neighbor 1 ROM_L o 1 ROMl oL
self 1 ROMh 1 ROM_H
self 1 ROMl 1 ROM_L
neighbor 1 ROM_H o2 1 ROMh oH2
neighbor 1 ROM_L o2 1 ROMl oL2

#Press it with push and it will output one signal of high voltage
element Button 215 215 215 0 0 1 0 1
element bp 220 220 220 0 0 1 0 0
element b0 210 210 210 0 0 1 0 0
neighbor 1 bp Button 1 bp bp
neighbor 1 b0 bp 1 b0 b0
self 0.2 b0 1 Button
neighbor 1 bp o 1 b0 oH

#Use it to press buttons.
element Push 0 0 0 0 0 1 0 1
neighbor 1 Push Button 1 bp bp

#A single pixel LED that lights up on H signal and turns off on L signal.
element LED0 96 3 3 0 0 1 0 1
element LED1 255 80 80 0 0 1 0 1
neighbor 1 LED0 H2 1 LED1 H2_
neighbor 1 LED1 L2 1 LED0 L2_
element H2_ 240 240 100 0 0 1 0 0
element L2_ 100 240 240 0 0 1 0 0
self 0.5 H2_ 1 H2
self 0.5 L2_ 1 L2
neighbor 1 H2_ LED0 1 H2_ LED1
neighbor 1 L2_ LED1 1 L2_ LED0

#An optional output for LEDs since cyan doesn't look too good with red. Does not eliminate the signal.
element LEDi 130 90 90 0 0 1 0 1
element LiH 130 92 90 0 0 1 0 0
element LiL 130 91 90 0 0 1 0 0
neighbor 1 LEDi H2 1 LiH H2
neighbor 1 LEDi H4 1 LiH H4
neighbor 1 LEDi L2 1 LiL L2
neighbor 1 LEDi L4 1 LiL L4
neighbor 1 LEDi L2_ 1 LiL L2_
neighbor 1 LEDi H2_ 1 LiH H2_
neighbor 1 LiH LED0 1 LEDi LED1
neighbor 1 LiH LED1 1 LEDi LED1
neighbor 1 LiL LED0 1 LEDi LED0
neighbor 1 LiL LED1 1 LEDi LED0
neighbor 1 oH LEDi 1 o LiH
neighbor 1 oL LEDi 1 o LiL
neighbor 1 oH2 LEDi 1 o2 LiH
neighbor 1 oL2 LEDi 1 o2 LiL

#eliminates all signals it comes into contact to from Wire1
element Resistor 100 0 100 0 0 1 0 1
neighbor 1 Resistor H1 1 Resistor Wire1
neighbor 1 Resistor L1 1 Resistor Wire1

#Eliminates a signal from Wire1 if it has recieved an input H
element Resist2 120 43 120 0 0 1 0 1
element res2 122 45 122 0 0 1 0 0
neighbor 1 Resist2 iH 1 res2 I
neighbor 1 Resist2 iL 1 Resist2 I
neighbor 1 res2 H1 1 Resist2 Wire1
neighbor 1 res2 L1 1 Resist2 Wire1

#Allows for the crossing of 2 wires. CrossA uses I and o, CrossB uses I2 and o2.
element CrossA1 0 40 255 0 0 1 0 1
element CrossB1 0 140 255 0 0 1 0 1 
element CrossA2 0 90 255 0 0 1 0 1
element CrossB2 0 190 255 0 0 1 0 1
element CrossA1_L 1 40 255 0 0 1 0 0
element CrossA1_H 2 40 255 0 0 1 0 0
element CrossB1_L 1 140 255 0 0 1 0 0
element CrossB1_H 2 140 255 0 0 1 0 0
element CrossA2_L 1 90 255 0 0 1 0 0
element CrossA2_H 2 90 255 0 0 1 0 0
element CrossB2_L 1 190 255 0 0 1 0 0
element CrossB2_H 2 190 255 0 0 1 0 0
neighbor 1 CrossA1 iH 1 CrossA1_H I
neighbor 1 CrossA1 iL 1 CrossA1_L I
neighbor 1 CrossB1 iH2 1 CrossB1_H I2
neighbor 1 CrossB1 iL2 1 CrossB1_L I2
neighbor 1 CrossA1_H CrossA2 1 CrossA1 CrossA2_H
neighbor 1 CrossA1_L CrossA2 1 CrossA1 CrossA2_L
neighbor 1 CrossB1_H CrossB2 1 CrossB1 CrossB2_H
neighbor 1 CrossB1_L CrossB2 1 CrossB1 CrossB2_L
neighbor 1 CrossA2_H o 1 CrossA2 oH
neighbor 1 CrossA2_L o 1 CrossA2 oL
neighbor 1 CrossB2_H o2 1 CrossB2 oH2
neighbor 1 CrossB2_L o2 1 CrossB2 oL2

#When it recieves a signal from I2 it outputs the saved value. When it recieves an H signal from I it holds that value.
element RAM_0 120 120 20 0 0 1 0 1
element RAM_1 130 130 70 0 0 1 0 1
element ram0 120 120 22 0 0 1 0 0
element ram1 130 130 72 0 0 1 0 0
neighbor 1 RAM_0 iH 1 RAM_1 I
neighbor 1 RAM_0 iL 1 RAM_0 I
neighbor 1 RAM_1 iH 1 RAM_1 I
neighbor 1 RAM_1 iL 1 RAM_0 I
neighbor 1 RAM_0 iH2 1 ram0 I2
neighbor 1 RAM_1 iH2 1 ram1 I2
neighbor 1 RAM_0 iL2 1 RAM_0 I2
neighbor 1 RAM_1 iL2 1 RAM_1 I2
neighbor 1 ram0 o 1 RAM_0 oL
neighbor 1 ram1 o 1 RAM_1 oH

#A different kind of ROM, it only outputs a signal when it recieves a H signal through I
element ROM2_0 98 40 0 0 0 1 0 1
element ROM2_1 134 55 32 0 0 1 0 1
element r20 98 40 4 0 0 1 0 0
element r21 98 55 36 0 0 1 0 0
neighbor 1 ROM2_0 iH 1 r20 I
neighbor 1 ROM2_1 iH 1 r21 I
neighbor 1 ROM2_0 iL 1 ROM2_0 I
neighbor 1 ROM2_1 iL 1 ROM2_1 I
neighbor 1 r20 o 1 ROM2_0 oL
neighbor 1 r20 o2 1 ROM2_0 oL2
neighbor 1 r21 o 1 ROM2_1 oH
neighbor 1 r21 o2 1 ROM2_1 oH2
#subversion 2

#Binary Odyssey - version 0.1


group Basic Empty greenWall goldWall silverWall whiteWall redWall
group Wires Wire0 Wire1 Wire2 Wire3 Wire4 Wire5 I I2 o o2 H2 L2
group Circutry Split Resistor Resist2 CrossA1 CrossA2 CrossB1 CrossB2
group Input Button Push
group Display LED0 LED1 LEDi
group Memory ROM_H ROM_L ROM2_1 ROM2_0 RAM_1 RAM_0
group Functions NOT NAND NOR XOR HalfAdder


#Emptiness, does absolutely nothing.
element Empty 0 0 0 0 0 0 0 1

#A green wall for making things pretty
element greenWall 30 85 32 0 0 1 0 1
#A gold colored wall
element goldWall 240 231 44 0 0 1 0 1
#A silver wall
element silverWall 150 152 168 0 0 1 0 1
#A light colored wall
element whiteWall 240 255 240 0 0 1 0 1
#Because there needs to be a colorful wall
element redWall 200 43 40 0 0 1 0 1

#Carries signals. Acts as an input.
element Wire0 64 64 64 0 0 1 0 1
#Carries signals.
element Wire1 128 128 128 0 0 1 0 1
#Carries signals. Acts as an output.
element Wire2 192 192 192 0 0 1 0 1
#An alternative to Wire2 that does not act as an output
element Wire3 255 255 255 0 0 1 0 1
#An alternative to Wire2 that does not continue signals through a wire
element Wire4 240 240 240 0 0 1 0 1
#An alternative to Wire0 that does not continue signals through a wire
element Wire5 86 86 86 0 0 1 0 1

#High voltage
element H0 255 255 0 0 0 1 0 0
element H1 255 255 1 0 0 1 0 0
element H2 255 255 2 0 0 1 0 1
element H3 255 255 3 0 0 1 0 0
element H4 255 255 4 0 0 1 0 0
element H5 255 255 5 0 0 1 0 0
neighbor 1 H0 Wire1 1 Wire0 H1
neighbor 1 H1 Wire2 1 Wire1 H2
neighbor 1 H2 Wire0 1 Wire2 H0
neighbor 1 H3 Wire0 1 Wire3 H0
#Low voltage
element L0 0 255 255 0 0 1 0 0
element L1 1 255 255 0 0 1 0 0
element L2 2 255 255 0 0 1 0 1
element L3 3 255 255 0 0 1 0 0
element L4 4 255 255 0 0 1 0 0
element L5 5 255 255 0 0 1 0 0
##
neighbor 1 L0 Wire1 1 Wire0 L1
neighbor 1 L1 Wire2 1 Wire1 L2
neighbor 1 L2 Wire0 1 Wire2 L0
neighbor 1 L3 Wire0 1 Wire3 L0

#Recieves a signal from a wire and transmits it to a device.
element I 0 210 210 0 0 1 0 1
#Some components need two separate inputs. Behold input no. 2
element I2 140 210 210 0 0 1 0 1
#Recieves a signal from a device and outputs it to Wire0
element o 0 163 163 0 0 1 0 1
#Some devices require two outpus. Here is output no. 2
element o2 140 163 163 0 0 1 0 1
##
element iH 4 200 200 0 0 1 0 0
element iH2 94 200 200 0 0 1 0 0
element iL 2 200 200 0 0 1 0 0
element iL2 92 200 200 0 0 1 0 0
element oH 4 200 200 0 0 1 0 0
element oH2 94 200 200 0 0 1 0 0
element oL 2 200 200 0 0 1 0 0
element oL2 92 200 200 0 0 1 0 0
neighbor 1 I H2 1 iH Wire2 
neighbor 1 I H4 1 iH Wire4
neighbor 1 I2 H2 1 iH2 Wire2 
neighbor 1 I2 H4 1 iH2 Wire4
neighbor 1 I L2 1 iL Wire2 
neighbor 1 I L4 1 iL Wire4
neighbor 1 I2 L2 1 iL2 Wire2 
neighbor 1 I2 L4 1 iL2 Wire4
neighbor 1 oH Wire0 1 o H0
neighbor 1 oH2 Wire0 1 o2 H0
neighbor 1 oL Wire0 1 o L0
neighbor 1 oL2 Wire0 1 o2 L0
neighbor 1 oH Wire5 1 o H5
neighbor 1 oH2 Wire5 1 o2 H5
neighbor 1 oL Wire5 1 o L5
neighbor 1 oL2 Wire5 1 o2 L5
neighbor 1 oH I 1 o iH
neighbor 1 oL I 1 o iL
neighbor 1 oH2 I2 1 o2 iH2
neighbor 1 oL2 I2 1 o2 iL2

#recieves a signal and duplicates it into 2 outputs
element Split 200 0 200 0 0 1 0 1
element sp0  200 1 200 0 0 1 0 0
element sp1  201 1 201 0 0 1 0 0
element sp02 200 2 200 0 0 1 0 0
element sp12 201 2 201 0 0 1 0 0
neighbor 1 Split iH 1 sp1 I
neighbor 1 Split iL 1 sp0 I
neighbor 1 sp0 o 1 sp02 oL
neighbor 1 sp1 o 1 sp12 oH
neighbor 1 sp02 o2 1 Split oL2
neighbor 1 sp12 o2 1 Split oH2

#A logic gate, it converts H to L and turns L to H
element NOT 240 130 72 0 0 1 0 1
element no1 250 130 72 0 0 1 0 0 
element no0 230 130 72 0 0 1 0 0
neighbor 1 NOT iH 1 no1 I
neighbor 1 NOT iL 1 no0 I
neighbor 1 no1 o 1 NOT oL
neighbor 1 no0 o 1 NOT oH

#Single pixel half adder. Outputs Carry through o and Sum through o2
element HalfAdder 156 152 21 0 0 1 0 1
element hadd0_ 131 132 42 0 0 1 0 0
element hadd1_ 131 132 41 0 0 1 0 0
element hadd11 132 132 41 0 0 1 0 0
element hadd00 133 132 41 0 0 1 0 0
element hadd10 134 132 41 0 0 1 0 0
element hadd11_2 137 132 41 0 0 1 0 0
element hadd00_2 138 132 41 0 0 1 0 0
element hadd10_2 139 132 41 0 0 1 0 0
neighbor 1 HalfAdder iH 1 hadd1_ I
neighbor 1 HalfAdder iL 1 hadd0_ I
neighbor 1 hadd1_ iH2 1 hadd11 I2
neighbor 1 hadd1_ iL2 1 hadd10 I2
neighbor 1 hadd0_ iH2 1 hadd10 I2
neighbor 1 hadd0_ iL2 1 hadd00 I2
neighbor 1 hadd11 o 1 hadd11_2 oH
neighbor 1 hadd00 o 1 hadd00_2 oL
neighbor 1 hadd10 o 1 hadd10_2 oL
neighbor 1 hadd11_2 o2 1 HalfAdder oL2
neighbor 1 hadd00_2 o2 1 HalfAdder oL2
neighbor 1 hadd10_2 o2 1 HalfAdder oH2

#A logic gate. Requires 2 inputs. 1+1=0 0+0=1 1+0=1
element NAND 0 200 0 0 0 1 0 1
element nan0_ 1 200 0 0 0 1 0 0
element nan1_ 1 200 0 0 0 1 0 0
element nan11 2 200 0 0 0 1 0 0
element nan00 3 200 0 0 0 1 0 0
element nan10 4 200 0 0 0 1 0 0
neighbor 1 NAND iH 1 nan1_ I
neighbor 1 NAND iL 1 nan0_ I
neighbor 1 nan1_ iH2 1 nan11 I2
neighbor 1 nan1_ iL2 1 nan10 I2
neighbor 1 nan0_ iH2 1 nan10 I2
neighbor 1 nan0_ iL2 1 nan00 I2
neighbor 1 nan11 o 1 NAND oL
neighbor 1 nan00 o 1 NAND oH
neighbor 1 nan10 o 1 NAND oH

#A logic gate. Requires 2 inputs. 1+1=0 0+0=1 1+0=0
element NOR 0 90 200 0 0 1 0 1
element nor0_ 1 90 200 0 0 1 0 0
element nor1_ 1 90 200 0 0 1 0 0
element nor11 2 90 200 0 0 1 0 0
element nor00 3 90 200 0 0 1 0 0
element nor10 4 90 200 0 0 1 0 0
neighbor 1 NOR iH 1 nor1_ I
neighbor 1 NOR iL 1 nor0_ I
neighbor 1 nor1_ iH2 1 nor11 I2
neighbor 1 nor1_ iL2 1 nor10 I2
neighbor 1 nor0_ iH2 1 nor10 I2
neighbor 1 nor0_ iL2 1 nor00 I2
neighbor 1 nor11 o 1 NOR oL
neighbor 1 nor00 o 1 NOR oH
neighbor 1 nor10 o 1 NOR oL

#A logic gate. Requires 2 inputs. 1+1=0 0+0=0 1+0=1
element XOR 150 80 240 0 0 1 0 1
element xor0_ 151 80 240 0 0 1 0 0
element xor1_ 151 80 240 0 0 1 0 0
element xor11 152 80 240 0 0 1 0 0
element xor00 153 80 240 0 0 1 0 0
element xor10 154 80 240 0 0 1 0 0
neighbor 1 XOR iH 1 xor1_ I
neighbor 1 XOR iL 1 xor0_ I
neighbor 1 xor1_ iH2 1 xor11 I2
neighbor 1 xor1_ iL2 1 xor10 I2
neighbor 1 xor0_ iH2 1 xor10 I2
neighbor 1 xor0_ iL2 1 xor00 I2
neighbor 1 xor11 o 1 XOR oL
neighbor 1 xor00 o 1 XOR oL
neighbor 1 xor10 o 1 XOR oH

#It constantly outputs the stored signal
element ROM_H 148 124 60 0 0 1 0 1
element ROM_L 128 104 0 0 0 1 0 1
element ROMh 150 124 60 0 0 1 0 0
element ROMl 130 104 60 0 0 1 0 0
neighbor 1 ROM_H o 1 ROMh oH
neighbor 1 ROM_L o 1 ROMl oL
self 1 ROMh 1 ROM_H
self 1 ROMl 1 ROM_L
neighbor 1 ROM_H o2 1 ROMh oH2
neighbor 1 ROM_L o2 1 ROMl oL2

#Press it with push and it will output one signal of high voltage
element Button 215 215 215 0 0 1 0 1
element bp 220 220 220 0 0 1 0 0
element b0 210 210 210 0 0 1 0 0
neighbor 1 bp Button 1 bp bp
neighbor 1 b0 bp 1 b0 b0
self 0.2 b0 1 Button
neighbor 1 bp o 1 b0 oH

#Use it to press buttons.
element Push 0 0 0 0 0 1 0 1
neighbor 1 Push Button 1 bp bp

#A single pixel LED that lights up on H signal and turns off on L signal.
element LED0 96 3 3 0 0 1 0 1
element LED1 255 80 80 0 0 1 0 1
neighbor 1 LED0 H2 1 LED1 H2_
neighbor 1 LED1 L2 1 LED0 L2_
element H2_ 240 240 100 0 0 1 0 0
element L2_ 100 240 240 0 0 1 0 0
self 0.5 H2_ 1 H2
self 0.5 L2_ 1 L2
neighbor 1 H2_ LED0 1 H2_ LED1
neighbor 1 L2_ LED1 1 L2_ LED0

#An optional output for LEDs since cyan doesn't look too good with red. Does not eliminate the signal.
element LEDi 130 90 90 0 0 1 0 1
element LiH 130 92 90 0 0 1 0 0
element LiL 130 91 90 0 0 1 0 0
neighbor 1 LEDi H2 1 LiH H2
neighbor 1 LEDi H4 1 LiH H4
neighbor 1 LEDi L2 1 LiL L2
neighbor 1 LEDi L4 1 LiL L4
neighbor 1 LEDi L2_ 1 LiL L2_
neighbor 1 LEDi H2_ 1 LiH H2_
neighbor 1 LiH LED0 1 LEDi LED1
neighbor 1 LiH LED1 1 LEDi LED1
neighbor 1 LiL LED0 1 LEDi LED0
neighbor 1 LiL LED1 1 LEDi LED0
neighbor 1 oH LEDi 1 o LiH
neighbor 1 oL LEDi 1 o LiL
neighbor 1 oH2 LEDi 1 o2 LiH
neighbor 1 oL2 LEDi 1 o2 LiL

#eliminates all signals it comes into contact to from Wire1
element Resistor 100 0 100 0 0 1 0 1
neighbor 1 Resistor H1 1 Resistor Wire1
neighbor 1 Resistor L1 1 Resistor Wire1

#Eliminates a signal from Wire1 if it has recieved an input H
element Resist2 120 43 120 0 0 1 0 1
element res2 122 45 122 0 0 1 0 0
neighbor 1 Resist2 iH 1 res2 I
neighbor 1 Resist2 iL 1 Resist2 I
neighbor 1 res2 H1 1 Resist2 Wire1
neighbor 1 res2 L1 1 Resist2 Wire1

#Allows for the crossing of 2 wires. CrossA uses I and o, CrossB uses I2 and o2.
element CrossA1 0 40 255 0 0 1 0 1
element CrossB1 0 140 255 0 0 1 0 1 
element CrossA2 0 90 255 0 0 1 0 1
element CrossB2 0 190 255 0 0 1 0 1
element CrossA1_L 1 40 255 0 0 1 0 0
element CrossA1_H 2 40 255 0 0 1 0 0
element CrossB1_L 1 140 255 0 0 1 0 0
element CrossB1_H 2 140 255 0 0 1 0 0
element CrossA2_L 1 90 255 0 0 1 0 0
element CrossA2_H 2 90 255 0 0 1 0 0
element CrossB2_L 1 190 255 0 0 1 0 0
element CrossB2_H 2 190 255 0 0 1 0 0
neighbor 1 CrossA1 iH 1 CrossA1_H I
neighbor 1 CrossA1 iL 1 CrossA1_L I
neighbor 1 CrossB1 iH2 1 CrossB1_H I2
neighbor 1 CrossB1 iL2 1 CrossB1_L I2
neighbor 1 CrossA1_H CrossA2 1 CrossA1 CrossA2_H
neighbor 1 CrossA1_L CrossA2 1 CrossA1 CrossA2_L
neighbor 1 CrossB1_H CrossB2 1 CrossB1 CrossB2_H
neighbor 1 CrossB1_L CrossB2 1 CrossB1 CrossB2_L
neighbor 1 CrossA2_H o 1 CrossA2 oH
neighbor 1 CrossA2_L o 1 CrossA2 oL
neighbor 1 CrossB2_H o2 1 CrossB2 oH2
neighbor 1 CrossB2_L o2 1 CrossB2 oL2

#When it recieves a signal from I2 it outputs the saved value. When it recieves an H signal from I it holds that value.
element RAM_0 120 120 20 0 0 1 0 1
element RAM_1 130 130 70 0 0 1 0 1
element ram0 120 120 22 0 0 1 0 0
element ram1 130 130 72 0 0 1 0 0
neighbor 1 RAM_0 iH 1 RAM_1 I
neighbor 1 RAM_0 iL 1 RAM_0 I
neighbor 1 RAM_1 iH 1 RAM_1 I
neighbor 1 RAM_1 iL 1 RAM_0 I
neighbor 1 RAM_0 iH2 1 ram0 I2
neighbor 1 RAM_1 iH2 1 ram1 I2
neighbor 1 RAM_0 iL2 1 RAM_0 I2
neighbor 1 RAM_1 iL2 1 RAM_1 I2
neighbor 1 ram0 o 1 RAM_0 oL
neighbor 1 ram1 o 1 RAM_1 oH

#A different kind of ROM, it only outputs a signal when it recieves a H signal through I
element ROM2_0 98 40 0 0 0 1 0 1
element ROM2_1 134 55 32 0 0 1 0 1
element r20 98 40 4 0 0 1 0 0
element r21 98 55 36 0 0 1 0 0
neighbor 1 ROM2_0 iH 1 r20 I
neighbor 1 ROM2_1 iH 1 r21 I
neighbor 1 ROM2_0 iL 1 ROM2_0 I
neighbor 1 ROM2_1 iL 1 ROM2_1 I
neighbor 1 r20 o 1 ROM2_0 oL
neighbor 1 r20 o2 1 ROM2_0 oL2
neighbor 1 r21 o 1 ROM2_1 oH
neighbor 1 r21 o2 1 ROM2_1 oH2