Esempio n. 1
0
 public override void SetInputValue(ushort value)
 {
     base.SetInputValue(value);
     if (Inputs[0].HasValue && Inputs[1].HasValue)
     {
         OutputValue = (ushort)(Inputs[0].Value | Inputs[1].Value);
         OutputWire.SetInputValue(OutputValue);
     }
 }
Esempio n. 2
0
 public override string ToString()
 {
     return($"Logic Gate:{LogicGateType.ToString()}, InputWire1:{InputWire1.ToString()}, InputWire2:{InputWire2.ToString()}, OutputWire:{OutputWire.ToString()}");
 }
Esempio n. 3
0
 public override void Execute()
 {
     OutputWire.SetSignal((ushort)(InputWire1.Signal << InputWire2.Signal));
     Executed = true;
 }
Esempio n. 4
0
 public override void SetInputValue(ushort value)
 {
     base.SetInputValue(value);
     OutputValue = (ushort)~InputValue;
     OutputWire.SetInputValue(OutputValue);
 }
Esempio n. 5
0
 public override void SetInputValue(ushort value)
 {
     base.SetInputValue(value);
     OutputValue = (ushort)(InputValue << ShiftAmount);
     OutputWire.SetInputValue(OutputValue);
 }
Esempio n. 6
0
 public override void Execute()
 {
     OutputWire.SetSignal(InputWire1.Signal);
     Executed = true;
 }