How does resistance effect electrical devices?