Use pins A, B and C to select which of inputs D0 to D7 you want to have on output Y. Output W is the inverse of Y.