A resistor is one of the most fundamental components in electronics. Its purpose is to impede a flow of current…