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); } }
public override string ToString() { return($"Logic Gate:{LogicGateType.ToString()}, InputWire1:{InputWire1.ToString()}, InputWire2:{InputWire2.ToString()}, OutputWire:{OutputWire.ToString()}"); }
public override void Execute() { OutputWire.SetSignal((ushort)(InputWire1.Signal << InputWire2.Signal)); Executed = true; }
public override void SetInputValue(ushort value) { base.SetInputValue(value); OutputValue = (ushort)~InputValue; OutputWire.SetInputValue(OutputValue); }
public override void SetInputValue(ushort value) { base.SetInputValue(value); OutputValue = (ushort)(InputValue << ShiftAmount); OutputWire.SetInputValue(OutputValue); }
public override void Execute() { OutputWire.SetSignal(InputWire1.Signal); Executed = true; }