I have an 18V battery and a 12V bulb and I want to reduce the voltage with resistors. I have already used a transistor (L7812CV) which works fine but now I want to know how to do it with a resistor so I was wondering what resistance I should use?
Lets assume that a resistor is placed in series with the bulb and the bulb needs to draw 1A of current.
This means that we need to choose a resistor value that will have 6V across it with 1A through it. For this we can use Ohms law. R = V/I = 6/1 = 6 ohms.
Now when using a practical resistor, we need to watch out for the maximum power the resistor can dissipate. So lets work out the power. P = IV = 1A * 6V = 6W. So the minimum power rating our resistor can have is 6W but in practice we would choose a larger wattage resistor to add some safety margin.
Since the voltage of the battery is not constant, as the battery voltage decreases, so will the current through the resistor and the bulb. This may cause the bulb to slowly dim over time. If you want to ensure that the bulb always receives a steady 12V, a voltage regulator will be more suitable.
As an aside, you can think of a linear voltage regulator like a variable resistance. Both a voltage regulator, and a resistor convert extra energy into heat. As the battery voltage decreases, the voltage regular decreases its "resistance" to keep a steady 12V for the bulb.
Now to compute the resistor value and wattage for your circuit, replace 1A with the actual current your bulb draws.