Do pilots know the unique ICAO 24-bit hexadecimal code for their aircraft? Do they ever give it directly to ATC? For example, to controllers who make the flight strips with destination, departure, type of aircraft etc. I know for a fact that some flight plans are sent out that include the unique hex code for the aircraft.
Typically pilots do not know the 24-bit aircraft address of their aircraft.
The 24 bit address is intended for data protocol level of communications and is not used in voice communication. Therefor there is no need for pilots to be aware of their ICAO 24-bit aircraft address. They use the aircraft's registration if they need to identify the aircraft they are using for the flight.
The 24-bit address is used by transponders for communication with Mode-S radars, ADS-B transmissions, by TCAS for tracking traffic and coordinating Resolution Advisories and by Data-Link communications.
I will agree that pilots generally do not know the ICAO 24 bit address for their aircraft. However, with the advent of the ICAO format flight plan, operators who want to take advantage of ADS-B provided ATC services (such as where only ADS-B - no radar - is provided), will have to include the hexadecimal equivalent of their aircraft's 24-bit ICAO address.
Do pilots know the unique ICAO 24-bit hexadecimal code for their aircraft?
Answer depends on the pilot really. Mode S Address(24 bit ICAO address as you say) can be seen as IP of the planes. It is included in some of the Mode S Mode S interrogations/replies as you pointed out.
For commercial airplanes, Mode S address is not changed during lifetime, generally but for some military scenarios, I have read that Mode S Address can be changed per flight for obvious reasons. So you can say, some military pilots definitely know Mode S address of their aircraft.
In addition to that, some platforms may provide you with display and control of Mode S Address.