Outputs of one gate can be connected to
inputs
of another within the same chip or to another chip as long as they
share the same ground. The figure to the left illustrates a basic
circuit showing how to wire inputs and using LEDs to display outputs.

NAND GATE Logic-Rules:

If both inputs are HIGH then the output will be LOW, otherwise output
will be HIGH.