How do TTL NAND gates work?
I know that Q2 and Q3 will be in cut off so the base of Q1 is floating.


Incorrect. A BJT is also a pair of P-N junctions, so if the emitters of both Q2 and Q3 are high then current will flow from the bases to the collectors instead, turning Q1 on.