Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Registers 
3.
Parallel load registers
3.1.
Load Signal
4.
Shift Registers
5.
Serial Transfer
5.1.
Serial Addition
5.2.
Universal Shift Registers
5.3.
Logical Right Shift Registers
5.4.
Logical Left Shift Registers
5.5.
Arithmetic Right Shift Registers
5.6.
Arithmetic Left Shift Registers
5.7.
Circular Right Shift Registers
5.8.
Circular Left Shift Registers
6.
FAQs
7.
Key Takeaways
Last Updated: Mar 27, 2024

Registers

Author Tanay kumar Deo
2 upvotes

Introduction

Registers are fast memories used to accept, transfer, and store instructions and data that the CPU can immediately use. A Register is often considered a group of flip-flops, with every flip-flop capable of storing only one bit of information. It implies that a register with n flip-flops can store binary data of n-bits.

This article will discuss Registers and their different types, including Parallel load registers and Shift Registers.

Recommended Topic, Microinstruction in Computer Architecture and Difference Between Jfet and Mosfet

Registers 

A Register is a group of flip-flops. Its basic functionality is to hold data within any digital system to make it available to the logic units for the computing process. However, it may also have additional capabilities.

The flip-flops in a register contain the binary data, whereas the logical gates control the data flow, i.e., how and when the data are transferred into the register.

In general, we have two major types of Registers:

  • Parallel Load Registers
  • Shift Registers

 

We will discuss them in the upcoming section. For now, let's see an example of the register (4-bit register):

4 Bit register

We see the block diagram for the 4-bit register in the above figure. We can see it has four different flip-flops with one single clock signal.

Read About - Shift Registers in Digital Electronics

Parallel load registers

Parallel-load registers are a register type where all the individual bit values in the register load simultaneously. To be more specific, every flip-flop in the register takes an external data input, and the information is loaded into the flip-flops on the same edge in the clock cycle.

Let's see an example of a 4-bit parallel load register.

4 Bit Parallel load register

The figure above is the block diagram of a simple 4-bit parallel-load register where,

  • D0, D1, D2, and D3 are individual data bits.
  • Q0, Q1, Q2, and Q3 form the output value (as a 4-bit word Q3Q2Q1Q0).
  • Clock is a single clock signal.

Load Signal

We use a load signal to synchronize the loading of the register's flip-flops if the individual data inputs are not provided simultaneously. When a load signal is set, all the register's flip-flops are loaded with the data inputs provided during the next clock cycle. When the load signal is clear, each flip-flop retains its current value. We may implement this functionality using Multiplexers or MUX.

Let's consider an example of 4-bit parallel load registers with load signal. Its block diagram is as shown below.

4-bit parallel load registers with a load signal

Source: hkn.illinois.edu

In the above figure,

  • D3, D2, D1, and D0 are the individual data bits.
  • Q3, Q2, Q1, and Q0 form the output value (as a 4-bit word Q3Q2Q1Q0).
  • Load is the single load signal, and Clk is a single clock signal.

Shift Registers

Shift Registers can shift the binary data in one or both directions. The logical configuration of the Shift Register consists of a series of flip-flops, with the output of one flip-flop connected with the input of the next flip-flop.

We have six standard configurations in which flip-flops chains to form a shift register: 

  1. Logical right shift.
  2. Logical left shift.
  3. Arithmetic right shift.
  4. Arithmetic left shift.
  5. Circular right shift.
  6. Circular left shift.

Serial Transfer

The shift registers do the serial transfer of data from one register to another. Given below is the block diagram for serial transfer between two registers:

Block diagram for serial transfer

Source: ee.ucl.ac.uk

Let's consider that both the shift registers have four bits each. We must design the control unit that supervises the transfer such that it enables the shift registers, via a shift control signal, for a specific time of four clock pulses.

Must Read hardwired and microprogrammed control unit

Serial Addition

We usually perform operations in digital computers in parallel because of speed requirements. The serial processes are slower, but they need fewer components. 

We may perform n-bit serial addition may by using two shift registers:

Serial addition using two shift registers

Source: ee.ucl.ac.uk

Bits in these two registers are added one pair at a time through only one FA (full adder) circuit. The carry out of the full adder is transferred to a D flip-flop. And the output of this flip-flop is used as the carry input for the next pair of bits.

Universal Shift Registers

