Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksToolsOpen the lab →

74HC151 (74LS151): the 8-to-1 multiplexer chip, live

The 74HC151 is an 8-to-1 multiplexer (data selector) chip: the select inputs C B A pick one of the eight data inputs D0 to D7 and pass it to the output Y, with its complement on W. The strobe G is active low: G = 0 enables the chip, and G = 1 forces Y to 0 and W to 1. This live circuit behaves like the chip.

Inside, the chip decodes C B A into eight lines, ANDs each line with its data input and with the strobe, and ORs the eight results, the same structure as the 8-to-1 multiplexer built gate by gate on this site, plus the strobe and the inverted output W. TI's datasheet lists three jobs an 8-to-1 multiplexer does: Boolean-function generator, parallel-to-serial converter and data source selector. The first is the neat one: wire the eight data inputs to 0s and 1s from a truth table and the chip outputs any function of three variables, with C B A as the variables (use W for the inverse). For the second, step C B A through 0 to 7 with a counter and the eight bits come out one after another. Select C is the most significant bit. Before the page is built, every select value with the strobe on and off is checked against 16 data words, all 0s, all 1s and 14 seeded at random (256 rows), on both Y and W.

Big circuit: pinch, scroll or tap + to zoom in, then drag to move around.

Live circuit: click the inputs to toggle them and watch the outputs update. It runs the real simulator, right here on the page.

Open this circuit in the lab →

What you need

Step by step

  1. Place the data inputs D0 to D7, the selects C, B, A, the strobe G, and probes Y and W.
  2. Decode C B A into eight lines, as in the 3-to-8 decoder.
  3. AND each line with its data input and with NOT G, then OR all eight into Y; invert Y for W.
  4. With G = 0, set C B A = 101 and toggle D5: Y follows it. Set G = 1 and Y stays 0 whatever the data.

74HC151 function table

GCBAYW
1XXX01
0000D0NOT D0
0001D1NOT D1
0010D2NOT D2
0011D3NOT D3
0100D4NOT D4
0101D5NOT D5
0110D6NOT D6
0111D7NOT D7

74HC151 pinout

PinNamePinName
1D316VCC
2D215D4
3D114D5
4D013D6
5Y12D7
6W (NOT Y)11A
7G (strobe, active low)10B
8GND9C

X means the input does not matter. The function table and the 16-pin pinout are from TI's SN74HC151 datasheet (SCLS110F), checked 2026-10-25; it runs from 2 V to 6 V, and the 74LS151 has the same pinout. Note how the data pins wrap around the chip: D0 to D3 on pins 4 down to 1, D4 to D7 on pins 15 down to 12.

You can also read the full theory in the lesson on the multiplexer. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.

Build more parts from gates

half adderfull adderhalf subtractorfull subtractor2:1 multiplexer4:1 multiplexerXOR gate from NAND gates2-to-4 decoderSR latchD flip-flopJK flip-flopT flip-flop4-bit shift register4-bit ripple carry adderD latch1-to-4 demultiplexer4-bit magnitude comparator4-bit ring counter4-bit Johnson counter4-to-2 priority encoder4-bit synchronous counter3-to-8 decoder8-to-1 multiplexer4-bit carry lookahead adderhalf adder from NAND gates2-bit comparatorBCD to 7-segment decoder4-bit up/down counterdecade counter2-bit multiplier4-bit ALU4-bit array multiplierNOT, AND, OR and NOR from NANDNOT, OR, AND and XOR from NORfull adder from NAND gatesSR latch from NAND gatesparity generator and checker4-bit adder/subtractorBCD adder4-bit universal shift registermod-6 counter4-bit ripple counterbinary to Gray code converterhalf adder from NOR gatesfull adder from NOR gates4-bit register with parallel load1011 sequence detectorbinary to BCD converterD flip-flop from NAND gates1-bit ALUCMOS inverterCMOS NAND gateCMOS NOR gatePISO shift registerSR flip-flop from NAND gatesBCD to excess-3 code converterHamming (7,4) code encoder and correctortraffic light controller4-bit barrel shifterCMOS AND gateCMOS OR gateCMOS XOR gate1-bit magnitude comparatorhalf subtractor from NAND gatesfull subtractor from NAND gates8-to-3 encoderGray to binary converter4-to-16 decoderfull adder using 4:1 multiplexersedge detectorserial adder4-bit carry-select adder4-bit Kogge-Stone adder4-bit carry-skip adder4x4 Wallace tree multiplier8-bit adderfrequency divider (by 2, 4 and 3)switch debouncer (SR latch)3-bit Gray code counterMealy machine (1011 detector)master-slave JK flip-flop (NAND)half subtractor from NOR gates1-to-8 demultiplexerexcess-3 to BCD code convertervending machine FSM4-bit carry-save adder3-bit synchronous counter (JK)CMOS transmission gatetri-state buffer (CMOS)2-to-1 mux from transmission gatesmod-5 counterflip-flop conversion (JK to D)8-bit ALUdecimal to BCD encoderBCD to decimal decoder4-to-1 mux from 2-to-1 muxesXOR gate from NOR gates4-bit LFSR74LS138 decoderBCD subtractor74181 ALUCMOS AOI gate (AOI21)D latch vs D flip-flop74LS47 BCD to 7-segment decoder74HC595 shift register7400 quad NAND gate chip7402 quad NOR gate chip7404 hex inverter chip7408 quad AND gate chip7432 quad OR gate chip7486 quad XOR gate chip7474 dual D flip-flop74HC165 shift registerCD4017 decade counter74LS283 4-bit adder74LS90 decade counter74HC161 4-bit counter74HC157 quad 2-to-1 multiplexer74HC139 dual 2-to-4 decoderCD4511 BCD to 7-segment decoder7492 divide-by-12 counter7493 4-bit binary counter74HC244 octal buffer

Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.

Open the 74HC151 8-to-1 multiplexer in the lab →

Frequently asked

What does the 74HC151 do?

It is an 8-to-1 multiplexer: the 3-bit select C B A chooses one of the eight data inputs D0 to D7, which appears on output Y, with its complement on W. The active-low strobe G must be low; G high forces Y low and W high.

How can a 74HC151 implement any 3-variable logic function?

Connect C, B and A to the three variables and tie each data input Dk to the function's value in truth-table row k (VCC for 1, GND for 0). Y then outputs the function for every input combination, and W its inverse.

What is the strobe on a multiplexer?

An enable input. On the 74HC151 it is active low: with G = 0 the selected data passes through, with G = 1 the output Y is forced to 0. Two chips with opposite strobes, driven by a fourth select bit, make a 16-to-1 multiplexer.

What is the difference between the 74HC151 and the 74HC157?

The 74HC151 selects one of eight inputs onto one output. The 74HC157 has four separate 2-to-1 multiplexers sharing one select line, so it switches a 4-bit word between two sources.