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.
Open this circuit in the lab →
What you need
- 3× NOT + 12 AND: the 3-to-8 decode of C B A
- 8× AND: each decoded line AND its data input
- 8× AND: each of those AND NOT G (the strobe)
- 7× OR: the OR tree that merges the eight into Y
- 2× NOT: NOT G, and W = NOT Y
Step by step
- Place the data inputs
D0toD7, the selectsC,B,A, the strobeG, and probesYandW. - Decode C B A into eight lines, as in the 3-to-8 decoder.
- AND each line with its data input and with NOT G, then OR all eight into
Y; invert Y forW. - 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
| G | C | B | A | Y | W |
|---|---|---|---|---|---|
| 1 | X | X | X | 0 | 1 |
| 0 | 0 | 0 | 0 | D0 | NOT D0 |
| 0 | 0 | 0 | 1 | D1 | NOT D1 |
| 0 | 0 | 1 | 0 | D2 | NOT D2 |
| 0 | 0 | 1 | 1 | D3 | NOT D3 |
| 0 | 1 | 0 | 0 | D4 | NOT D4 |
| 0 | 1 | 0 | 1 | D5 | NOT D5 |
| 0 | 1 | 1 | 0 | D6 | NOT D6 |
| 0 | 1 | 1 | 1 | D7 | NOT D7 |
74HC151 pinout
| Pin | Name | Pin | Name |
|---|---|---|---|
| 1 | D3 | 16 | VCC |
| 2 | D2 | 15 | D4 |
| 3 | D1 | 14 | D5 |
| 4 | D0 | 13 | D6 |
| 5 | Y | 12 | D7 |
| 6 | W (NOT Y) | 11 | A |
| 7 | G (strobe, active low) | 10 | B |
| 8 | GND | 9 | C |
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
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.