Ohm's law and Kirchhoff's circuit laws are used to calculate the appropriate resistor value to obtain the desired current. The value is computed by subtracting the LED voltage drop from the supply voltage and dividing by the desired operating current. If the supply voltage is equal to the LED's voltage drop, no resistor is needed.