public void setI(bool val) { I = val; var n1 = new NAND(); n1.setI(1, I); n1.setI(2, I); O = n1.getO(); }
public void setI(int index, bool val) { I[index] = val; var n1 = new NAND(); var n2 = new NAND(); n1.setI(1, I[1]); n1.setI(2, I[2]); n2.setI(1, n1.getO()); n2.setI(2, n1.getO()); O = n2.getO(); }
public void setI(int index, bool val) { I[index] = val; var n1 = new NAND(); var o1 = new OR(); o1.setI(1, I[1]); o1.setI(2, I[2]); n1.setI(1, o1.getO()); n1.setI(2, o1.getO()); O = n1.getO(); }