An electromagnet was connected to a 12v battery and I verified that it was working. I then touched the electromagnet to a strong regular magnet (rated to hold over 50 kg). There was a strong force between the magnets. I then disconnected the electromagnet from power, reversed the wires, and turned it back on. I expected to feel the electromagnet repel the other magnet, but instead they two magnets got stuck together again. It seems like reversing the wires had no affect on the polarity of the electromagnet.