Potentiometer (0-1023) to Binary conversion (0-255) printed to 8 LEDs

i have done the same thing. Did you mean like