You have an eight position rotary switch (why not?), and each position is numbered 1 thru 8. Whichever position the switch is in, you display that number on a 7-segment display. So, position one, the display shows 1; position two, display is 2; etc.
Do not use zero as a position, nor display a 0 (or anything else that is not 1-8).
If you want a little more challenge, try a nine position switch.
A digital potentiometer consists of two main parts: quadrature decoder and a binary counter. The binary counter's output is sent to some transistor buffers and some relays, the relays will form a linear branch of resistance with pre-calculated values.
I did this for a friend once who thought regular potentiometers weren't good enough and were too noisy for his audiophile taste.. We changed the lookup tables to give a logarithmic response, since the linear was really silly.. Of course, I used a microcontroller, but it would be fun to do with gates.