Problems with a 4051 multiplexer

Looks like an 8x1 multiplexer. Connect the output to a pin. Apply an address (3 bits) to the multiplexer. The button connected to the select input of the multiplexer is now connected to the output of the multiplexer. Read its state from the pin.