7400 (NAND Gate)

Best practice with TTL is tie unused inputs to ground for low, or via 1k resistor to +5V for high.
For LS TTL, 10k pullup is used instead of 1k. Never tie a TTL input directly to +5V, they are easily
damaged by supply voltage spikes if you do that.

Best of all is use CMOS 74HC family, but then all unused inputs needed to be tied to ground or +5V
(but no resistors needed).