I know I could have done this with a pair of transistors but... The HC04 is more handy.
Just to be sure, I implemented the circuit and it worked (as soon as it was correctly wired, as usual :-P)
I love how simple it is. It's easy to look down at simple, dumb inverters but a few resistors and they become very versatile :-)