Shift Registers

concept
Computers need to store data, that's pretty obvious. One popular way to do this is to use a device called a shift register. A shift register is a handy little chip that uses latches and/or flip flops internally to let you load in multi-bit data and retrieve it later. A shift register might be loaded serially (one bit at a time until all the bits have a value) or in parallel (load all the bits in one clock pulse). Similarly the data may be retrieved serially or in parallel. So you could keep a number stored in a shift register for use later, or you could feed in some parallel data which is output over a serial line to another part of a circuit. Shift registers are great, in this topic we'll cover a little on how they work and the different combinations of serial and parallel loading and unloading.
fact
A shift register is a device which will store binary data. They can be loaded either in serial or parallel and the data can be retrieved either in serial or parallel. This gives four combinations of data transfer.

Serial In Serial Out Shift Registers

For a serial input serial output shift register a new bit is loaded into the register on each clock pulse while the oldest bit is transferred out, the diagram below shows this operation. So on each clock cycle each data bit moves to the flip flop on its right. This type of shift register can also be used as a delay since for a x-bit shift register it takes x clock cycles for the input to reach the output.

Serial In Parallel Out Shift Registers

The serial input and parallel output shift register loads a new bit on each clock cycle (moving each bit to the flip flop to its right) but allows you to read all of the flip flops' outputs at once (in parallel).

Parallel In Serial Out Shift Registers

The parallel in shift register allows all bits to be loaded simultaneously in one clock cycle. The serial output is the same as in the serial in serial out shift register. A parallel in serial out shift register has an extra input called the SHIFT/\(\overline{\text{LOAD}}\) input. This tells the register whether to read each flip flops' input from the parallel input (when you're loading data in) or from the previous flip flop (when you're outputting serially). When SHIFT/\(\overline{\text{LOAD}}\) is high each data bit moves to the flip flop on its right in order to output serially (0s are fed in on the far left to clear the flip flops after all the data is read out). When SHIFT/\(\overline{\text{LOAD}}\) is low the next clock cycle sets all the flip flops to their respective parallel data input value.

Parallel In Parallel Out Shift Registers

The final configuration is a parallel in and parallel out shift register. This register allows all the bits to be set in parallel on a single clock cycle and also allows reading of all the outputs at once. This is the simplest configuration but requires by far the most wires (in many digital designs the number of wires needs to be kept to a minimum or within some predefined number).
practice problems