MC14011 NAND output voltage incorrect
Your problem is that your load resistance (an electromagnet) is far too small. The 4000 series should not be asked to put out more than a few mA at 12 volts. Try disconnecting the load and measuring the voltage. Without knowing how much current your magnet requires, I can suggest the following circuit:







simulate this circuit &ndash; Schematic created using CircuitLab

Q1 is just about any n-type power MOSFET, although you'll need to be sure that it can handle the current of the magnet. Likewise, almost any diode will do as long as its current rating is greater than the magnet current.