Пример #1
0
        public void setI(bool val)
        {
            I = val;
            var n1 = new NAND();

            n1.setI(1, I);
            n1.setI(2, I);
            O = n1.getO();
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }