All Topics  
Shift register

 
Shift Register

   Email Print
   Bookmark   Link






 

Shift register



 
 
In digital circuit
Digital circuit

Digital electronics are electronics systems that use digital signals. Digital electronics are representations of Boolean algebra and are used in computers, mobile phones, and other consumer products....
s, a shift register is a group of flip flop
Flip-flop (electronics)

In digital circuits, a flip-flop is a term referring to an electronic circuit that has two stable states and thereby is capable of serving as one bit of computer storage....
s set up in a linear fashion which have their inputs and outputs connected together in such a way that the data is shifted down the line when the circuit is activated.

Shift registers can have co parallel
Parallel port

A parallel port is a type of interface found on computers for connecting various peripherals. It is also known as a printer port or Centronics#The interface....
 inputs and outputs, including serial-in, parallel-out (SIPO) and parallel-in, serial-out (PISO) types. There are also types that have both serial and parallel input and types with serial and parallel output.






Discussion
Ask a question about 'Shift register'
Start a new discussion about 'Shift register'
Answer questions from other users
Full Discussion Forum



Recent Posts









Encyclopedia


In digital circuit
Digital circuit

Digital electronics are electronics systems that use digital signals. Digital electronics are representations of Boolean algebra and are used in computers, mobile phones, and other consumer products....
s, a shift register is a group of flip flop
Flip-flop (electronics)

In digital circuits, a flip-flop is a term referring to an electronic circuit that has two stable states and thereby is capable of serving as one bit of computer storage....
s set up in a linear fashion which have their inputs and outputs connected together in such a way that the data is shifted down the line when the circuit is activated.

Shift registers can have co parallel
Parallel port

A parallel port is a type of interface found on computers for connecting various peripherals. It is also known as a printer port or Centronics#The interface....
 inputs and outputs, including serial-in, parallel-out (SIPO) and parallel-in, serial-out (PISO) types. There are also types that have both serial and parallel input and types with serial and parallel output. There are also bi-directional shift registers which allow you to vary the direction of the shift register. The serial input and outputs of a register can also be connected together to create a circular shift register. One could also create multi-dimensional shift registers, which can perform more complex computation.

Serial-in, serial-out


Destructive readout
These are the simplest kind of shift register. The data string is presented at 'Data In', and is shifted right one stage each time 'Data Advance' is brought high. At each advance, the bit on the far left (i.e. 'Data In') is shifted into the first flip-flop
Flip-flop (electronics)

In digital circuits, a flip-flop is a term referring to an electronic circuit that has two stable states and thereby is capable of serving as one bit of computer storage....
's output. The bit on the far right (i.e. 'Data Out') is shifted out and lost.

0 0 0 0
1 0 0 0
1 1 0 0
0 1 1 0
1 0 1 1
0 1 0 1
0 0 1 0
0 0 0 1
0 0 0 0
The data are stored after each flip-flop
Flip-flop (electronics)

In digital circuits, a flip-flop is a term referring to an electronic circuit that has two stable states and thereby is capable of serving as one bit of computer storage....
 on the 'Q' output, so there are four storage 'slots' available in this arrangement, hence it is a 4-Bit Register. To give an idea of the shifting pattern, imagine that the register holds 0000 (so all storage slots are empty). As 'Data In' presents 1,1,0,1,0,0,0,0 (in that order, with a pulse at 'Data Advance' each time. This is called clocking or strobing) to the register, this is the result. The left hand column corresponds to the left-most flip-flop's output pin, and so on.

So the serial output of the entire register is 11010000 . As you can see if we were to continue to input data, we would get exactly what was put in, but offset by four 'Data Advance' cycles. This arrangement is the hardware equivalent of a queue. Also, at any time, the whole register can be set to zero by bringing the reset (R) pins high.

This arrangement performs destructive readout - each datum is lost once it been shifted out of the right-most bit.


Serial-in, parallel-out

This configuration allows conversion from serial to parallel format. Data are input serially, as described in the SISO section above. Once the data has been input, it may be either read off at each output simultaneously, or it can be shifted out and replaced.




Parallel-in, serial-out

This configuration has the data input on lines D1 through D4 in parallel format. To write the data to the register, the Write/Shift control line must be held LOW. To shift the data, the W/S control line is brought HIGH and the registers are clocked. The arrangement now acts as a SISO shift register, with D1 as the Data Input. However, as long as the number of clock cycles is not more than the length of the data-string, the Data Output, Q, will be the parallel data read off in order.

The animation below shows the write/shift sequence, including the internal state of the shift register.

4 Bit Piso Shift Register Seq



Uses

One of the most common uses of a shift register is to convert between serial and parallel interfaces. This is useful as many circuits work on groups of bits in parallel, but serial interfaces are simpler to construct. Shift registers can be used as simple delay circuits. Several bi-directional shift registers could also be connected in parallel for a hardware implementation of a stack
Stack (data structure)

In computer science, a stack is an abstract data type and data structure based on the principle of LIFO . Stacks are used extensively at every level of a modern computer system....
.

Shift registers can be used also as a pulse extenders. Compared to monostable multivibrators the timing has no dependency on component values, however requires external clock and the timing accuracy is limited by a granularity of this clock. Example - Ronja Twister, where five 74164 shift registers create the core of the timing logic this way ().

In early computers, shift registers were used to handle data processing: two numbers to be added were stored in two shift registers and clocked out into an arithmetic and logic unit (ALU) with the result being fed back to the input of one of the shift registers (the Accumulator) which was one bit longer since binary addition can only result in an answer that is the same size or one bit longer.

Many computer languages include instructions to 'shift right' and 'shift left' the data in a register, effectively dividing by two or multiplying by two for each place shifted.

Very large serial-in serial-out shift registers (thousands of bits in size) were used in a similar manner to the earlier delay line memory
Delay line memory

Delay line memory was a form of computer memory used on some of the earliest digital computers. Like many modern forms of electronic computer memory, delay line memory was a memory refresh, but as opposed to modern random access memory, delay line memory was Sequential_access....
 in some devices built in the early 1970s.

History

One of the first known examples of a shift register was in the Colossus
Colossus computer

The Colossus machines were electronics computing devices used by British Cryptanalysis to read encrypted Nazi Germany messages during World War II....
, a code-breaking machine of the 1940s. It was a five-stage device built of vacuum tube
Vacuum tube

In electronics, a vacuum tube, electron tube , thermionic valve, or just valve is a device used to amplifier, switch, otherwise modify, or create an Electricity signal by controlling the movement of electrons in a low-pressure space....
s and thyratron
Thyratron

A thyratron is a type of gas filled tube used as a high energy electrical switch and controlled rectifier. Triode, tetrode and pentode variations of the thyratron have been manufactured in the past, though most are of the triode design....
s.

External links

  • at AllAboutCircuits.com


See also

  • linear feedback shift register
    Linear feedback shift register

    A linear feedback shift register is a shift register whose input bit is a Linear transformation function of its previous state.The only linear functions of single bits are xor and inverse-xor; thus it is a shift register whose input bit is driven by the exclusive-or of some bits of the overall shift register value....
     (LFSR)
  • Ring counter
    Ring counter

    A ring counter is a type of counter composed of a circular shift register. The output of the last shift register is fed to the input of the first register....
  • Serial Peripheral Interface Bus
    Serial Peripheral Interface Bus

    The Serial Peripheral Interface Bus or SPI bus is a synchronous Serial communications standard named by Motorola that operates in full duplex mode....