37. Introduction to Registers and Data Storage
A Register is a collection of D Flip-Flops used to store an N-bit binary word. Registers are crucial for the temporary storage of data, instructions, and addresses within a processor.
Basic Register Structure
An N-bit register requires N D Flip-Flops, all clocked simultaneously by a common clock signal.
- Input: $D_{in} (D_{n-1} \dots D_0)$
- Output: $Q (Q_{n-1} \dots Q_0)$
- Control: Clock (CLK) and sometimes Enable/Load signal.
Parallel Load Register
In a parallel load register, all N data bits are transferred from the input ($D$) to the output ($Q$) simultaneously on the active clock edge.
The Role of the Load Signal
To prevent the register from accepting new data on every clock cycle, a 'Load Enable' signal is used. This signal controls the input path to the D FFs.
- If Load = 1, the new input data $D_{in}$ is passed to the D FF inputs.
- If Load = 0, the current output $Q$ is fed back to the D FF inputs, effectively holding the current state (memory function).
Registers form the core storage component of CPU architectures, including the Accumulator, Program Counter, and Instruction Register.