Actually, i am having a sensor, if the sensor is activated then it goes 4.5V otherwise its 5V
so, what ever be possible, it will be helpful,
Then i can interface it with a uC ....
As far as I understood you need to read only 5V or 0V, right? This sounds like a level conversion, and not analog to digital. A comparator could be an option. Normally comarators should have hysteresis added to avoid swinging around an input voltage. Take a look to those references, they may be helpful.