Ejemplo n.º 1
0
        public ORGate()
        {
            _relay1 = new Relay();
            _relay2 = new Relay();
            _nexus  = new TShapedNexus(_relay1.Output, _relay2.Output);

            Input1 = _relay1.Input;
            Input2 = _relay2.Input;
            Output = _nexus.GetEndpointAt(2);
        }
Ejemplo n.º 2
0
        public NANDGate()
        {
            _invertor1 = new Invertor();
            _invertor2 = new Invertor();
            _nexus     = new TShapedNexus(_invertor1.Output, _invertor2.Output);

            Input1 = _invertor1.Input;
            Input2 = _invertor2.Input;
            Output = _nexus.GetEndpointAt(2);
        }
Ejemplo n.º 3
0
        public HalfAdder()
        {
            _andGate = new ANDGate();
            _xorGate = new XORGate();
            _nexus1  = new TShapedNexus(null, _andGate.Input1, _xorGate.Input1);
            _nexus2  = new TShapedNexus(null, _andGate.Input2, _xorGate.Input2);

            Number1In = _nexus1.GetEndpointAt(0);
            Number2In = _nexus2.GetEndpointAt(0);
            Sum       = _xorGate.Output;
            CarryOut  = _andGate.Output;
        }
Ejemplo n.º 4
0
        public FlipFlop()
        {
            _norGate1 = new NORGate();
            _norGate2 = new NORGate();
            _nexus    = new TShapedNexus(_norGate2.Output, _norGate1.Input1);

            _norGate1.Output.ConnectTo(_norGate2.Input1);

            Set    = _norGate1.Input2;
            Clear  = _norGate2.Input2;
            Output = _nexus.GetEndpointAt(2);
        }
Ejemplo n.º 5
0
        public RSFlipFlop()
        {
            _norGate1 = new NORGate();
            _norGate2 = new NORGate();
            _nexus1   = new TShapedNexus(_norGate1.Output, _norGate2.Input1);
            _nexus2   = new TShapedNexus(_norGate2.Output, _norGate1.Input1);

            Reset = _norGate1.Input2;
            Set   = _norGate2.Input2;
            Q     = _nexus1.GetEndpointAt(2);
            QBar  = _nexus2.GetEndpointAt(2);
        }
Ejemplo n.º 6
0
        public Complementor16Bits()
        {
            _lowerCplmtor = new Complementor8Bits();
            _upperCplmtor = new Complementor8Bits();
            _invertNexus  = new TShapedNexus(null, _lowerCplmtor.Invert, _upperCplmtor.Invert);

            var mergedInputs  = _lowerCplmtor.Inputs.Concat(_upperCplmtor.Inputs).Cast <InputEndpoint>();
            var mergedOutputs = _lowerCplmtor.Outputs.Concat(_upperCplmtor.Outputs).Cast <OutputEndpoint>();

            Inputs  = new InputEndpointCollection <InputEndpoint>(WIDTH, mergedInputs);
            Outputs = new OutputEndpointCollection <OutputEndpoint>(WIDTH, mergedOutputs);
            Invert  = _invertNexus.GetEndpointAt(0);
        }
Ejemplo n.º 7
0
        public XORGate()
        {
            _orGate   = new ORGate();
            _nandGate = new NANDGate();
            _andGate  = new ANDGate();
            _nexus1   = new TShapedNexus(null, _orGate.Input1, _nandGate.Input1);
            _nexus2   = new TShapedNexus(null, _orGate.Input2, _nandGate.Input2);

            _andGate.Input1.ConnectTo(_orGate.Output);
            _andGate.Input2.ConnectTo(_nandGate.Output);

            Input1 = _nexus1.GetEndpointAt(0);
            Input2 = _nexus2.GetEndpointAt(0);
            Output = _andGate.Output;
        }
        public DTypeFlipFlopLevelTriggered()
        {
            _RSflipFlop = new RSFlipFlop();
            _andGate1   = new ANDGate();
            _andGate2   = new ANDGate();
            _invertor   = new Invertor();
            _nexus1     = new TShapedNexus(_andGate1.Input1, _andGate2.Input1);
            _nexus2     = new TShapedNexus(_invertor.Input, _andGate2.Input2);

            _invertor.Output.ConnectTo(_andGate1.Input2);
            _andGate1.Output.ConnectTo(_RSflipFlop.Reset);
            _andGate2.Output.ConnectTo(_RSflipFlop.Set);

            Data  = _nexus2.GetEndpointAt(2);
            Clock = _nexus1.GetEndpointAt(2);
            Q     = _RSflipFlop.Q;
            QBar  = _RSflipFlop.QBar;
        }
Ejemplo n.º 9
0
        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;
        }