"OK, so your 8-bit counter counts from 0 to 7
When you put n (n beeing the output of the counter) on the selection inputs of the 3to8 decoder you get an level of 0 on decoder output n.
So in our example you will get the outputs of the decoder to have 0 logic in the order 0 to 7.
Then you connect output 0 of the decoder to input 0 on the priority encoder. Output 1 of the decoder will be connected to input 5 on the priority encoder. Output 2 of the decoder will be connected to input 2 of the priority encoder. And so on ... get the picture?
In this way when your counter is working at the output of the priority encoder you'll find your series. If you want another series just connect the decoder and priority encoder in a different way...."
Thank you Guybrush Threepwood for saving my ***. I totally get what ur saying but there is a problem.
If you connect output 0 of decoder to input 0 of the PE, what will you do when the counter outputs a 4 and into the decoder and decoder output is 5? Not sure if i'm right or not but I think the output 0 of the decoder shouldn't be connected to anything to make the PE output a zero. countter > 0, input decoder >0, output of decoder is 0 and if u connect that to 0 input of the PE, wouldn't that make the PE output a 1 instead of zero?