what is an electrical resistor used for types of resistor carbon composition and wire wound resistor