Class LogicNumber

java.lang.Object
ch.epfl.cs107.play.signal.logic.LogicGate
ch.epfl.cs107.play.signal.logic.LogicNumber
All Implemented Interfaces:
Logic, Signal

public final class LogicNumber extends LogicGate
Implementation of a Logical Number. The signal is true if the given signals interpreted as binary digits equals the number
  • Constructor Details

    • LogicNumber

      public LogicNumber(int value, Logic... signals)
      Default constructor of logical Number
      Parameters:
      value - (int): value we want to represent with the signals
      signals - (Array of Logic): all digits signals, smallest power of two first. Not null
  • Method Details

    • getIntensity

      public float getIntensity()
      Returns:
      (float) : the signal intensity, usually 0.0 or 1.0