It is an output of XOR (Exclusive OR) gate
Truth table for 2 input NAND gate.
Applying to each of the NAND gates of the given figure we obtain the following table:
A = 0, B = 0, Y = 0
A = 0, B = 1, Y = 1
A = 1, B = 0, Y = 1
A = 1, B = 1, Y = 0
This is the truth table for XOR (Exclusive OR) gate.