Shift registers

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

Shift Registers

Definition

A shift register is a group of flip-flops connected in a series, sharing a common clock, where data is entered, stored, and shifted from one stage to another in synchronism with clock pulses.


Main Content

1. Basic Structure of Shift Registers

  • A shift register is made up of a chain of flip-flops, most commonly D flip-flops, connected in sequence.
  • Each flip-flop stores one bit, so an n-bit shift register requires n flip-flops.

A shift register works as a multi-bit storage element in which the output of one flip-flop becomes the input of the next flip-flop. Because all flip-flops receive the same clock signal, the bits move together in a controlled manner. The register can be built using different types of flip-flops, but D flip-flops are preferred because they are simple to connect and directly accept data on the input line.

For example, a 4-bit shift register can store a 4-bit binary word such as 1011. Each clock pulse shifts the contents one position left or right depending on the configuration. This makes shift registers very useful for temporary data storage and serial data handling.

A simple 4-bit shift register can be represented as:

Serial In -> [FF1] -> [FF2] -> [FF3] -> [FF4] -> Serial Out
               Q1      Q2      Q3      Q4

In this arrangement, each flip-flop transfers its stored bit to the next flip-flop when the clock arrives.

2. Types of Shift Registers

Serial In Serial Out (SISO)

  • Data enters and leaves one bit at a time.

Serial In Parallel Out (SIPO), Parallel In Serial Out (PISO), and Parallel In Parallel Out (PIPO)

  • These are other important forms used for different data handling tasks.

Shift registers are classified based on how data enters and how it is taken out.

Serial In Serial Out (SISO):
In a SISO register, data bits are fed in serially, meaning one bit per clock pulse, and also read out serially. This type is often used for delay circuits because the data is shifted through the chain one stage at a time before appearing at the output.

Serial In Parallel Out (SIPO):
In a SIPO register, bits enter one by one but become available simultaneously at the output lines after enough clock pulses. This is useful in applications where serial data from a communication line must be converted into parallel form for processing by a microprocessor or digital system.

Parallel In Serial Out (PISO):
In a PISO register, multiple bits are loaded at the same time into the register, and then shifted out one at a time. This is useful when a parallel word must be transmitted over a single line to reduce the number of wires.

Parallel In Parallel Out (PIPO):
In a PIPO register, data is loaded and read out in parallel. It behaves like a simple memory register and is used for fast temporary storage.

These types allow shift registers to be adapted for data storage, transmission, and conversion between serial and parallel forms.

3. Operation and Timing Behavior

  • The register changes state only on clock pulses, ensuring synchronized movement of data.
  • Each clock pulse shifts the data by one stage, and the direction of shift depends on the design.

The operation of a shift register depends on the timing of the clock. When the clock edge arrives, each flip-flop samples the input from the previous stage and stores it. Between clock pulses, the outputs remain stable.

Suppose a 4-bit right shift register initially contains:

Q3 Q2 Q1 Q0 = 1 0 1 1

If a new bit 0 is entered at the serial input, then after one clock pulse the data shifts right:

  • Before clock: 1 0 1 1
  • After clock: 0 1 0 1

The bit that was in the last stage moves to the serial output, while the new serial input bit enters the first stage.

This timing-based movement makes shift registers suitable for delay generation. For example, if each flip-flop delays a bit by one clock period, then a 4-stage register delays the input by four clock cycles.


Working / Process

1. Input loading

  • In serial loading, one bit is applied at a time to the first flip-flop.
  • In parallel loading, all bits are applied simultaneously to the input lines of the register.

2. Clock-triggered shifting

  • When a clock pulse occurs, each flip-flop copies the value from the previous stage.
  • The first stage receives the new input bit, while the last stage sends its bit to the output.

3. Output retrieval

  • The stored data can be taken out serially or in parallel depending on the register type.
  • After several clock pulses, the original word may appear in shifted form or be completely transferred to the output.

A simple process example for a 4-bit SIPO register:

  • Input bits arrive as 1, then 0, then 1, then 1
  • After each clock pulse, the bits move through the stages
  • Once all four bits are entered, the parallel outputs show 1011

This process shows how a shift register converts serial input into parallel output.


Advantages / Applications

  • Shift registers simplify serial-to-parallel and parallel-to-serial data conversion, which is very useful in communication systems and digital interfacing.
  • They reduce the number of connecting wires required for data transmission, making circuits simpler and more economical.
  • They are used for delays, temporary storage, sequence generation, and data movement in computers, counters, and signal processing circuits.

Shift registers are also used in:

Data buffering

  • Holding data temporarily before processing or transmission

LED display control

  • Driving multiple LEDs using serial data

Arithmetic operations

  • Performing bit shifting, which can represent multiplication or division by powers of 2 in digital systems

Ring and Johnson counters

  • Special counter designs based on shift register feedback

Communication interfaces

  • Such as UART-related data handling and shift-based transmission systems

Their flexibility makes them essential in many practical digital designs.


Summary

  • A shift register is a chain of flip-flops that stores and shifts binary data with each clock pulse.
  • It can work in serial or parallel forms depending on how data is entered and extracted.
  • Shift registers are widely used for data conversion, storage, delay, and communication tasks.
  • Important terms to remember: flip-flop, clock pulse, serial input, parallel output, SISO, SIPO, PISO, PIPO