2. What is a Shift Register

A shift register is a series of flip flops (usually D-Types), synchronised to the same clock and connected in series (a daisy chain) such that any input signal will propagate down the chain to the last element of the shift register. With positive edge triggered D-Types, at every 'posedge' the data will shift to the next output in the chain.

One of the most common uses of shift registers is to convert between serial and parallel interfaces. An example of this is how data is sent through PCI express lines (serial but at extremely high data rates), and then converted into a parallel bus at the bus destination (a much wider but slower device). The following image shows how the flip flops can be arranged to produce serial in- parallel out. Here the output would be collected once every 8 clock cycles, probably by another set of D-Type flop-flops, but synchronised to a different slower clock.

Another use, which will be used during this laboratory, is the ring buffer, and the pseudo random number generator (PRNG), where the second is an extension of the first. A ring buffer can be considered almost the same as the serial in- parallel out design, except that the input is connected to output, Q, of the last stage. In this way, what ever state the D-type flip-flops are initialised to, will constantly shift around the ring.