The 74157 is a quad 2-line to 1-line multiplexer. Basically how this works is there are two inputs ( A and B ) for every output ( Y ). There are four groups like this, with two inputs and one output each. There is one select signal for the whole chip. When the select signal is low, the output ( Y ) is the same as input A. When the select signal is high, the output Y is the same as input B.