Example #1
0
 public void InputSelect(object sender, Trit select)
 {
     SelectState = select;
     OnSelectInvoked(sender, select);
 }
Example #2
0
 public MinGate(IComponentOutput componentA, IComponentOutput componentB, Trit inputStateA = Trit.Neu, Trit inputStateB = Trit.Neu) :
     base(componentA, componentB, inputStateA, inputStateB)
 {
 }
Example #3
0
 protected virtual void OnInputInvoked(object sender, Trit trit, int pin)
 {
 }
Example #4
0
 protected void InvokeSignedOutput(object sender, Trit sign)
 {
     SignedState = sign;
     SignedOutput?.Invoke(this, SignedState);
 }
Example #5
0
 public MinGate(ComponentTriggeredEvent input1 = null, ComponentTriggeredEvent input2 = null, Trit inputStateA = Trit.Neu, Trit inputStateB = Trit.Neu) :
     base(input1, input2, inputStateA, inputStateB)
 {
 }
Example #6
0
 public DeMuxer(Trit selectState = Trit.Neu, Trit inputState = Trit.Neu) : base(selectState)
 {
     InputState = inputState;
 }
Example #7
0
 public void FowleanControlInput(object sender, Trit trit)
 {
     FowleanControlState = trit;
     muxerBus2.InputSelect(this, trit);
 }
Example #8
0
 public static Trit Reverse(Trit trit)
 {
     return(trit == Trit.Neg ? Trit.Neg : Trit.Neu);
 }
Example #9
0
        public Trit this[int index]
        {
            get
            {
                switch (index)
                {
                case 0: return(T0);

                case 1: return(T1);

                case 2: return(T2);

                case 3: return(T3);

                case 4: return(T4);

                case 5: return(T5);

                case 6: return(T6);

                case 7: return(T7);

                case 8: return(T8);

                case 9: return(T9);

                case 10: return(T10);

                case 11: return(T11);
                }

                throw new IndexOutOfRangeException();
            }

            set
            {
                switch (index)
                {
                case 0: T0 = value; break;

                case 1: T1 = value; break;

                case 2: T2 = value; break;

                case 3: T3 = value; break;

                case 4: T4 = value; break;

                case 5: T5 = value; break;

                case 6: T6 = value; break;

                case 7: T7 = value; break;

                case 8: T8 = value; break;

                case 9: T9 = value; break;

                case 10: T10 = value; break;

                case 11: T11 = value; break;

                default: throw new IndexOutOfRangeException();
                }
            }
        }
Example #10
0
 /// <summary>
 /// Represents Ternary XOR Gate
 /// </summary>
 /// <param name="inputA">The first input <see cref="Trit"/></param>
 /// <param name="inputB">The second input <see cref="Trit"/></param>
 /// <returns>Ternary XOR <see cref="Trit"/> output</returns>
 public static Trit Output(Trit inputA, Trit inputB)
 {
     return(TAND.Output(TNAND.Output(inputA, inputB), TOR.Output(inputA, inputB)));
 }
Example #11
0
 public static Trit Forward(Trit trit)
 {
     return(trit == Trit.Pos ? Trit.Pos : Trit.Neu);
 }
Example #12
0
 protected abstract Trit Execute(Trit inputStateA, Trit inputStateB);
Example #13
0
 public bool Equal(Trit other)
 {
     return(this.Value == other.Value);
 }
Example #14
0
 protected abstract void OnSelectInvoked(object sender, Trit select);
Example #15
0
 public void Input(object sender, Trit trit)
 {
     InputState = trit;
     OnInputInvoked(sender, trit);
 }
Example #16
0
 protected override Trit Execute(object sender, Trit trit)
 {
     return(TritLogic.Forward(trit));
 }
Example #17
0
 protected void InvokeOutput(object sender, Trit trit)
 {
     OutputState = trit;
     Output?.Invoke(sender, trit);
 }
Example #18
0
 protected override void OnInputInvoked(object sender, Trit trit, int pin)
 {
     InvokeOutput(pin, Execute(sender, InputStates[pin]), this);
 }
Example #19
0
 protected override void OnSelectInvoked(object sender, Trit select)
 {
     Input(this, InputState);
 }
Example #20
0
 protected abstract Trit Execute(object sender, Trit inputState);
Example #21
0
 protected void InvokeOverflowOutput(object sender, Trit overflow)
 {
     OverflowState = overflow;
     OverflowOutput?.Invoke(this, OverflowState);
 }
Example #22
0
 public ConverseImplicationGate(ComponentTriggeredEvent input1 = null, ComponentTriggeredEvent input2 = null, Trit inputStateA = Trit.Neu, Trit inputStateB = Trit.Neu) :
     base(input1, input2, inputStateA, inputStateB)
 {
 }
Example #23
0
 public void InputD(object sender, Trit trit)
 {
     egated.AInput(this, trit);
 }
Example #24
0
 protected override Trit Execute(Trit inputStateA, Trit inputStateB)
 {
     return(TritLogic.ConverseImplication(inputStateA, inputStateB));
 }
Example #25
0
 protected override Trit Execute(Trit inputStateA, Trit inputStateB)
 {
     return(TritLogic.Min(inputStateA, inputStateB));
 }
Example #26
0
 public ConverseImplicationGate(IComponentOutput componentA, IComponentOutput componentB, Trit inputStateA = Trit.Neu, Trit inputStateB = Trit.Neu) :
     base(componentA, componentB, inputStateA, inputStateB)
 {
 }
Example #27
0
 protected override Trit Execute(object sender, Trit trit)
 {
     return(TritLogic.ShiftUp(trit));
 }
Example #28
0
 public Basic1In1OutComponent(ComponentTriggeredEvent input = null, Trit inputState = Trit.Neu)
 {
     input     += Input;
     InputState = inputState;
 }
Example #29
0
 public ShiftUpGate(ComponentTriggeredEvent input = null, Trit inputState = Trit.Neu) :
     base(input, inputState)
 {
 }
Example #30
0
 public MuxerBusBase(Trit selectState = Trit.Neu)
 {
     SelectState = selectState;
 }