Module 3: Sequential Circuit Design · 3.4 Registers & Shift Registers

The Universal Shift Register

A universal shift register integrates multiple operational modes into a single sequential circuit.

Under the control of a 2-bit mode selection vector ($S_1, S_0$), the register executes hold, shift-right, shift-left, and parallel-load operations. The commercial 74HC194 integrated circuit implements this architecture.

Functional Mode Table

The mode selection inputs ($S_1, S_0$) govern register operation on active clock edges:

$S_1$ $S_0$ Operational Mode Next-State Function
0 0 Hold $Q_{\text{next}}[i] = Q[i]$
0 1 Shift Right $Q_{\text{next}}[i] = Q[i+1]$, serial data enters at MSB (SR_IN)
1 0 Shift Left $Q_{\text{next}}[i] = Q[i-1]$, serial data enters at LSB (SL_IN)
1 1 Parallel Load $Q_{\text{next}}[i] = D_{\text{parallel}}[i]$

Assuming bit index $N-1$ represents the Most Significant Bit (MSB), shifting right moves bits toward bit index 0 (LSB). Shifting left moves bits toward bit index $N-1$.

Circuit Architecture

Each bit stage consists of an edge-triggered D flip-flop preceded by a 4-to-1 multiplexer (Figure 1).

The multiplexer routes the appropriate candidate input to the flip-flop based on mode bits $S_1$ and $S_0$:

$$D_{\text{actual}}[i] = \begin{cases} Q[i] & \text{for } S_1 S_0 = 2\text{‘b}00 \text{ (Hold)} \ Q[i+1] & \text{for } S_1 S_0 = 2\text{‘b}01 \text{ (Shift Right)} \ Q[i-1] & \text{for } S_1 S_0 = 2\text{‘b}10 \text{ (Shift Left)} \ D_{\text{parallel}}[i] & \text{for } S_1 S_0 = 2\text{‘b}11 \text{ (Parallel Load)} \end{cases}$$

At the boundaries of the register:

  • For bit $N-1$ during shift-right mode, input $Q[N]$ connects to external serial input SR_IN.
  • For bit 0 during shift-left mode, input $Q[-1]$ connects to external serial input SL_IN.

Universal shift register
Figure 1: Schematic of a 4-bit universal shift register with 4-to-1 input multiplexers

Figure 2 illustrates timing transitions across all four operating modes:

Universal shift register timing
Figure 2: Timing waveform showing sequential execution across hold, shift-right, shift-left, and parallel-load modes

All flip-flops share a single clock net, ensuring synchronous and glitch-free state transitions.

The Standard 74HC194 Architecture

The 74HC194 standard logic component provides a 4-bit bidirectional universal shift register in a 16-pin package:

  • Clock (CLK): Active rising edge.
  • Master Reset (CLR_N): Asynchronous active-low reset that overrides all inputs and clears the register immediately.
  • Control Inputs (S1, S0): Select synchronous operating mode.
  • Serial Inputs (DSR, DSL): Shift-right serial input and shift-left serial input.
  • Parallel I/O: Four parallel inputs ($A, B, C, D$) and four parallel outputs ($Q_A, Q_B, Q_C, Q_D$).

Cascading Multiple Registers

Designers cascade multiple universal shift registers to create wider datapaths. For example, connecting two 4-bit devices builds an 8-bit bidirectional shift register:

  • Shift-Right Interconnect: Connect output $Q_0$ of the upper device to serial input DSR of the lower device.
  • Shift-Left Interconnect: Connect output $Q_3$ of the lower device to serial input DSL of the upper device.
  • Shared Signals: Connect clock (CLK), reset (CLR_N), and control inputs ($S_1, S_0$) in parallel to both integrated circuits.

This modular structure allows expansion to 16-bit, 32-bit, or arbitrary word lengths.

Timing Characteristics

The critical path of an $N$-bit universal shift register equals the propagation delay through one 4-to-1 multiplexer plus the setup time of the D flip-flop:

$$t_{\text{path}} = t_{\text{mux4}} + t_{\text{su}}$$

Because each bit stage operates independently in parallel, path delay does not increase with word width. Universal shift registers achieve high maximum operating frequencies.

Practice Exercises

Problem 1

A 4-bit universal shift register stores binary value $Q = 4\text{‘b}1011$. Serial inputs are SR_IN = 0 and SL_IN = 1.

  1. Determine register contents after two consecutive shift-right operations.
  2. Determine register contents after two consecutive shift-left operations starting from $Q = 4\text{‘b}1011$.
Solution
  1. Shift right (data shifts toward bit 0 while SR_IN = 0 enters MSB):
    • First shift: 0101
    • Second shift: 0010
  2. Shift left (data shifts toward bit 3 while SL_IN = 1 enters LSB):
    • First shift: 0111
    • Second shift: 1111

Problem 2

Configure a universal shift register to perform an arithmetic shift right (ASR) operation.

Solution

An arithmetic shift right divides a signed two’s complement integer by 2, requiring sign bit replication into the vacated MSB position.

Connect serial input SR_IN directly to the MSB register output $Q[N-1]$. When shifting right, bit $Q[N-1]$ copies into itself, preserving the numerical sign. For example, value 1011 ($-5$) shifts right to 1101 ($-3$).

Problem 3

How many 74HC194 devices are required to construct a 16-bit bidirectional shift register, and how do you connect them for shift-right operation?

Solution

Four 4-bit devices are required ($4 \times 4 = 16\text{ bits}$).

For shift-right operations:

  • Connect the external serial input to DSR of device 3 (most significant stage).
  • Connect output $Q_0$ of device 3 to input DSR of device 2.
  • Connect output $Q_0$ of device 2 to input DSR of device 1.
  • Connect output $Q_0$ of device 1 to input DSR of device 0.
  • Pin $Q_0$ of device 0 serves as the serial output.

Connect CLK, CLR_N, S1, and S0 to all four devices in parallel.

Section 3.5 examines digital counters, starting with asynchronous ripple counters and transitioning to high-speed synchronous counters.

← Shift Register Applications The Ripple Counter →