A two inputs NAND gate with inputs A and B has an output “0” if:

B is zero

A is zero

Both A and B are 1

Both A and B are 0