NAND Gate:
If both the inputs A and B are same output Y becomes 0 otherwise 1
Truth table of NAND Gate
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
Inverter gate
The output of the gate is reciprocal to the input of the gate is called inversion
Example:
If you provide the input as 1 the output gone be 0
if you provide the input as 0 the output becomes 1
If you connect the both inputs A and B , the output becomes inversion of the input, Mentioned both the inputs A and B which are shorted. so it acts a single input to the NAND gate and it will give the inversion of the input
A B Y
0 0 1
1 1 0