Shift Registers

Parallel: all the bits at the same time.

Serial: one bit at a time.

 

A shift register typically is used to convert between parallel and serial, in one direction or another. Either data is loaded in parallel and shifted out one bit at a time, or it's shifted in one at a time and output in parallel. Some shift registers can do both.

Serial-in Parallel-out

A bit is shifted into the register on each clock pulse. The values that have been shifted in are available on the outputs. Often (but not always) the register will be filled (i.e. 8 bits shifted into an 8-bit register) before the output is used.

The 74164 is a register like this. Instead on a single data input, it has two which are ANDed together internally. The result of that AND is shifted into the register.

It's instructive to look at the internals of this chip. As we see below, it's simply a series of D flip-flops. That change state synchronously, aka they all change state at the same time in response to a common clock signal.

Parallel-in, Serial-out

The 74165 is the other case: parallel in, serial out. Notice it also has the ability to shift serial data in. It accepts 2 clock inputs that are ORed; when either makes the transition from 0 to 1 while the other remains at 0 the register is clocked, the value on Ds is shifted in, while the next value in line is shifted out. When /PL is low the clock is ignored and the values of P0-P7 and loaded into the internal flip-flops. Those values will then get shifted out on the next 8 rising clock edges.

The internal details of the '165 are shown below. Note how the R-S flip-flops are chained Q->S and /Q->R, as well as how the Ds input and it's inverted form are used to drive the R and S of the initial flip-flop. See how the /PL input is used to disable the clock signals by gating them with AND gates. Finally, see how the parallel data is loaded into the flip-flops by utilising their Set and Clear inputs. It's an interesting bit of design. Be glad it's available on a single IC so you don't need to build it each time. This was/is commonly done for useful circuits.

Other configurations

Beyond these two basic types of shift register we get into various combinations of parallel-in, parallel-out, serial-in, and serial-out. Some can shift in both directions. The 74194 is a prime example: a bidirectional universal 4-bit shift register. As expected, it's fairly complex inside. 

The P inputs are used to load parallel data, Q outputs are the parallel outputs. Dsr and Dsl are serial input from the right and left, respectively (allowing easy chaining to build wider shift registers).  Q0 and Q3 double as serial out signals to the right and left, respectively. /MR resets all the states to 0. CP is the rising edge clock. Finally, The S inputs select how the register operates. 

Regardless of which mode is selected, action only happens on the rising edge of CP.

This guide was first published on Apr 20, 2018. It was last updated on Apr 20, 2018. This page (Shift Registers) was last updated on Nov 13, 2019.