Many signals, one line.
A multiplexer picks one of several inputs; a demultiplexer sends one input to one of several outputs. Together they share a single wire.
The multiplexer
n select lines choose one of 2ⁿ data inputs (a data selector).
Signals take turns on one line: time division multiplexing.
Step the select lines through 0 to 7 and the eight data bits leave one after the other.
The 74151
Select 1: Y follows D1 (= 1); W is its complement.
Hold the chip with its notch on the left. Pin 1 is at the bottom left, the pins count up to the right, then continue along the top from right to left. Most 14 pin chips have VCC on pin 14 and GND on pin 7, but not all: check every new chip.
The strobe G (pin 7) is active LOW: tie it to GND, or Y stays LOW. W is always the complement of Y.
Functions from a multiplexer
Put the function's variables on the select lines. The selected data input is the function value for that row, so tie Dn to 1 when minterm n is in the function and to 0 otherwise. A full adder needs two chips: S = Σm(1, 2, 4, 7) and Cout = Σm(3, 5, 6, 7).
The demultiplexer
Select 5: only Y5 is LOW (its lamp is dark).
The 74138 is a decoder with enables. Put the data on G2B (active LOW enable): when the data is 0 the selected output goes LOW, when it is 1 every output is HIGH. So the selected output copies the data and the others stay HIGH.
Data communication
The same select code drives both chips. The 74151 puts Dn on its Y pin; one wire takes it to G2B of the 74138, which hands it to output Yn. In the lab the clock on one data input makes the matching output LED blink.
Check yourself
Q1C B A = 101 on the 74151 with G = 0. Which input reaches Y?
D5.
Q2Y stays LOW whatever you do. Why?
The strobe G is open (reads HIGH) or tied HIGH.
Q3Which data inputs are tied HIGH for F = Σ(1, 2, 6, 7)?
D1, D2, D6 and D7.
Q4On the demultiplexer, why do the unselected LEDs stay lit?
The 74138 outputs are active LOW: an output that is not selected stays HIGH.