``````

In [2]:

#! /usr/bin/python
import re
import numpy
import numbers

``````
``````

In [9]:

instruction, wire = gate[0]
if not any(x in instruction for x in ['OR', 'AND', 'LSHIFT', 'RSHIFT', 'NOT']):
instruct = [wire, [" ", "WIRE", instruction.split(' ')[0]]]
try:
instruct[1][2] = numpy.uint16(int(instruct[1][2]))
except ValueError:
print("create_gate: oops")
if isinstance( instruct[1][2], numpy.uint16 ):
instruct[1][1] = "SOURCE"
gates.append(instruct)
if any(x in instruction for x in ['OR', 'AND']):
instruct = [wire, instruction.split(' ')]
gates.append(instruct)
if any(x in instruction for x in ['LSHIFT', 'RSHIFT']):
instruct = [wire, instruction.split(' ')]
gates.append(instruct)
if any(x in instruction for x in ['NOT']):
instruct = [wire, [" ", instruction.split(' ')[0], instruction.split(' ')[1]]]
gates.append(instruct)

``````
``````

In [10]:

def create_wire( wire, value ):
wires[wire] = numpy.uint16(value)
print ("CREATING WIRE:  ", wire, " with value :", value)

``````
``````

In [11]:

def execute_gate ( gate ):
if (gate[1][1]) == 'AND':
create_wire(gate[0], numpy.uint16(wires[gate[1][0]]) & numpy.uint16(wires[gate[1][2]]))
if (gate[1][1]) == 'OR':
create_wire(gate[0], numpy.uint16(wires[gate[1][0]]) | numpy.uint16(wires[gate[1][2]]))
if (gate[1][1]) == 'LSHIFT':
create_wire(gate[0], numpy.uint16(wires[gate[1][0]]) << int(gate[1][2]))
if (gate[1][1]) == 'RSHIFT':
create_wire(gate[0], numpy.uint16(wires[gate[1][0]]) >> int(gate[1][2]))
if (gate[1][1]) == 'NOT':
create_wire(gate[0], ~numpy.uint16(wires[gate[1][2]]))
if (gate[1][1]) == 'WIRE':
create_wire(gate[0], numpy.uint16(wires[gate[1][2]]))

``````
``````

In [12]:

def find_candidate( gates ):
for gate in gates:
if ((gate[1][1]) == 'AND'):
if (gate[1][0] in wires) and (gate[1][2] in wires):
exec_gate = gate
gates.remove(exec_gate)
break
if (gate[1][1]) == 'OR':
if (gate[1][0] in wires) and (gate[1][2] in wires):
exec_gate = gate
gates.remove(exec_gate)
break
if (gate[1][1]) == 'LSHIFT':
if (gate[1][0] in wires):
exec_gate = gate
gates.remove(exec_gate)
break
if (gate[1][1]) == 'RSHIFT':
if (gate[1][0] in wires):
exec_gate = gate
gates.remove(exec_gate)
break
if (gate[1][1]) == 'NOT':
if (gate[1][2] in wires):
exec_gate = gate
gates.remove(exec_gate)
break
if (gate[1][1]) == 'WIRE':
if (gate[1][2] in wires):
exec_gate = gate
gates.remove(exec_gate)
break
return exec_gate

``````
``````

In [13]:

match_gate = re.compile('(^[a-zA-Z0-9 ]*) -> ([a-z]*)')

#filename = './input' #first star
filename = './input2' #second star
wires = {}
gates = []

with open(filename) as f:
for linen in f:
line = linen.rstrip('\n')
if not (match_gate.findall(line) == []):

#    SETUP ALL SOURCES
create_wire('1', 1)
delgates = []
for gate in gates:
if gate[1][1] == "SOURCE":
create_wire(gate[0][0], gate[1][2])
delgates.append(gate)

for gate in delgates:
gates.remove(gate)

print ("-----------")

#    FIND GATES WITH COMPLETE SOURCES AND EXECUTE
while not (gates == []):
print ("---\n# GATES LEFT:   ", len(gates))
candidate = find_candidate( gates )
print ("EXECUTING GATE: ", candidate[1][0], candidate[1][1], candidate[1][2], " -> ", candidate[0])
execute_gate ( candidate )

``````
``````

