Introduction
A register is a memory storage element. Whenever you save anything on your computer you save them in registers. This means your essays, your pictures, and your favorite music are all stored on your computer as strings of 0s and 1s in microchips called registers. The register itself does not care whether what you are saving is an essay or a picture or music. Some other device in your computer worries about those details. The register just saves everything as 0s and 1s without discrimination.
If you were to look inside a register, what you would essentially find is a chain of flipflops. Thats because the real basic unit of memory in theory is the flipflop. However, because a single flipflop can only store one bit of information, in practice we group flipflops into another unit which we call the register. Its kind of like this: a penny is really the smallest denomination of currency in the United States; however, because a single penny cannot buy anything, we call the dollar the unit of exchange. Similarly, we say the register is what you use to save data on your computer.
Design
Although the essential components inside a register are flipflops, registers typically contain other circuit elements. For instance, the interactive 4–bit parallel access shift register at the top of this page contains four flipflops and four 2–to–1 multiplexers. While the flipflops are what enable the register to store data, the combinational elements determine the type of operations the register performs on the data.
A parallel–access shift register is a unidirectional shift register that is capable of loading and transmitting data in parallel. Here, loading means accepting inputs; transmitting means giving output; and unidirectional means serial data come in one designated direction (i.e. the serial input switch) and move in only one direction (from Q3 down to Q0).
The reason our shift register is able to operate in either of two modes — parallel or serial loading — is because a 2–to–1 multiplexer connects two input lines to a common output line one at a time. See figure 1 below. When the selector switch is ON the value of A is reflected in the output; when the selector switch is OFF the value of Q is reflected in the output. Figure 1 is interactive; so play around with it.
Figure 1:
2-to-1 Multiplexer with input A selected
When the selector switch is OFF, the circuit accomplishes the shifting of the output bits by connecting the output of one D–flipflop to the input of the next multiplexer. When the selector switch is ON, the circuit accomplishes parallel transfer because the values at the input of the multiplexers move to the output of the D–flipflops on the next clock cycle.
This 4–bit parallel–access shift register can be extended to any number of bits by just adding blocks of multiplexers and D–flipflops to the circuit, in accordance with the existing pattern. An important note of caution is that this circuit is not a universal shift register. A universal shift register not only has parallel access but also bidirectional shifting capability; the 4–bit parallel –access shift register, on the other hand, only has unidirectional shifting capability.