A universal shift register can do four jobs, chosen at each clock edge by two mode select inputs, S1 S0. The course uses:
00: hold.01: shift right, with the right-shift serial input SIR entering Q3.10: shift left, with the left-shift serial input SIL entering Q0.11: parallel load from inputs I3 … I0.
How it is built: it is the load enable idea grown up. Instead of a 2:1 multiplexer choosing keep or new, each flip-flop gets a 4:1 MUX with S1 S0 on its select lines. For bit i the four MUX inputs are:
- Qᵢ itself (hold),
- the bit on its left, Qᵢ₊₁ (shift right),
- the bit on its right, Qᵢ₋₁ (shift left),
- the parallel input Iᵢ (load).
The end bits use the serial inputs in place of a missing neighbor: Q3's shift-right input is SIR, and Q0's shift-left input is SIL. An n-bit register needs n 4:1 MUXes.
Why it is useful: one part covers SISO, SIPO, PISO and PIPO, and by wiring a serial input back to an output it can rotate or do an arithmetic shift right. The classic 74194 chip is a 4-bit universal shift register.
Like every input, the mode matters only at the rising edge. Never apply two modes at one edge.