Calculate resistor values for 4-band and 5-band resistors