You are looking for an analog logic module! Mystic circuits Ana is my top recommendation.