Professional Documents
Culture Documents
Registers
Registers hold larger quantities of data than individual flip-flops. Registers are central to the design of modern processors. There are many different kinds of registers. Well show some applications of these special registers. Flip-flops are limited because they can store only one bit. We had to use two flip-flops for our two-bit counter examples. Most computers work with integers and single-precision floating-point numbers that are 32-bits long. A register is an extension of a flip-flop that can store multiple bits. Registers are commonly used as temporary storage in a processor. They are faster and more convenient than main memory. More registers can help speed up complex calculations.
Registers 1.2
Basic registers are easy to build. We can store multiple bits just by putting a bunch of flip-flops together! A 4-bit register internal implementation is below. This register uses D flip-flops, so its easy to store data without worrying about flip-flop input equations. All the flip-flops share a common CLK and CLR signal.
Registers 1.3
Computer and Data Communications Serial and Parallel Communications Multi-bit number storage Sequencing Basic arithmetic such as scaling (a serial shift to the left or right will change the value of a binary number a power of 2) Logical operations
Shift registers
shifts its output once every clock cycle. A shift register
Q0(t+1) = Q1(t+1) = Q2(t+1) = Q3(t+1) = SI Q0(t) Q1(t) Q2(t)
SI is an input that supplies a new bit to shift into the register. For example, if on some positive clock edge we have:
SI = 1 Q0-Q3 = 0110
Shift direction
Q0(t+1) = Q1(t+1) = Q2(t+1) = Q3(t+1) = SI Q0(t) Q1(t) Q2(t)
The circuit and example make it look like the register shifts right.
Present Q0-Q3 ABCD SI X Next Q0-Q3 XABC
But it really depends on your interpretation of the bits. If you consider Q3 to be the most significant bit instead, then the register is shifting in the opposite direction!
Present Q3-Q0 DCBA SI X Next Q3-Q0 CBAX
6 Registers 1.6
Registers
Registers
Basic Shift Register Shift register consist of arrangements of flip-flop and are important in applications involving the storage and transfer of data in a digital system. Serial in/serial out shift registers Serial in/parallel out shift registers Parallel in/serial out shift registers Parallel in/parallel out shift registers Bidirectional shift registers
Registers 1.8
Parallel communications: provides a binary number as binary digits through multiple data lines at the same time.
Shift Registers
Shift Registers are devices that store and move data bits in serial (to the left or the right),
..or in parallel,
Registers 1.11
Configuration
In Shift Registers, the binary digit transfers (shifts) from the output of one flip-flop to the input of the next individual Flip-Flop at every clock edge. Once the binary digits are shifted in, the individual Flip-Flops will each retain a bit, and the whole configuration will retain a binary number.
Construction
Shift registers are constructed from flip-flops due to their characteristics:
Edge-triggered devices Output state retention
D Q Q
D Q Q
D Q Q
10110
10110
Input
D Q Q
D Q Q
D Q Q
Output
4-bit version
Registers 1.17
Registers 1.18
Four Bits (1010) being serially shifted out of the register and replaced by all zeros
Registers 1.19
Output
Output
Output
Input
D Q Q
D Q Q
D Q Q
Registers 1.20
Input
Input
Input
Output
D Q Q
D Q Q
D Q Q
Input
D Q Q
Input
D Q Q
Input
D Q Q
Output
Output
Output
0
0 1 1
0
1 0 1
24 Registers 1.24
JK Shift Registers
J-K Shift registers are seldom used, as two inputs (J,K) are required to load the first flip-flop (note all others receive only set or reset inputs).
Input Input
Output
Registers summary
A register is a special state machine that stores multiple bits of data. Several variations are possible: Parallel loading to store data into the register. Shifting the register contents either left or right. Counters are considered a type of register too! One application of shift registers is converting between serial and parallel data. Most programs need more storage space than registers provide. Well introduce RAM to address this problem. Registers are a central part of modern processors, as we will see in coming weeks.
Registers 1.27