Discrete Input Logic