How to output the data recived from potentiometer with digital output?

Are you looking for something like Fig-1; where, you rotate the Pot to change the DC voltagw at A0-pin; as a result, the states of the LEDs (LED0 - LED9) chnage?


Figure-1: