THere are ICs that are digital potentiometers with that accept up/down digital signal (and serial versions as well like I2C or SPI) that have logarithmic resistance that are made to serve as volume controls (since the human ear has a logarithmic response to volume increase, so you need a logarithmic increase to make it sound like it is increasing linearly). BUt if you must make the digital pot yourself...
...then a better way to arrange it is to use a string of series connected resistors. Each resistor has a switch in parallel with it to "short it" effectively removing it from the chain. YOu can customize your desired resistance increase with this method more easily than with the "accumulated parallel resistor method".
If equal resistances are used, this allows for a linear change in resistance.
1. If you use pick the resistor values so they add up logarithmically (ie. resistors of values 1R, 9R, 90R). The result is as you unshort them to add them to the chain of resistance they accumulate in a log manner (1R, 1+9R, 1R+9R+90R -> 1R, 10R, 100R). You can figure out the resistances needed if you just map out the resistance range you want logarithmically on the Y-axis of a graph, and then divide the X-axis up equall into the number of steps you want. Then just pick the resistances so that as they add up, they accumulate onto the resistance value located at each step. With a log graph you get a linear change in perceived volume since the human ear has a logarithmic response to changes magnitude.
2. Of course, you could also just use the "non-accumulated parallel resistor method", where instead of adding resistors into the parallel connections, where you have only one resistor representing the resistance per step and only have one resistor connected at one time. Every time you connect one resistor, you disconnect all the others. This also allows easier customization of the resistance response of the pot because you literally just pick one resistor value for each step (ie. 100R, 200R, 300R, ...for a linear response or 100R, 1K, 10K,... for a logarithmic response). As this method only ever has one switch on at any one time, the control signals of the switches are using 1-hot encoding (ie. 0001, 0010, 0100, 1000) while you are probably using sequential binary (ie. 00, 01, 10, 11) to represent your volumes. A priority encoder can be used to convert your sequential binary bit stream representative of the desired step to 1-hot encoding- very simple.
Parallel methods might be easier than the "accumulated series method (#1)" I just described because if you use MOS transistor switches, they are all stacked up onto each other, resulting in each gate having a different reference (source pin) voltage making it more complex to provide drive circuitry. With parallel resistors, all the MOS sources share the same node and just one gate drive supply can be used, using this node as the reference. If you use relays though, it's not a problem since relays don't work this way. Also, with the parallel methods, you also do not experience the problem of accumulating switch resistance. Since you do have a chain of imperfect (non-zero ohm switches) forming imperfect shorts across the resistors ,and these resistances can add up and make a difference, especially if your pot is trying to express a low value.
If you don't know what a priority encoder is, it just takes the binary number placed on the input parallel bus and enables the one output whose label matches that binary number, and disables all the other inputs. Enable/Disable can be active HI or active LO depending on the priority encoder.