74151 is a data selector, also known as a band switch, a data selector with more than two outputs is equivalent to a multi-knife multi-throw band switch, which is used to select a data output from 8 data.
Pin functions are as follows:
A, B, C are the selective input, D0-D7 are the data input, STROBE is the gated input (low level valid), W is the negative code data output, Y is the data output.
Enter the 3-bit binary number from the selection input, and according to parity, 000,001,010,011,100,101,110,111 correspond to D0-D7 respectively.
If there are an odd number of 1s in the setting code, and the output is 1, you can connect the D1,D3,D5,D7 four outputs to a or gate at the output end.