This is a picture of two NAND gates. The input is 0 and 1 is produced, and all 1 is produced as zero.
When the inputs of pins 1 and 2 of your U40A are both 1, then the three pins are 0; it also means that the pins 1 and 2 of U41A are 0; then the output of U41A is 1. Attached is a symbol table of logic gates for your reference.