summaryrefslogtreecommitdiff
path: root/examples/and8.qua
blob: ec4e5ad4844edfae646f0c3887ff3eee19a04217 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
x   y   speedX speedY color
## First pair
1   0   0      0      PU
1   -1  0      0      RE

2   9   0      0      PU
2   8   0      0      RE

# Delay second bit
2   17  0      0      CY
2   18  0      0      CY
2   19  0      0      CY
2   20  0      0      CY
2   21  0      0      CY
2   22  0      0      CY
2   23  0      0      CY
2   24  0      0      CY

# And, redirect output
1   25  0      0      !and.qua
1   30  0      0      GA
2   30  0      0      CY

## Second pair
6   1   0      0      PU
6   0   0      0      RE

7   10  0      0      PU
7   9   0      0      RE

# Delay second bit
7   17  0      0      CY
7   18  0      0      CY
7   19  0      0      CY
7   20  0      0      CY
7   21  0      0      CY
7   22  0      0      CY
7   23  0      0      CY
7   24  0      0      CY

# And, redirect output
6   25  0      0      !and.qua
6   31  0      0      GA
7   31  0      0      CY

## Third pair
11  2   0      0      PU
11  1   0      0      RE

12  11  0      0      PU
12  10  0      0      RE

# Delay second bit
12  17  0      0      CY
12  18  0      0      CY
12  19  0      0      CY
12  20  0      0      CY
12  21  0      0      CY
12  22  0      0      CY
12  23  0      0      CY
12  24  0      0      CY

# And, redirect output
11  25  0      0      !and.qua
11  32  0      0      GA
12  32  0      0      CY


## Fourth pair
16  3   0      0      PU
16  2   0      0      RE

17  12  0      0      PU
17  11  0      0      RE

# Delay second bit
17  17  0      0      CY
17  18  0      0      CY
17  19  0      0      CY
17  20  0      0      CY
17  21  0      0      CY
17  22  0      0      CY
17  23  0      0      CY
17  24  0      0      CY

# And, redirect output
16  25  0      0      !and.qua
16  33  0      0      GA
17  33  0      0      CY

## Fifth pair
21  4   0      0      PU
21  3   0      0      RE

22  13  0      0      PU
22  12  0      0      RE

# Delay second bit
22  17  0      0      CY
22  18  0      0      CY
22  19  0      0      CY
22  20  0      0      CY
22  21  0      0      CY
22  22  0      0      CY
22  23  0      0      CY
22  24  0      0      CY

# And, redirect output
21  25  0      0      !and.qua
21  34  0      0      GA
22  34  0      0      CY


## Sixth pair
26  5   0      0      PU
26  4   0      0      RE

27  14  0      0      PU
27  13  0      0      RE

# Delay second bit
27  17  0      0      CY
27  18  0      0      CY
27  19  0      0      CY
27  20  0      0      CY
27  21  0      0      CY
27  22  0      0      CY
27  23  0      0      CY
27  24  0      0      CY

# And, redirect output
26  25  0      0      !and.qua
26  35  0      0      GA
27  35  0      0      CY


## Seventh pair
31  6   0      0      PU
31  5   0      0      RE

32  15  0      0      PU
32  14  0      0      RE

# Delay second bit
32  17  0      0      CY
32  18  0      0      CY
32  19  0      0      CY
32  20  0      0      CY
32  21  0      0      CY
32  22  0      0      CY
32  23  0      0      CY
32  24  0      0      CY

# And, redirect output
31  25  0      0      !and.qua
31  36  0      0      GA
32  36  0      0      CY


## Eighth pair
36  7   0      0      PU
36  6   0      0      RE

37  16  0      0      PU
37  15  0      0      RE

# Delay second bit
37  17  0      0      CY
37  18  0      0      CY
37  19  0      0      CY
37  20  0      0      CY
37  21  0      0      CY
37  22  0      0      CY
37  23  0      0      CY
37  24  0      0      CY

# And, redirect output
36  25  0      0      !and.qua
36  37  0      0      GA
37  37  0      0      CY


# AND8
# Inputs:  0, 0
#          0, 1
#          0, 2
#          ...
#          0, 7
#          0, 9
#          0, 10
#          0, 11
#          ...
#          0, 16
# Outputs: 37, 30
#          37, 31
#          37, 32
#          ...
#          37, 37
# Time:    85