A general classification of the shift registers consists of bi-directional shift registers. These registers can shift the contents either right or left depending upon the signals present on the appropriate control input lines. 

The block diagram for a 4-bit universal shift register is given below:

4-bit universal shift register

Source: ee.ucl.ac.uk

Now, let's see the table to understand the register operation based on different input pairs:

S0

S1

Register operation

0 0 No change.
0 1 Right shift.
1 0 Left Shift
1 1 Parallel load.

Logical Right Shift Registers

The logical right shift registers are shift registers where the output of the preceding flip-flop is connected to the input of the next flip-flop. The first flip-flop in the logical right shift register takes in the data input (often set to a logical 0). It executes a logical right shift on the bit string contained in it.

Simple 4-bit logical right shift register

For example, If D3 = 0 and the bit string held in a 4-bit register is 1011, the sequence of bit strings that appear in the register after every clock cycle are 1011, 0101, 0010, 0001, 0000.

Logical Left Shift Registers

The logical left shift registers are shift registers where the input of the preceding flip-flop is connected to the output of the next flip-flop. The last flip-flop in the logical left shift register takes in the data input (often set to a logical 0). It executes a logical left shift on the bit string contained in it.

Simple 4-bit logical left shift register

Source: hkn.illinois.edu

For example, If D0 = 0 and the bit string held in a 4-bit register is 1011, the sequence of bit strings that appear in the register after every clock cycle are 1011, 0110, 1100, 1000, 0000.

Arithmetic Right Shift Registers

The arithmetic right shift registers are shift registers where the input of the next flip-flop is connected to the output of the preceding flip-flop. The first flip-flop in the arithmetic right shift register takes in its own output value to retain its value. We use this to preserve the signs for 2's complement binary values. It executes an arithmetic right shift on the bit string contained in it.

Simple 4-bit arithmetic right shift register

Source: hkn.illinois.edu

For example, If The bit string held in a 4-bit register is 1011, the sequence of bit strings that appear in the register after every clock cycle are 1011, 1101, 1110, 1111, 1111.

Arithmetic Left Shift Registers

The arithmetic left shift registers are simply logical left shift registers with their external inputs set to 0.

Circular Right Shift Registers

The circular right shift registers are shift registers where the input of the next flip-flop is connected to the output of the preceding flip-flop. The output of the last flip-flop is the input for the first flip-flop in the register. This register can execute a circular right shift on the bit string contained in it.

Simple 4-bit circular right shift register

Source: hkn.illinois.edu

For example, If The bit string held in a 4-bit register is 1011, the sequence of bit strings that appear in the register after every clock cycle are 1011, 1101, 1110, 0111, 1011, and so on.

Circular Left Shift Registers

The circular right shift registers are shift registers where the input of the preceding flip-flop is connected to the output of the next flip-flop. The output of the first flip-flop is the input for the last flip-flop in the register. This register can execute a circular left shift on the bit string contained in it.

Simple 4-bit circular left shift register

Source: hkn.illinois.edu

For example, If The bit string held in a 4-bit register is 1011, the sequence of bit strings that appear in the register after every clock cycle are 1011, 0111, 1110, 1101, 1011, and so on.

Also Read - Demultiplexer, microprogrammed control unit

FAQs

  1. What is the simplest register we can have?
    The simplest register we can have is a 1 bit register. This register is simply a single D flip-flop. It can hold a logical value of exactly one bit in length.
     
  2. What is a Shift-Enable Signal?
    We can use a shift-enable signal to enable or disable a register's flip-flops to suit the hardware designer's purposes. Every flip-flop in the register begins to shift for the next clock cycle if the shift-enable signal is set. And if the shift-enable signal is clear, every flip-flop retains its current value (i.e., stop shifting).
     
  3. How to read values from a register?
    We can read values from a register in the following two ways:
    1. Parallel read: It occurs when we read all the outputs simultaneously. It is used in parallel load registers.
    2. Sequential read: It occurs when we read only one bit at a time. It is used in shift registers.

Key Takeaways

In this article, we have extensively discussed the introduction of registers, parallel load registers, and shift load registers.

We hope that this blog has helped you enhance your knowledge regarding different registers and if you would like to learn more, check out our articles on Shift Registers in digital logicIntroduction to Counters, and Counters in Digital Logic. Do upvote our blog to help other ninjas grow. Happy Coding!

Live masterclass