Shift registers

Comprehensive study notes, diagrams, and exam preparation for Shift registers.

Shift Registers

Definition

A shift register is a sequential logic circuit made up of a series of flip-flops connected in such a way that data can be stored and shifted one bit at a time from one stage to the next on every clock pulse. It is widely used for temporary data storage, data conversion, timing delay, and serial/parallel data handling in digital systems.

A shift register is called a sequential circuit because its output depends not only on the current input but also on the past stored state of the flip-flops.


Main Content

1. Basic Structure and Principle

  • A shift register is built using multiple flip-flops, usually D flip-flops, connected in a chain.
  • Each flip-flop stores 1 bit of data, so an n-bit shift register requires n flip-flops.

Example structure of a 4-bit shift register:

Input ──> [FF1] ──> [FF2] ──> [FF3] ──> [FF4] ──> Output
           Q1        Q2        Q3        Q4

How it works:

  • On every active clock edge, the data at the input of each flip-flop moves to the next stage.
  • The first flip-flop accepts new data from the external input.
  • The last flip-flop provides the final output.

Key idea:

  • If a binary sequence like 1 0 1 1 is loaded serially, it moves step by step through the register.
  • The stored bits are not changed continuously; they change only when the clock pulse arrives.

Why it is important in sequential logic:

  • It demonstrates memory, timing, and controlled data movement.
  • It is one of the simplest yet most useful sequential circuits in digital electronics.

2. Types of Shift Registers

  • Shift registers are classified based on how data enters and leaves the circuit.
  • The most common types are:

a) Serial-In Serial-Out (SISO)

  • Data enters one bit at a time and leaves one bit at a time.
  • Useful for time delay and sequence storage.
  • Example: If bits 1, 0, 1, 1 are entered serially, they appear at the output after several clock pulses.

b) Serial-In Parallel-Out (SIPO)

  • Data enters serially, but outputs are available simultaneously from all flip-flops.
  • Useful for converting serial data into parallel data.
  • Example: In communication systems, a stream of bits can be received serially and then read as a complete word.

c) Parallel-In Serial-Out (PISO)

  • Data is loaded into all flip-flops at once in parallel, then shifted out one bit at a time.
  • Useful for converting parallel data into serial data.
  • Example: A keyboard encoder may load multiple inputs in parallel and transmit them serially.

d) Parallel-In Parallel-Out (PIPO)

  • Data is loaded and retrieved in parallel.
  • Used as a temporary storage register.
  • Example: Buffering data between two units operating at different speeds.

ASCII representation of common forms:

SISO:  Serial In -> [FF] -> [FF] -> [FF] -> Serial Out

SIPO:  Serial In -> [FF] -> [FF] -> [FF]
                          |      |      |
                        Out1   Out2   Out3

PISO:  [FF] -> [FF] -> [FF] -> Serial Out
        ^      ^      ^
      Parallel input loaded together

PIPO:  Parallel In -> [FF] [FF] [FF]
                     -> Parallel Out

3. Modes, Operation, and Data Flow

  • Shift registers can shift data in different directions depending on how the flip-flops are connected.

Right shift

  • Bits move from the left side toward the right side.
  • The new bit enters at the left end.
  • Example:
  • Initial state: 1 0 1 1
  • After one right shift: 0 1 0 1 if 0 enters at the left

Left shift

  • Bits move from the right side toward the left side.
  • The new bit enters at the right end.
  • Example:
  • Initial state: 1 0 1 1
  • After one left shift: 0 1 1 x depending on input insertion

Bidirectional shift register

  • Can shift both left and right using control signals.
  • More flexible and used where data movement direction may change.

Universal shift register

  • A very important and versatile type.
  • Can perform:
  • Hold (no change)
  • Shift right
  • Shift left
  • Parallel load
  • It is called “universal” because it supports all major register operations.

Typical control operations of a universal shift register:

00

  • → Hold

01

  • → Shift right

10

  • → Shift left

11

  • → Parallel load

Why control is important:

  • The circuit must know whether to store, shift, or load data.
  • Control inputs make the register adaptable for many digital tasks.

Working / Process

1. Input loading

  • Data is entered into the register either serially or in parallel.
  • In serial input mode, one bit is applied at each clock cycle.
  • In parallel input mode, all bits are applied simultaneously to the flip-flops.

2. Clock-triggered shifting

  • On each active clock edge, each flip-flop transfers its stored bit to the next stage.
  • The first stage receives a new input bit.
  • The last stage sends its stored bit to the output.
  • This movement happens in discrete steps, not continuously.

3. Output generation and storage

  • The bits are available as serial output, parallel output, or both depending on register type.
  • The register can also retain data temporarily when no shifting is enabled.
  • This makes it useful for synchronization, buffering, and conversion of data formats.

Example of a 4-bit SISO shift register:

Clock 1: Input = 1   State = 1 0 0 0
Clock 2: Input = 0   State = 0 1 0 0
Clock 3: Input = 1   State = 1 0 1 0
Clock 4: Input = 1   State = 1 1 0 1

Explanation:

  • Each clock pulse shifts the stored bits one position.
  • Earlier bits move toward the output stage.
  • The output is obtained after the bits have passed through the chain.

Advantages / Applications

Data storage and buffering

  • Stores binary information temporarily for later use.

Serial-to-parallel and parallel-to-serial conversion

  • Essential in communication and interfacing between devices.

Timing delay and sequence generation

  • Can delay signals by a fixed number of clock cycles and generate patterns in digital systems.

Used in communication systems

  • Helps transfer data over fewer wires by sending bits serially.

Used in counters and sequence generators

  • Forms the basis of ring counters, Johnson counters, and pattern generators.

Used in microprocessors and digital circuits

  • Common in input/output expansion, display control, and data manipulation.

Compact wiring and efficient transfer

  • Serial transmission reduces hardware complexity compared to full parallel transmission.

Summary

  • A shift register is a chain of flip-flops that stores and moves binary data on each clock pulse.
  • It is used for serial/parallel data handling, temporary storage, and timing control.
  • Important terms to remember: flip-flop, clock pulse, serial input, parallel output, serial output, SISO, SIPO, PISO, PIPO, bidirectional shift register, universal shift register