The reason I asked about the common power supply, the transistor is better if the supplies are not shared, because logic circuits sometimes suffer from "parasitic power" when a powered device is connected to an unpowered device. The voltage from an output can backfeed through the protection diode of an unpowered connected device pin, and power it up with a slightly reduced voltage and current. You can imagine the fun when this happens and you don't know what is going on...