コード例 #1
0
        public AdderSubtractor()
        {
            InitBasicElements();

            Number1Inputs     = _adder.Number1Inputs;
            Number2Inputs     = _cplmtor.Inputs;
            TurnSubstract     = _subNexus.GetEndpointAt(0);
            ResultOutputs     = _adder.SumOutputs;
            OverflowUnderflow = _xorGate.Output;
        }
コード例 #2
0
ファイル: Decoder2To4.cs プロジェクト: jxw00100/LearnComputer
        public Decoder2To4()
        {
            _invertor1 = new Invertor();
            _invertor2 = new Invertor();
            _andGate00 = new ANDGate();
            _andGate01 = new ANDGate();
            _andGate10 = new ANDGate();
            _andGate11 = new ANDGate();

            _crossNexus1  = new CrossNexus(null, _andGate10.Input1, _invertor1.Input, _andGate11.Input1);
            _crossNexus2  = new CrossNexus(null, _andGate01.Input2, _invertor2.Input, _andGate11.Input2);
            _tshapeNexus1 = new TShapedNexus(_invertor1.Output, _andGate00.Input1, _andGate01.Input1);
            _tshapeNexus2 = new TShapedNexus(_invertor2.Output, _andGate00.Input2, _andGate10.Input2);

            Input1   = _crossNexus1.GetEndpointAt(0);
            Input2   = _crossNexus2.GetEndpointAt(0);
            Output00 = _andGate00.Output;
            Output01 = _andGate01.Output;
            Output10 = _andGate10.Output;
            Output11 = _andGate11.Output;
        }