calculating voltages and resistor values in potential dividers