Translating a 1.8 V FPGA pulse to 24 V pulse to power a solenoid
Make your life easy.  

Don't try to switch the 24Volts.  

Switch the solenoid to ground.

Like this:







simulate this circuit &ndash; Schematic created using CircuitLab

The diode is NOT optional.  The 1N4007 is a stand in.  Which diode you really need depends on how much current the solenoid can kick back when you turn it off, and I don't know how much that might be.

Without the diode, the solenoid will build up a high voltage when you turn off the transistor.  This voltage can easily be higher than the voltage rating of the transistor.  That will kill the transistor in short order, so make sure to include the diode.

R1 can be made larger or smaller depending on how much current it takes to fully switch the transistor from 1.8V.

The type of transistor use use for Q1 depends on how much current the solenoid takes to operate.  You must make sure that it is rated for enough current and for at least 24VDC from collector to emitter - more is better.

The 2N3904 is rated for 40V from collector to emitter, but only 200mA.  You will probably need to check the current your solenoid draws.  Depending on that, you will need to find a transistor with the proper ratings.