public override void resolveCircuito() { POO_PortasLogicas.And2 and1 = new POO_PortasLogicas.And2(); POO_PortasLogicas.And2 and2 = new POO_PortasLogicas.And2(); POO_PortasLogicas.And2 and3 = new POO_PortasLogicas.And2(); POO_PortasLogicas.And2 and4 = new POO_PortasLogicas.And2(); POO_PortasLogicas.Not notF0 = new POO_PortasLogicas.Not(); POO_PortasLogicas.Not notF1 = new POO_PortasLogicas.Not(); notF0.setBit1(f0); notF1.setBit1(f1); and1.setBit1(notF0.result()); and1.setBit2(notF1.result()); this.saidaD1 = and1.result(); and2.setBit1(notF0.result()); and2.setBit2(f1); this.saidaD2 = and2.result(); and3.setBit1(f0); and3.setBit2(notF1.result()); this.saidaD3 = and3.result(); and4.setBit1(f0); and4.setBit2(f1); this.saidaD4 = and4.result(); }
public override void resolveCircuito() { POO_PortasLogicas.And2 and1 = new POO_PortasLogicas.And2(); POO_PortasLogicas.And2 and2 = new POO_PortasLogicas.And2(); POO_PortasLogicas.And2 and3 = new POO_PortasLogicas.And2(); POO_PortasLogicas.And2 and4 = new POO_PortasLogicas.And2(); POO_PortasLogicas.Not notB = new POO_PortasLogicas.Not(); POO_PortasLogicas.Or2 or = new POO_PortasLogicas.Or2(); and1.setBit1(this.entradaA); and1.setBit2(this.entradaB); int resultAnd1 = and1.result(); or.setBit1(this.entradaA); or.setBit2(this.entradaB); int resultOr = or.result(); and2.setBit1(resultAnd1); and2.setBit2(this.saidaD1); this.saidaUL1 = and2.result(); and3.setBit1(resultOr); and3.setBit2(this.saidaD2); this.saidaUL2 = and3.result(); notB.setBit1(this.entradaB); and4.setBit1(notB.result()); and4.setBit2(this.saidaD3); this.saidaUL3 = and4.result(); }