Logical gates

For discussion of other cellular automata.
unname66609
Posts: 87
Joined: December 20th, 2014, 8:30 am

Logical gates

AND gate:

Code: Select all

``````x = 36, y = 3, rule = Life2Wire#3
BEC4BECBMTDN\$14.VDNS18B\$4BECBECBMTDN!
``````
XOR gate:

Code: Select all

``````x = 34, y = 3, rule = Life2Wire#3
BEC4BECBM\$11.Q22B\$4BECBECBM!
``````
OR gate:

Code: Select all

``````x = 34, y = 3, rule = Life2Wire#3
BEC4BECBM\$11.U22B\$4BECBECBM!
``````

unname66609
Posts: 87
Joined: December 20th, 2014, 8:30 am

Re: Logical gates

a OR gate variant:

Code: Select all

``````x = 27, y = 3, rule = Life2Wire#3
4BECBECBMQ\$12.15B\$BEC4BECBMQ!
``````

unname66609
Posts: 87
Joined: December 20th, 2014, 8:30 am

Re: Logical gates

david9091 wrote:Would be interesting to imagine what form it will be in conway's life. What do you plan the firing state to be?

Code: Select all

``````@RULE Life2Wire#3

@TABLE

n_states:30
neighborhood:Moore
symmetries:permute

var Aa={0,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}
var Ab={Aa}
var Ac={Aa}
var Ae={Aa}
var Af={Aa}
var Ag={Aa}
var Ah={Aa}
var Da={0,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}
var Db={Da}
var Dc={Da}
var Dd={Da}
var De={Da}
var Df={Da}
var Dg={Da}

var Ma={0,2,5,13,15,17,19,21,23,24,25,26,28}
var Mb={Ma}
var Mc={Ma}
var Md={Ma}
var Me={Ma}
var Mf={Ma}
var Mg={Ma}
var Na={0,3,4,14,16,18,20,22,23,24,25,26,29}
var Nb={Na}
var Nc={Na}
var Nd={Na}
var Ne={Na}
var Nf={Na}
var Ng={Na}
var \$a={0,1}
var \$b={0,1}
var \$c={0,1}
var \$d={0,1}
var \$e={0,1}
var \$f={0,1}
var \$g={0,1}
var on={16,18,20,22,29}
var off={15,17,19,21,28}
var s01={13,26,23}
var s02={s01}
var s11={14,24,25}
var s12={s11}

var sn0={0,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18,19,20,21,22,28,29}
var sn1={sn0}
var sn2={sn0}
var sn3={sn0}
var sn4={sn0}
var sn5={sn0}
var sn6={sn0}
var sn7={sn0}

var ma={0,23,26,15,16,17,20,21,29,13,2,3,4,5}
var mb={ma}
var mc={ma}
var md={ma}
var me={ma}
var mf={ma}
var mg={ma}
var na={0,24,25,18,19,22,28,14,2,3,4,5}
var nb={na}
var nc={na}
var nd={na}
var ne={na}
var nf={na}
var ng={na}
var H={14,24}
var T={13,26}

18,sn0,sn1,sn2,sn3,sn4,sn5,sn6,sn7,17
19,sn0,sn1,sn2,sn3,sn4,sn5,sn6,sn7,20
22,sn0,sn1,sn2,sn3,sn4,sn5,sn6,sn7,21
28,sn0,sn1,sn2,sn3,sn4,sn5,sn6,sn7,29

0,1,1,1,Da,Db,Dc,Dd,De,1
1,1,1,Aa,Da,Db,Dc,Dd,De,1

7,0,Da,Db,Dc,Dd,De,Df,Dg,6

24,T,ma,mb,mc,md,me,mf,mg,26
26,H,na,nb,nc,nd,ne,nf,ng,24

3,8,Ma,Mb,Mc,Md,Me,Mf,Mg,5
5,9,Na,Nb,Nc,Nd,Ne,Nf,Ng,3
0,9,\$a,\$b,\$c,\$d,\$e,\$f,\$g,1

3,5,Ma,Mb,Mc,Md,Me,Mf,Mg,5

5,3,Na,Nb,Nc,Nd,Ne,Nf,Ng,3

@COLORS
0 0 0 0
1 160 255 160
2 128 64 0
3 192 160 128
4 255 255 255
5 96 32 0
6 0 96 0
8 0 96 0
7 128 176 128
9 128 176 128
10 128 128 128
11 64 64 64
12 64 64 64
13 0 0 128
14 0 0 255
15 0 128 192
16 128 192 224
17 128 0 192
18 192 128 224
19 160 0 0
20 255 32 32
21 0 128 0
22 96 224 64
23 0 96 96
24 0 128 128
25 0 224 224
26 0 64 64
27 128 192 192
28 255 128 0
29 255 192 0

``````

unname66609
Posts: 87
Joined: December 20th, 2014, 8:30 am

Re: Logical gates

david9091 wrote:Would be interesting to imagine what form it will be in conway's life. What do you plan the firing state to be?

Code: Select all

``````state 0:
name = "empty";
char = " ";
state 1:
name = "alive";
char = "@";
state 2:
name = "wire";
char = ".";
state 3:
char = "h";
state 4:
name = "spark";
char = "*";
state 5:
name = "tail";
char = "t";
state 6:
name = "wireInput0";
char = "i";
state 7:
name = "wireInput1";
char = "I";
state 8:
name = "wireOutput0";
char = "o";
state 9:
name = "wireOutput1";
char = "O";
state 10:
char = "#";
state 11:
char = ":";
state 12:
char = ";";
state 13:
name = "diodeInput0";
char = "d";
state 14:
name = "diodeInput1";
char = "D";
state 15:
name = "toggleOutput0"
char = "g";
state 16:
name = "toggleOutput1"
char = "G";
state 17:
name = "diodeOutput0";
char = "e";
state 18:
name = "diodeOutput1";
char = "E";
state 19:
name = "invertorOutput0";
char = "j";
state 20:
name = "invertorOutput1";
char = "J";
state 21:
char = "q";
state 22:
char = "Q";
state 23:
name = "2ndWire";
char = "u";
state 24:
char = "V";
state 25:
name = "2ndSpark";
char = "U";
state 26:
name = "2ndWireTail";
char = "v";
state 27:
char = "?";
``````
Firing state:

Code: Select all

``````.. .....
.     .
. #    .
.    o.
.
.
.  o
. .
.
``````
Answer: firing state is state 8 or state 9.

unname66609
Posts: 87
Joined: December 20th, 2014, 8:30 am

Re: Logical gates

Because, input state is state 6 or state 7.