Exemplo n.º 1
0
 def definition(circuit):
     d = Or(2)(Not()(And(2)(circuit.a, circuit.b)), XOr(2)(circuit.b,
                                                           circuit.c))
     wire(d, circuit.d)
Exemplo n.º 2
0
 def definition(circuit):
     d = Or(2, width)(Invert(width)(And(2, width)(circuit.a,
                                                  circuit.b)),
                      XOr(2, width)(circuit.b, circuit.c))
     wire(d, circuit.d)
Exemplo n.º 3
0
 def definition(circuit):
     d = Or(3, width)(circuit.a,
                      Invert(width)(And(3, width)(circuit.a, circuit.b,
                                                  circuit.c)),
                      XOr(3, width)(circuit.b, circuit.c, circuit.a))
     wire(d, circuit.d)