create_gate: oops
CREATING WIRE:   1  with value : 1
CREATING WIRE:   b  with value : 16076
CREATING WIRE:   c  with value : 0
-----------
---
# GATES LEFT:    337
EXECUTING GATE:  c LSHIFT 1  ->  t
CREATING WIRE:   t  with value : 0
---
# GATES LEFT:    336
EXECUTING GATE:  b RSHIFT 1  ->  v
CREATING WIRE:   v  with value : 8038
---
# GATES LEFT:    335
EXECUTING GATE:  b RSHIFT 5  ->  f
CREATING WIRE:   f  with value : 502
---
# GATES LEFT:    334
EXECUTING GATE:  b RSHIFT 2  ->  d
CREATING WIRE:   d  with value : 4019
---
# GATES LEFT:    333
EXECUTING GATE:  b RSHIFT 3  ->  e
CREATING WIRE:   e  with value : 2009
---
# GATES LEFT:    332
EXECUTING GATE:  e OR f  ->  g
CREATING WIRE:   g  with value : 2047
---
# GATES LEFT:    331
EXECUTING GATE:  e AND f  ->  h
CREATING WIRE:   h  with value : 464
---
# GATES LEFT:    330
EXECUTING GATE:    NOT h  ->  i
CREATING WIRE:   i  with value : 65071
---
# GATES LEFT:    329
EXECUTING GATE:  g AND i  ->  j
CREATING WIRE:   j  with value : 1583
---
# GATES LEFT:    328
EXECUTING GATE:  d OR j  ->  k
CREATING WIRE:   k  with value : 4031
---
# GATES LEFT:    327
EXECUTING GATE:  d AND j  ->  l
CREATING WIRE:   l  with value : 1571
---
# GATES LEFT:    326
EXECUTING GATE:    NOT l  ->  m
CREATING WIRE:   m  with value : 63964
---
# GATES LEFT:    325
EXECUTING GATE:  k AND m  ->  n
CREATING WIRE:   n  with value : 2460
---
# GATES LEFT:    324
EXECUTING GATE:  b OR n  ->  o
CREATING WIRE:   o  with value : 16348
---
# GATES LEFT:    323
EXECUTING GATE:  b AND n  ->  p
CREATING WIRE:   p  with value : 2188
---
# GATES LEFT:    322
EXECUTING GATE:    NOT p  ->  q
CREATING WIRE:   q  with value : 63347
---
# GATES LEFT:    321
EXECUTING GATE:  o AND q  ->  r
CREATING WIRE:   r  with value : 14160
---
# GATES LEFT:    320
EXECUTING GATE:  1 AND r  ->  s
CREATING WIRE:   s  with value : 0
---
# GATES LEFT:    319
EXECUTING GATE:  t OR s  ->  u
CREATING WIRE:   u  with value : 0
---
# GATES LEFT:    318
EXECUTING GATE:  u LSHIFT 1  ->  ao
CREATING WIRE:   ao  with value : 0
---
# GATES LEFT:    317
EXECUTING GATE:  s LSHIFT 15  ->  w
CREATING WIRE:   w  with value : 0
---
# GATES LEFT:    316
EXECUTING GATE:  v OR w  ->  x
CREATING WIRE:   x  with value : 8038
---
# GATES LEFT:    315
EXECUTING GATE:  x RSHIFT 1  ->  aq
CREATING WIRE:   aq  with value : 4019
---
# GATES LEFT:    314
EXECUTING GATE:  x RSHIFT 5  ->  aa
CREATING WIRE:   aa  with value : 251
---
# GATES LEFT:    313
EXECUTING GATE:  x RSHIFT 2  ->  y
CREATING WIRE:   y  with value : 2009
---
# GATES LEFT:    312
EXECUTING GATE:  x RSHIFT 3  ->  z
CREATING WIRE:   z  with value : 1004
---
# GATES LEFT:    311
EXECUTING GATE:  z OR aa  ->  ab
CREATING WIRE:   ab  with value : 1023
---
# GATES LEFT:    310
EXECUTING GATE:  z AND aa  ->  ac
CREATING WIRE:   ac  with value : 232
---
# GATES LEFT:    309
EXECUTING GATE:    NOT ac  ->  ad
CREATING WIRE:   ad  with value : 65303
---
# GATES LEFT:    308
EXECUTING GATE:  ab AND ad  ->  ae
CREATING WIRE:   ae  with value : 791
---
# GATES LEFT:    307
EXECUTING GATE:  y AND ae  ->  ag
CREATING WIRE:   ag  with value : 785
---
# GATES LEFT:    306
EXECUTING GATE:    NOT ag  ->  ah
CREATING WIRE:   ah  with value : 64750
---
# GATES LEFT:    305
EXECUTING GATE:  y OR ae  ->  af
CREATING WIRE:   af  with value : 2015
---
# GATES LEFT:    304
EXECUTING GATE:  af AND ah  ->  ai
CREATING WIRE:   ai  with value : 1230
---
# GATES LEFT:    303
EXECUTING GATE:  x AND ai  ->  ak
CREATING WIRE:   ak  with value : 1094
---
# GATES LEFT:    302
EXECUTING GATE:  x OR ai  ->  aj
CREATING WIRE:   aj  with value : 8174
---
# GATES LEFT:    301
EXECUTING GATE:    NOT ak  ->  al
CREATING WIRE:   al  with value : 64441
---
# GATES LEFT:    300
EXECUTING GATE:  aj AND al  ->  am
CREATING WIRE:   am  with value : 7080
---
# GATES LEFT:    299
EXECUTING GATE:  1 AND am  ->  an
CREATING WIRE:   an  with value : 0
---
# GATES LEFT:    298
EXECUTING GATE:  ao OR an  ->  ap
CREATING WIRE:   ap  with value : 0
---
# GATES LEFT:    297
EXECUTING GATE:  ap LSHIFT 1  ->  bj
CREATING WIRE:   bj  with value : 0
---
# GATES LEFT:    296
EXECUTING GATE:  an LSHIFT 15  ->  ar
CREATING WIRE:   ar  with value : 0
---
# GATES LEFT:    295
EXECUTING GATE:  aq OR ar  ->  as
CREATING WIRE:   as  with value : 4019
---
# GATES LEFT:    294
EXECUTING GATE:  as RSHIFT 1  ->  bl
CREATING WIRE:   bl  with value : 2009
---
# GATES LEFT:    293
EXECUTING GATE:  as RSHIFT 5  ->  av
CREATING WIRE:   av  with value : 125
---
# GATES LEFT:    292
EXECUTING GATE:  as RSHIFT 2  ->  at
CREATING WIRE:   at  with value : 1004
---
# GATES LEFT:    291
EXECUTING GATE:  as RSHIFT 3  ->  au
CREATING WIRE:   au  with value : 502
---
# GATES LEFT:    290
EXECUTING GATE:  au AND av  ->  ax
CREATING WIRE:   ax  with value : 116
---
# GATES LEFT:    289
EXECUTING GATE:    NOT ax  ->  ay
CREATING WIRE:   ay  with value : 65419
---
# GATES LEFT:    288
EXECUTING GATE:  au OR av  ->  aw
CREATING WIRE:   aw  with value : 511
---
# GATES LEFT:    287
EXECUTING GATE:  aw AND ay  ->  az
CREATING WIRE:   az  with value : 395
---
# GATES LEFT:    286
EXECUTING GATE:  at AND az  ->  bb
CREATING WIRE:   bb  with value : 392
---
# GATES LEFT:    285
EXECUTING GATE:  at OR az  ->  ba
CREATING WIRE:   ba  with value : 1007
---
# GATES LEFT:    284
EXECUTING GATE:    NOT bb  ->  bc
CREATING WIRE:   bc  with value : 65143
---
# GATES LEFT:    283
EXECUTING GATE:  ba AND bc  ->  bd
CREATING WIRE:   bd  with value : 615
---
# GATES LEFT:    282
EXECUTING GATE:  as OR bd  ->  be
CREATING WIRE:   be  with value : 4087
---
# GATES LEFT:    281
EXECUTING GATE:  as AND bd  ->  bf
CREATING WIRE:   bf  with value : 547
---
# GATES LEFT:    280
EXECUTING GATE:    NOT bf  ->  bg
CREATING WIRE:   bg  with value : 64988
---
# GATES LEFT:    279
EXECUTING GATE:  be AND bg  ->  bh
CREATING WIRE:   bh  with value : 3540
---
# GATES LEFT:    278
EXECUTING GATE:  1 AND bh  ->  bi
CREATING WIRE:   bi  with value : 0
---
# GATES LEFT:    277
EXECUTING GATE:  bi LSHIFT 15  ->  bm
CREATING WIRE:   bm  with value : 0
---
# GATES LEFT:    276
EXECUTING GATE:  bl OR bm  ->  bn
CREATING WIRE:   bn  with value : 2009
---
# GATES LEFT:    275
EXECUTING GATE:  bn RSHIFT 3  ->  bp
CREATING WIRE:   bp  with value : 251
---
# GATES LEFT:    274
EXECUTING GATE:  bn RSHIFT 1  ->  cg
CREATING WIRE:   cg  with value : 1004
---
# GATES LEFT:    273
EXECUTING GATE:  bn RSHIFT 2  ->  bo
CREATING WIRE:   bo  with value : 502
---
# GATES LEFT:    272
EXECUTING GATE:  bj OR bi  ->  bk
CREATING WIRE:   bk  with value : 0
---
# GATES LEFT:    271
EXECUTING GATE:  bk LSHIFT 1  ->  ce
CREATING WIRE:   ce  with value : 0
---
# GATES LEFT:    270
EXECUTING GATE:  bn RSHIFT 5  ->  bq
CREATING WIRE:   bq  with value : 62
---
# GATES LEFT:    269
EXECUTING GATE:  bp OR bq  ->  br
CREATING WIRE:   br  with value : 255
---
# GATES LEFT:    268
EXECUTING GATE:  bp AND bq  ->  bs
CREATING WIRE:   bs  with value : 58
---
# GATES LEFT:    267
EXECUTING GATE:    NOT bs  ->  bt
CREATING WIRE:   bt  with value : 65477
---
# GATES LEFT:    266
EXECUTING GATE:  br AND bt  ->  bu
CREATING WIRE:   bu  with value : 197
---
# GATES LEFT:    265
EXECUTING GATE:  bo OR bu  ->  bv
CREATING WIRE:   bv  with value : 503
---
# GATES LEFT:    264
EXECUTING GATE:  bo AND bu  ->  bw
CREATING WIRE:   bw  with value : 196
---
# GATES LEFT:    263
EXECUTING GATE:    NOT bw  ->  bx
CREATING WIRE:   bx  with value : 65339
---
# GATES LEFT:    262
EXECUTING GATE:  bv AND bx  ->  by
CREATING WIRE:   by  with value : 307
---
# GATES LEFT:    261
EXECUTING GATE:  bn AND by  ->  ca
CREATING WIRE:   ca  with value : 273
---
# GATES LEFT:    260
EXECUTING GATE:    NOT ca  ->  cb
CREATING WIRE:   cb  with value : 65262
---
# GATES LEFT:    259
EXECUTING GATE:  bn OR by  ->  bz
CREATING WIRE:   bz  with value : 2043
---
# GATES LEFT:    258
EXECUTING GATE:  bz AND cb  ->  cc
CREATING WIRE:   cc  with value : 1770
---
# GATES LEFT:    257
EXECUTING GATE:  1 AND cc  ->  cd
CREATING WIRE:   cd  with value : 0
---
# GATES LEFT:    256
EXECUTING GATE:  ce OR cd  ->  cf
CREATING WIRE:   cf  with value : 0
---
# GATES LEFT:    255
EXECUTING GATE:  cd LSHIFT 15  ->  ch
CREATING WIRE:   ch  with value : 0
---
# GATES LEFT:    254
EXECUTING GATE:  cg OR ch  ->  ci
CREATING WIRE:   ci  with value : 1004
---
# GATES LEFT:    253
EXECUTING GATE:  ci RSHIFT 3  ->  ck
CREATING WIRE:   ck  with value : 125
---
# GATES LEFT:    252
EXECUTING GATE:  ci RSHIFT 1  ->  db
CREATING WIRE:   db  with value : 502
---
# GATES LEFT:    251
EXECUTING GATE:  cf LSHIFT 1  ->  cz
CREATING WIRE:   cz  with value : 0
---
# GATES LEFT:    250
EXECUTING GATE:  ci RSHIFT 5  ->  cl
CREATING WIRE:   cl  with value : 31
---
# GATES LEFT:    249
EXECUTING GATE:  ck AND cl  ->  cn
CREATING WIRE:   cn  with value : 29
---
# GATES LEFT:    248
EXECUTING GATE:    NOT cn  ->  co
CREATING WIRE:   co  with value : 65506
---
# GATES LEFT:    247
EXECUTING GATE:  ck OR cl  ->  cm
CREATING WIRE:   cm  with value : 127
---
# GATES LEFT:    246
EXECUTING GATE:  cm AND co  ->  cp
CREATING WIRE:   cp  with value : 98
---
# GATES LEFT:    245
EXECUTING GATE:  ci RSHIFT 2  ->  cj
CREATING WIRE:   cj  with value : 251
---
# GATES LEFT:    244
EXECUTING GATE:  cj AND cp  ->  cr
CREATING WIRE:   cr  with value : 98
---
# GATES LEFT:    243
EXECUTING GATE:  cj OR cp  ->  cq
CREATING WIRE:   cq  with value : 251
---
# GATES LEFT:    242
EXECUTING GATE:    NOT cr  ->  cs
CREATING WIRE:   cs  with value : 65437
---
# GATES LEFT:    241
EXECUTING GATE:  cq AND cs  ->  ct
CREATING WIRE:   ct  with value : 153
---
# GATES LEFT:    240
EXECUTING GATE:  ci AND ct  ->  cv
CREATING WIRE:   cv  with value : 136
---
# GATES LEFT:    239
EXECUTING GATE:    NOT cv  ->  cw
CREATING WIRE:   cw  with value : 65399
---
# GATES LEFT:    238
EXECUTING GATE:  ci OR ct  ->  cu
CREATING WIRE:   cu  with value : 1021
---
# GATES LEFT:    237
EXECUTING GATE:  cu AND cw  ->  cx
CREATING WIRE:   cx  with value : 885
---
# GATES LEFT:    236
EXECUTING GATE:  1 AND cx  ->  cy
CREATING WIRE:   cy  with value : 1
---
# GATES LEFT:    235
EXECUTING GATE:  cy LSHIFT 15  ->  dc
CREATING WIRE:   dc  with value : 32768
---
# GATES LEFT:    234
EXECUTING GATE:  db OR dc  ->  dd
CREATING WIRE:   dd  with value : 33270
---
# GATES LEFT:    233
EXECUTING GATE:  dd RSHIFT 3  ->  df
CREATING WIRE:   df  with value : 4158
---
# GATES LEFT:    232
EXECUTING GATE:  dd RSHIFT 2  ->  de
CREATING WIRE:   de  with value : 8317
---
# GATES LEFT:    231
EXECUTING GATE:  dd RSHIFT 1  ->  dw
CREATING WIRE:   dw  with value : 16635
---
# GATES LEFT:    230
EXECUTING GATE:  cz OR cy  ->  da
CREATING WIRE:   da  with value : 1
---
# GATES LEFT:    229
EXECUTING GATE:  da LSHIFT 1  ->  du
CREATING WIRE:   du  with value : 2
---
# GATES LEFT:    228
EXECUTING GATE:  dd RSHIFT 5  ->  dg
CREATING WIRE:   dg  with value : 1039
---
# GATES LEFT:    227
EXECUTING GATE:  df AND dg  ->  di
CREATING WIRE:   di  with value : 14
---
# GATES LEFT:    226
EXECUTING GATE:    NOT di  ->  dj
CREATING WIRE:   dj  with value : 65521
---
# GATES LEFT:    225
EXECUTING GATE:  df OR dg  ->  dh
CREATING WIRE:   dh  with value : 5183
---
# GATES LEFT:    224
EXECUTING GATE:  dh AND dj  ->  dk
CREATING WIRE:   dk  with value : 5169
---
# GATES LEFT:    223
EXECUTING GATE:  de OR dk  ->  dl
CREATING WIRE:   dl  with value : 13437
---
# GATES LEFT:    222
EXECUTING GATE:  de AND dk  ->  dm
CREATING WIRE:   dm  with value : 49
---
# GATES LEFT:    221
EXECUTING GATE:    NOT dm  ->  dn
CREATING WIRE:   dn  with value : 65486
---
# GATES LEFT:    220
EXECUTING GATE:  dl AND dn  ->  do
CREATING WIRE:   do  with value : 13388
---
# GATES LEFT:    219
EXECUTING GATE:  dd OR do  ->  dp
CREATING WIRE:   dp  with value : 46590
---
# GATES LEFT:    218
EXECUTING GATE:  dd AND do  ->  dq
CREATING WIRE:   dq  with value : 68
---
# GATES LEFT:    217
EXECUTING GATE:    NOT dq  ->  dr
CREATING WIRE:   dr  with value : 65467
---
# GATES LEFT:    216
EXECUTING GATE:  dp AND dr  ->  ds
CREATING WIRE:   ds  with value : 46522
---
# GATES LEFT:    215
EXECUTING GATE:  1 AND ds  ->  dt
CREATING WIRE:   dt  with value : 0
---
# GATES LEFT:    214
EXECUTING GATE:  dt LSHIFT 15  ->  dx
CREATING WIRE:   dx  with value : 0
---
# GATES LEFT:    213
EXECUTING GATE:  dw OR dx  ->  dy
CREATING WIRE:   dy  with value : 16635
---
# GATES LEFT:    212
EXECUTING GATE:  dy RSHIFT 1  ->  er
CREATING WIRE:   er  with value : 8317
---
# GATES LEFT:    211
EXECUTING GATE:  dy RSHIFT 2  ->  dz
CREATING WIRE:   dz  with value : 4158
---
# GATES LEFT:    210
EXECUTING GATE:  dy RSHIFT 5  ->  eb
CREATING WIRE:   eb  with value : 519
---
# GATES LEFT:    209
EXECUTING GATE:  dy RSHIFT 3  ->  ea
CREATING WIRE:   ea  with value : 2079
---
# GATES LEFT:    208
EXECUTING GATE:  ea AND eb  ->  ed
CREATING WIRE:   ed  with value : 7
---
# GATES LEFT:    207
EXECUTING GATE:  ea OR eb  ->  ec
CREATING WIRE:   ec  with value : 2591
---
# GATES LEFT:    206
EXECUTING GATE:    NOT ed  ->  ee
CREATING WIRE:   ee  with value : 65528
---
# GATES LEFT:    205
EXECUTING GATE:  ec AND ee  ->  ef
CREATING WIRE:   ef  with value : 2584
---
# GATES LEFT:    204
EXECUTING GATE:  dz OR ef  ->  eg
CREATING WIRE:   eg  with value : 6718
---
# GATES LEFT:    203
EXECUTING GATE:  dz AND ef  ->  eh
CREATING WIRE:   eh  with value : 24
---
# GATES LEFT:    202
EXECUTING GATE:    NOT eh  ->  ei
CREATING WIRE:   ei  with value : 65511
---
# GATES LEFT:    201
EXECUTING GATE:  eg AND ei  ->  ej
CREATING WIRE:   ej  with value : 6694
---
# GATES LEFT:    200
EXECUTING GATE:  dy OR ej  ->  ek
CREATING WIRE:   ek  with value : 23295
---
# GATES LEFT:    199
EXECUTING GATE:  dy AND ej  ->  el
CREATING WIRE:   el  with value : 34
---
# GATES LEFT:    198
EXECUTING GATE:    NOT el  ->  em
CREATING WIRE:   em  with value : 65501
---
# GATES LEFT:    197
EXECUTING GATE:  ek AND em  ->  en
CREATING WIRE:   en  with value : 23261
---
# GATES LEFT:    196
EXECUTING GATE:  1 AND en  ->  eo
CREATING WIRE:   eo  with value : 1
---
# GATES LEFT:    195
EXECUTING GATE:  eo LSHIFT 15  ->  es
CREATING WIRE:   es  with value : 32768
---
# GATES LEFT:    194
EXECUTING GATE:  er OR es  ->  et
CREATING WIRE:   et  with value : 41085
---
# GATES LEFT:    193
EXECUTING GATE:  et RSHIFT 2  ->  eu
CREATING WIRE:   eu  with value : 10271
---
# GATES LEFT:    192
EXECUTING GATE:  et RSHIFT 1  ->  fm
CREATING WIRE:   fm  with value : 20542
---
# GATES LEFT:    191
EXECUTING GATE:  et RSHIFT 5  ->  ew
CREATING WIRE:   ew  with value : 1283
---
# GATES LEFT:    190
EXECUTING GATE:  et RSHIFT 3  ->  ev
CREATING WIRE:   ev  with value : 5135
---
# GATES LEFT:    189
EXECUTING GATE:  ev OR ew  ->  ex
CREATING WIRE:   ex  with value : 5391
---
# GATES LEFT:    188
EXECUTING GATE:  ev AND ew  ->  ey
CREATING WIRE:   ey  with value : 1027
---
# GATES LEFT:    187
EXECUTING GATE:    NOT ey  ->  ez
CREATING WIRE:   ez  with value : 64508
---
# GATES LEFT:    186
EXECUTING GATE:  ex AND ez  ->  fa
CREATING WIRE:   fa  with value : 4364
---
# GATES LEFT:    185
EXECUTING GATE:  eu AND fa  ->  fc
CREATING WIRE:   fc  with value : 12
---
# GATES LEFT:    184
EXECUTING GATE:  eu OR fa  ->  fb
CREATING WIRE:   fb  with value : 14623
---
# GATES LEFT:    183
EXECUTING GATE:    NOT fc  ->  fd
CREATING WIRE:   fd  with value : 65523
---
# GATES LEFT:    182
EXECUTING GATE:  fb AND fd  ->  fe
CREATING WIRE:   fe  with value : 14611
---
# GATES LEFT:    181
EXECUTING GATE:  et OR fe  ->  ff
CREATING WIRE:   ff  with value : 47487
---
# GATES LEFT:    180
EXECUTING GATE:  et AND fe  ->  fg
CREATING WIRE:   fg  with value : 8209
---
# GATES LEFT:    179
EXECUTING GATE:    NOT fg  ->  fh
CREATING WIRE:   fh  with value : 57326
---
# GATES LEFT:    178
EXECUTING GATE:  ff AND fh  ->  fi
CREATING WIRE:   fi  with value : 39278
---
# GATES LEFT:    177
EXECUTING GATE:  1 AND fi  ->  fj
CREATING WIRE:   fj  with value : 0
---
# GATES LEFT:    176
EXECUTING GATE:  fj LSHIFT 15  ->  fn
CREATING WIRE:   fn  with value : 0
---
# GATES LEFT:    175
EXECUTING GATE:  fm OR fn  ->  fo
CREATING WIRE:   fo  with value : 20542
---
# GATES LEFT:    174
EXECUTING GATE:  fo RSHIFT 2  ->  fp
CREATING WIRE:   fp  with value : 5135
---
# GATES LEFT:    173
EXECUTING GATE:  fo RSHIFT 3  ->  fq
CREATING WIRE:   fq  with value : 2567
---
# GATES LEFT:    172
EXECUTING GATE:  fo RSHIFT 1  ->  gh
CREATING WIRE:   gh  with value : 10271
---
# GATES LEFT:    171
EXECUTING GATE:  du OR dt  ->  dv
CREATING WIRE:   dv  with value : 2
---
# GATES LEFT:    170
EXECUTING GATE:  dv LSHIFT 1  ->  ep
CREATING WIRE:   ep  with value : 4
---
# GATES LEFT:    169
EXECUTING GATE:  ep OR eo  ->  eq
CREATING WIRE:   eq  with value : 5
---
# GATES LEFT:    168
EXECUTING GATE:  eq LSHIFT 1  ->  fk
CREATING WIRE:   fk  with value : 10
---
# GATES LEFT:    167
EXECUTING GATE:  fk OR fj  ->  fl
CREATING WIRE:   fl  with value : 10
---
# GATES LEFT:    166
EXECUTING GATE:  fl LSHIFT 1  ->  gf
CREATING WIRE:   gf  with value : 20
---
# GATES LEFT:    165
EXECUTING GATE:  fo RSHIFT 5  ->  fr
CREATING WIRE:   fr  with value : 641
---
# GATES LEFT:    164
EXECUTING GATE:  fq AND fr  ->  ft
CREATING WIRE:   ft  with value : 513
---
# GATES LEFT:    163
EXECUTING GATE:    NOT ft  ->  fu
CREATING WIRE:   fu  with value : 65022
---
# GATES LEFT:    162
EXECUTING GATE:  fq OR fr  ->  fs
CREATING WIRE:   fs  with value : 2695
---
# GATES LEFT:    161
EXECUTING GATE:  fs AND fu  ->  fv
CREATING WIRE:   fv  with value : 2182
---
# GATES LEFT:    160
EXECUTING GATE:  fp AND fv  ->  fx
CREATING WIRE:   fx  with value : 6
---
# GATES LEFT:    159
EXECUTING GATE:    NOT fx  ->  fy
CREATING WIRE:   fy  with value : 65529
---
# GATES LEFT:    158
EXECUTING GATE:  fp OR fv  ->  fw
CREATING WIRE:   fw  with value : 7311
---
# GATES LEFT:    157
EXECUTING GATE:  fw AND fy  ->  fz
CREATING WIRE:   fz  with value : 7305
---
# GATES LEFT:    156
EXECUTING GATE:  fo OR fz  ->  ga
CREATING WIRE:   ga  with value : 23743
---
# GATES LEFT:    155
EXECUTING GATE:  fo AND fz  ->  gb
CREATING WIRE:   gb  with value : 4104
---
# GATES LEFT:    154
EXECUTING GATE:    NOT gb  ->  gc
CREATING WIRE:   gc  with value : 61431
---
# GATES LEFT:    153
EXECUTING GATE:  ga AND gc  ->  gd
CREATING WIRE:   gd  with value : 19639
---
# GATES LEFT:    152
EXECUTING GATE:  1 AND gd  ->  ge
CREATING WIRE:   ge  with value : 1
---
# GATES LEFT:    151
EXECUTING GATE:  gf OR ge  ->  gg
CREATING WIRE:   gg  with value : 21
---
# GATES LEFT:    150
EXECUTING GATE:  ge LSHIFT 15  ->  gi
CREATING WIRE:   gi  with value : 32768
---
# GATES LEFT:    149
EXECUTING GATE:  gg LSHIFT 1  ->  ha
CREATING WIRE:   ha  with value : 42
---
# GATES LEFT:    148
EXECUTING GATE:  gh OR gi  ->  gj
CREATING WIRE:   gj  with value : 43039
---
# GATES LEFT:    147
EXECUTING GATE:  gj RSHIFT 1  ->  hc
CREATING WIRE:   hc  with value : 21519
---
# GATES LEFT:    146
EXECUTING GATE:  gj RSHIFT 5  ->  gm
CREATING WIRE:   gm  with value : 1344
---
# GATES LEFT:    145
EXECUTING GATE:  gj RSHIFT 2  ->  gk
CREATING WIRE:   gk  with value : 10759
---
# GATES LEFT:    144
EXECUTING GATE:  gj RSHIFT 3  ->  gl
CREATING WIRE:   gl  with value : 5379
---
# GATES LEFT:    143
EXECUTING GATE:  gl OR gm  ->  gn
CREATING WIRE:   gn  with value : 5443
---
# GATES LEFT:    142
EXECUTING GATE:  gl AND gm  ->  go
CREATING WIRE:   go  with value : 1280
---
# GATES LEFT:    141
EXECUTING GATE:    NOT go  ->  gp
CREATING WIRE:   gp  with value : 64255
---
# GATES LEFT:    140
EXECUTING GATE:  gn AND gp  ->  gq
CREATING WIRE:   gq  with value : 4163
---
# GATES LEFT:    139
EXECUTING GATE:  gk OR gq  ->  gr
CREATING WIRE:   gr  with value : 14919
---
# GATES LEFT:    138
EXECUTING GATE:  gk AND gq  ->  gs
CREATING WIRE:   gs  with value : 3
---
# GATES LEFT:    137
EXECUTING GATE:    NOT gs  ->  gt
CREATING WIRE:   gt  with value : 65532
---
# GATES LEFT:    136
EXECUTING GATE:  gr AND gt  ->  gu
CREATING WIRE:   gu  with value : 14916
---
# GATES LEFT:    135
EXECUTING GATE:  gj AND gu  ->  gw
CREATING WIRE:   gw  with value : 10244
---
# GATES LEFT:    134
EXECUTING GATE:    NOT gw  ->  gx
CREATING WIRE:   gx  with value : 55291
---
# GATES LEFT:    133
EXECUTING GATE:  gj OR gu  ->  gv
CREATING WIRE:   gv  with value : 47711
---
# GATES LEFT:    132
EXECUTING GATE:  gv AND gx  ->  gy
CREATING WIRE:   gy  with value : 37467
---
# GATES LEFT:    131
EXECUTING GATE:  1 AND gy  ->  gz
CREATING WIRE:   gz  with value : 1
---
# GATES LEFT:    130
EXECUTING GATE:  gz LSHIFT 15  ->  hd
CREATING WIRE:   hd  with value : 32768
---
# GATES LEFT:    129
EXECUTING GATE:  ha OR gz  ->  hb
CREATING WIRE:   hb  with value : 43
---
# GATES LEFT:    128
EXECUTING GATE:  hc OR hd  ->  he
CREATING WIRE:   he  with value : 54287
---
# GATES LEFT:    127
EXECUTING GATE:  he RSHIFT 3  ->  hg
CREATING WIRE:   hg  with value : 6785
---
# GATES LEFT:    126
EXECUTING GATE:  he RSHIFT 2  ->  hf
CREATING WIRE:   hf  with value : 13571
---
# GATES LEFT:    125
EXECUTING GATE:  he RSHIFT 1  ->  hx
CREATING WIRE:   hx  with value : 27143
---
# GATES LEFT:    124
EXECUTING GATE:  hb LSHIFT 1  ->  hv
CREATING WIRE:   hv  with value : 86
---
# GATES LEFT:    123
EXECUTING GATE:  he RSHIFT 5  ->  hh
CREATING WIRE:   hh  with value : 1696
---
# GATES LEFT:    122
EXECUTING GATE:  hg OR hh  ->  hi
CREATING WIRE:   hi  with value : 7841
---
# GATES LEFT:    121
EXECUTING GATE:  hg AND hh  ->  hj
CREATING WIRE:   hj  with value : 640
---
# GATES LEFT:    120
EXECUTING GATE:    NOT hj  ->  hk
CREATING WIRE:   hk  with value : 64895
---
# GATES LEFT:    119
EXECUTING GATE:  hi AND hk  ->  hl
CREATING WIRE:   hl  with value : 7201
---
# GATES LEFT:    118
EXECUTING GATE:  hf OR hl  ->  hm
CREATING WIRE:   hm  with value : 15651
---
# GATES LEFT:    117
EXECUTING GATE:  hf AND hl  ->  hn
CREATING WIRE:   hn  with value : 5121
---
# GATES LEFT:    116
EXECUTING GATE:    NOT hn  ->  ho
CREATING WIRE:   ho  with value : 60414
---
# GATES LEFT:    115
EXECUTING GATE:  hm AND ho  ->  hp
CREATING WIRE:   hp  with value : 10530
---
# GATES LEFT:    114
EXECUTING GATE:  he OR hp  ->  hq
CREATING WIRE:   hq  with value : 64815
---
# GATES LEFT:    113
EXECUTING GATE:  he AND hp  ->  hr
CREATING WIRE:   hr  with value : 2
---
# GATES LEFT:    112
EXECUTING GATE:    NOT hr  ->  hs
CREATING WIRE:   hs  with value : 65533
---
# GATES LEFT:    111
EXECUTING GATE:  hq AND hs  ->  ht
CREATING WIRE:   ht  with value : 64813
---
# GATES LEFT:    110
EXECUTING GATE:  1 AND ht  ->  hu
CREATING WIRE:   hu  with value : 1
---
# GATES LEFT:    109
EXECUTING GATE:  hv OR hu  ->  hw
CREATING WIRE:   hw  with value : 87
---
# GATES LEFT:    108
EXECUTING GATE:  hu LSHIFT 15  ->  hy
CREATING WIRE:   hy  with value : 32768
---
# GATES LEFT:    107
EXECUTING GATE:  hw LSHIFT 1  ->  iq
CREATING WIRE:   iq  with value : 174
---
# GATES LEFT:    106
EXECUTING GATE:  hx OR hy  ->  hz
CREATING WIRE:   hz  with value : 59911
---
# GATES LEFT:    105
EXECUTING GATE:  hz RSHIFT 2  ->  ia
CREATING WIRE:   ia  with value : 14977
---
# GATES LEFT:    104
EXECUTING GATE:  hz RSHIFT 3  ->  ib
CREATING WIRE:   ib  with value : 7488
---
# GATES LEFT:    103
EXECUTING GATE:  hz RSHIFT 1  ->  is
CREATING WIRE:   is  with value : 29955
---
# GATES LEFT:    102
EXECUTING GATE:  hz RSHIFT 5  ->  ic
CREATING WIRE:   ic  with value : 1872
---
# GATES LEFT:    101
EXECUTING GATE:  ib OR ic  ->  id
CREATING WIRE:   id  with value : 8016
---
# GATES LEFT:    100
EXECUTING GATE:  ib AND ic  ->  ie
CREATING WIRE:   ie  with value : 1344
---
# GATES LEFT:    99
EXECUTING GATE:    NOT ie  ->  if
CREATING WIRE:   if  with value : 64191
---
# GATES LEFT:    98
EXECUTING GATE:  id AND if  ->  ig
CREATING WIRE:   ig  with value : 6672
---
# GATES LEFT:    97
EXECUTING GATE:  ia AND ig  ->  ii
CREATING WIRE:   ii  with value : 6656
---
# GATES LEFT:    96
EXECUTING GATE:    NOT ii  ->  ij
CREATING WIRE:   ij  with value : 58879
---
# GATES LEFT:    95
EXECUTING GATE:  ia OR ig  ->  ih
CREATING WIRE:   ih  with value : 14993
---
# GATES LEFT:    94
EXECUTING GATE:  ih AND ij  ->  ik
CREATING WIRE:   ik  with value : 8337
---
# GATES LEFT:    93
EXECUTING GATE:  hz OR ik  ->  il
CREATING WIRE:   il  with value : 60055
---
# GATES LEFT:    92
EXECUTING GATE:  hz AND ik  ->  im
CREATING WIRE:   im  with value : 8193
---
# GATES LEFT:    91
EXECUTING GATE:    NOT im  ->  in
CREATING WIRE:   in  with value : 57342
---
# GATES LEFT:    90
EXECUTING GATE:  il AND in  ->  io
CREATING WIRE:   io  with value : 51862
---
# GATES LEFT:    89
EXECUTING GATE:  1 AND io  ->  ip
CREATING WIRE:   ip  with value : 0
---
# GATES LEFT:    88
EXECUTING GATE:  ip LSHIFT 15  ->  it
CREATING WIRE:   it  with value : 0
---
# GATES LEFT:    87
EXECUTING GATE:  is OR it  ->  iu
CREATING WIRE:   iu  with value : 29955
---
# GATES LEFT:    86
EXECUTING GATE:  iu RSHIFT 1  ->  jn
CREATING WIRE:   jn  with value : 14977
---
# GATES LEFT:    85
EXECUTING GATE:  iu RSHIFT 3  ->  iw
CREATING WIRE:   iw  with value : 3744
---
# GATES LEFT:    84
EXECUTING GATE:  iu RSHIFT 2  ->  iv
CREATING WIRE:   iv  with value : 7488
---
# GATES LEFT:    83
EXECUTING GATE:  iu RSHIFT 5  ->  ix
CREATING WIRE:   ix  with value : 936
---
# GATES LEFT:    82
EXECUTING GATE:  iw OR ix  ->  iy
CREATING WIRE:   iy  with value : 4008
---
# GATES LEFT:    81
EXECUTING GATE:  iw AND ix  ->  iz
CREATING WIRE:   iz  with value : 672
---
# GATES LEFT:    80
EXECUTING GATE:    NOT iz  ->  ja
CREATING WIRE:   ja  with value : 64863
---
# GATES LEFT:    79
EXECUTING GATE:  iy AND ja  ->  jb
CREATING WIRE:   jb  with value : 3336
---
# GATES LEFT:    78
EXECUTING GATE:  iv OR jb  ->  jc
CREATING WIRE:   jc  with value : 7496
---
# GATES LEFT:    77
EXECUTING GATE:  iv AND jb  ->  jd
CREATING WIRE:   jd  with value : 3328
---
# GATES LEFT:    76
EXECUTING GATE:    NOT jd  ->  je
CREATING WIRE:   je  with value : 62207
---
# GATES LEFT:    75
EXECUTING GATE:  jc AND je  ->  jf
CREATING WIRE:   jf  with value : 4168
---
# GATES LEFT:    74
EXECUTING GATE:  iu AND jf  ->  jh
CREATING WIRE:   jh  with value : 4096
---
# GATES LEFT:    73
EXECUTING GATE:    NOT jh  ->  ji
CREATING WIRE:   ji  with value : 61439
---
# GATES LEFT:    72
EXECUTING GATE:  iu OR jf  ->  jg
CREATING WIRE:   jg  with value : 30027
---
# GATES LEFT:    71
EXECUTING GATE:  jg AND ji  ->  jj
CREATING WIRE:   jj  with value : 25931
---
# GATES LEFT:    70
EXECUTING GATE:  1 AND jj  ->  jk
CREATING WIRE:   jk  with value : 1
---
# GATES LEFT:    69
EXECUTING GATE:  jk LSHIFT 15  ->  jo
CREATING WIRE:   jo  with value : 32768
---
# GATES LEFT:    68
EXECUTING GATE:  jn OR jo  ->  jp
CREATING WIRE:   jp  with value : 47745
---
# GATES LEFT:    67
EXECUTING GATE:  jp RSHIFT 2  ->  jq
CREATING WIRE:   jq  with value : 11936
---
# GATES LEFT:    66
EXECUTING GATE:  jp RSHIFT 5  ->  js
CREATING WIRE:   js  with value : 1492
---
# GATES LEFT:    65
EXECUTING GATE:  jp RSHIFT 1  ->  ki
CREATING WIRE:   ki  with value : 23872
---
# GATES LEFT:    64
EXECUTING GATE:  jp RSHIFT 3  ->  jr
CREATING WIRE:   jr  with value : 5968
---
# GATES LEFT:    63
EXECUTING GATE:  jr AND js  ->  ju
CREATING WIRE:   ju  with value : 1360
---
# GATES LEFT:    62
EXECUTING GATE:    NOT ju  ->  jv
CREATING WIRE:   jv  with value : 64175
---
# GATES LEFT:    61
EXECUTING GATE:  iq OR ip  ->  ir
CREATING WIRE:   ir  with value : 174
---
# GATES LEFT:    60
EXECUTING GATE:  ir LSHIFT 1  ->  jl
CREATING WIRE:   jl  with value : 348
---
# GATES LEFT:    59
EXECUTING GATE:  jl OR jk  ->  jm
CREATING WIRE:   jm  with value : 349
---
# GATES LEFT:    58
EXECUTING GATE:  jm LSHIFT 1  ->  kg
CREATING WIRE:   kg  with value : 698
---
# GATES LEFT:    57
EXECUTING GATE:  jr OR js  ->  jt
CREATING WIRE:   jt  with value : 6100
---
# GATES LEFT:    56
EXECUTING GATE:  jt AND jv  ->  jw
CREATING WIRE:   jw  with value : 4740
---
# GATES LEFT:    55
EXECUTING GATE:  jq OR jw  ->  jx
CREATING WIRE:   jx  with value : 16036
---
# GATES LEFT:    54
EXECUTING GATE:  jq AND jw  ->  jy
CREATING WIRE:   jy  with value : 640
---
# GATES LEFT:    53
EXECUTING GATE:    NOT jy  ->  jz
CREATING WIRE:   jz  with value : 64895
---
# GATES LEFT:    52
EXECUTING GATE:  jx AND jz  ->  ka
CREATING WIRE:   ka  with value : 15396
---
# GATES LEFT:    51
EXECUTING GATE:  jp OR ka  ->  kb
CREATING WIRE:   kb  with value : 48805
---
# GATES LEFT:    50
EXECUTING GATE:  jp AND ka  ->  kc
CREATING WIRE:   kc  with value : 14336
---
# GATES LEFT:    49
EXECUTING GATE:    NOT kc  ->  kd
CREATING WIRE:   kd  with value : 51199
---
# GATES LEFT:    48
EXECUTING GATE:  kb AND kd  ->  ke
CREATING WIRE:   ke  with value : 34469
---
# GATES LEFT:    47
EXECUTING GATE:  1 AND ke  ->  kf
CREATING WIRE:   kf  with value : 1
---
# GATES LEFT:    46
EXECUTING GATE:  kg OR kf  ->  kh
CREATING WIRE:   kh  with value : 699
---
# GATES LEFT:    45
EXECUTING GATE:  kh LSHIFT 1  ->  lb
CREATING WIRE:   lb  with value : 1398
---
# GATES LEFT:    44
EXECUTING GATE:  kf LSHIFT 15  ->  kj
CREATING WIRE:   kj  with value : 32768
---
# GATES LEFT:    43
EXECUTING GATE:  ki OR kj  ->  kk
CREATING WIRE:   kk  with value : 56640
---
# GATES LEFT:    42
EXECUTING GATE:  kk RSHIFT 2  ->  kl
CREATING WIRE:   kl  with value : 14160
---
# GATES LEFT:    41
EXECUTING GATE:  kk RSHIFT 3  ->  km
CREATING WIRE:   km  with value : 7080
---
# GATES LEFT:    40
EXECUTING GATE:  kk RSHIFT 5  ->  kn
CREATING WIRE:   kn  with value : 1770
---
# GATES LEFT:    39
EXECUTING GATE:  km AND kn  ->  kp
CREATING WIRE:   kp  with value : 680
---
# GATES LEFT:    38
EXECUTING GATE:    NOT kp  ->  kq
CREATING WIRE:   kq  with value : 64855
---
# GATES LEFT:    37
EXECUTING GATE:  km OR kn  ->  ko
CREATING WIRE:   ko  with value : 8170
---
# GATES LEFT:    36
EXECUTING GATE:  ko AND kq  ->  kr
CREATING WIRE:   kr  with value : 7490
---
# GATES LEFT:    35
EXECUTING GATE:  kl OR kr  ->  ks
CREATING WIRE:   ks  with value : 16210
---
# GATES LEFT:    34
EXECUTING GATE:  kl AND kr  ->  kt
CREATING WIRE:   kt  with value : 5440
---
# GATES LEFT:    33
EXECUTING GATE:    NOT kt  ->  ku
CREATING WIRE:   ku  with value : 60095
---
# GATES LEFT:    32
EXECUTING GATE:  ks AND ku  ->  kv
CREATING WIRE:   kv  with value : 10770
---
# GATES LEFT:    31
EXECUTING GATE:  kk AND kv  ->  kx
CREATING WIRE:   kx  with value : 2048
---
# GATES LEFT:    30
EXECUTING GATE:    NOT kx  ->  ky
CREATING WIRE:   ky  with value : 63487
---
# GATES LEFT:    29
EXECUTING GATE:  kk OR kv  ->  kw
CREATING WIRE:   kw  with value : 65362
---
# GATES LEFT:    28
EXECUTING GATE:  kw AND ky  ->  kz
CREATING WIRE:   kz  with value : 63314
---
# GATES LEFT:    27
EXECUTING GATE:  1 AND kz  ->  la
CREATING WIRE:   la  with value : 0
---
# GATES LEFT:    26
EXECUTING GATE:  lb OR la  ->  lc
CREATING WIRE:   lc  with value : 1398
---
# GATES LEFT:    25
EXECUTING GATE:  lc LSHIFT 1  ->  lw
CREATING WIRE:   lw  with value : 2796
---
# GATES LEFT:    24
EXECUTING GATE:  kk RSHIFT 1  ->  ld
CREATING WIRE:   ld  with value : 28320
---
# GATES LEFT:    23
EXECUTING GATE:  la LSHIFT 15  ->  le
CREATING WIRE:   le  with value : 0
---
# GATES LEFT:    22
EXECUTING GATE:  ld OR le  ->  lf
CREATING WIRE:   lf  with value : 28320
---
# GATES LEFT:    21
EXECUTING GATE:  lf RSHIFT 2  ->  lg
CREATING WIRE:   lg  with value : 7080
---
# GATES LEFT:    20
EXECUTING GATE:  lf RSHIFT 3  ->  lh
CREATING WIRE:   lh  with value : 3540
---
# GATES LEFT:    19
EXECUTING GATE:  lf RSHIFT 5  ->  li
CREATING WIRE:   li  with value : 885
---
# GATES LEFT:    18
EXECUTING GATE:  lh AND li  ->  lk
CREATING WIRE:   lk  with value : 340
---
# GATES LEFT:    17
EXECUTING GATE:    NOT lk  ->  ll
CREATING WIRE:   ll  with value : 65195
---
# GATES LEFT:    16
EXECUTING GATE:  lh OR li  ->  lj
CREATING WIRE:   lj  with value : 4085
---
# GATES LEFT:    15
EXECUTING GATE:  lj AND ll  ->  lm
CREATING WIRE:   lm  with value : 3745
---
# GATES LEFT:    14
EXECUTING GATE:  lg OR lm  ->  ln
CREATING WIRE:   ln  with value : 8105
---
# GATES LEFT:    13
EXECUTING GATE:  lg AND lm  ->  lo
CREATING WIRE:   lo  with value : 2720
---
# GATES LEFT:    12
EXECUTING GATE:    NOT lo  ->  lp
CREATING WIRE:   lp  with value : 62815
---
# GATES LEFT:    11
EXECUTING GATE:  ln AND lp  ->  lq
CREATING WIRE:   lq  with value : 5385
---
# GATES LEFT:    10
EXECUTING GATE:  lf AND lq  ->  ls
CREATING WIRE:   ls  with value : 1024
---
# GATES LEFT:    9
EXECUTING GATE:    NOT ls  ->  lt
CREATING WIRE:   lt  with value : 64511
---
# GATES LEFT:    8
EXECUTING GATE:  lf OR lq  ->  lr
CREATING WIRE:   lr  with value : 32681
---
# GATES LEFT:    7
EXECUTING GATE:  lf RSHIFT 1  ->  ly
CREATING WIRE:   ly  with value : 14160
---
# GATES LEFT:    6
EXECUTING GATE:  lr AND lt  ->  lu
CREATING WIRE:   lu  with value : 31657
---
# GATES LEFT:    5
EXECUTING GATE:  1 AND lu  ->  lv
CREATING WIRE:   lv  with value : 1
---
# GATES LEFT:    4
EXECUTING GATE:  lv LSHIFT 15  ->  lz
CREATING WIRE:   lz  with value : 32768
---
# GATES LEFT:    3
EXECUTING GATE:  ly OR lz  ->  ma
CREATING WIRE:   ma  with value : 46928
---
# GATES LEFT:    2
EXECUTING GATE:  lw OR lv  ->  lx
CREATING WIRE:   lx  with value : 2797
---
# GATES LEFT:    1
EXECUTING GATE:    WIRE lx  ->  a
CREATING WIRE:   a  with value : 2797

``````
``````

In [83]:

print ("a: ", wires['a'])

``````
``````

a:  2797

``````
``````

In [ ]:

``````