This is a simple yet effective resistor decade box. The resistors are connected in parallel with the SPDT/SPST switches. The resistance is the sum of all switches opened(NOT CLOSED!).

When resistors are in series the resistances add up.

$$Rt=R1+R2+R3$$

And when they are in parallel the total resistance decreases:

$$Rt=\frac{1}{\frac{1}{R1}+\frac{1}{R2}+\frac{1}{R3}}$$

Rt is the total resistance in all equations can have an unlimited amount of resistors.

We are going to set them up in a 4-bit binary digit value form where each switch has a resistance of $$Rn=2^{n}$$

Let’s say when you close the switch, the resistance is 0.1 ohm. So let’s say we have a 4 switch box. There are 10,20,40 and 80 ohms used. Let’s close 40 and 80.

$$Rout=\frac{1}{\frac{1}{.1}+\frac{1}{40}}+\frac{1}{\frac{1}{.1}+\frac{1}{80}}+10+20$$

Rout=30.19962578 which should be 30 ohms we are close enough