Now, the thing to remember is that we are using a CD4512 chip, whose truth table is shown below. The important thing to note here is that, in addition to the three multiplexer select controls, A, B, ...
The 74AXP1G57 is a configurable multiple function gate with Schmitt-trigger inputs. The device can be configured as any of the following logic functions AND, OR, NAND, NOR, XNOR, inverter and buffer.