Highschool electronics student here, so sorry if this is a simple question.  
I have a photoelectric sensor that I currently have hooked up to a microcontroller, when on the digital input, it always reads high, however when on the analog input, the input changes when the sensor is triggered between 200 (low) and 2000 (high).  In other words, its a digital sensor, but its output isnt exactly digital, its more of a 0.1 or 0.9 instead of 0 or 1.

Is there some type of IC that I would be able to use to convert it to a true digital signal?