forum_image

Discussion Forum

Interative Forum for discussing any query literally to UGC-NET Computer Science, GATE Computer Science and Computer Sciene and Technology in general.

ugc_net image

UGC-NET Computer Science

Correspondence Courses and Test Series to prepare for UGC-NET computer science and applications

GATE image

GATE

MCQs, Lecture Notes, Ebooks for GATE preparation

freestuff image
jobs image

Jobs Newsfeed

Timely information of various Recruitments.

NextPrev

Computer organization Notes

Registers

Register is a group of flip flop with each flip flop capable of storing one bit of information & n bit register is having a group of n flip flop and it can store any binary information of n bits. Also , a register may contain combinational gates that performs some data processing tasks so a register consist of a group of flip flops and gates that effect their working. In this case the flip flop store the binary information and gates control when and how new information is transferred into the registers that are available commercially & the simplest register is one that consist only of flip flop with no external gates. In such circuit the common clock input triggers all the flip flops on the rising edge of each pulse and the binary data available at input is transferred into the register. The transferred of new information in a register is referred as floating the register.
A register is simply a collection of flip-flops taken as an entity. The basic function of a register is to hold information within a digital system so as to make it available to the logic elements during the computing process. However, a register may also have additional capabilities associated with it. Various types of registers are available commercially. The simplest register is one that consists only of flip-flops with no external gates. The following figure shows such a register constructed with four D flip-flops. Let us consider the diagram of 4 bit register:-

Here D’s are the parallel inputs and Q’s are the parallel outputs. The common clock input triggers all the flip-flops on the positive edge of each pulse and binary data available at the four inputs are transferred into the 4-bit register. The four outputs can then be sampled at any time to obtain the binary information stored in the register. The clear input goes to a special terminal in each flip-flop. when this input goes to 0, all flip-flops are set asynchronously. The clear input is useful for clearing the register to all 0’s prior to its clocked operations.

Shift Registers
Registers that are capable of moving information position wise upon the occurrence of a clock signal are called shift registers. They are a group of flip-flops connected in a chain so that the output from one flip-flop becomes the input of the next flip-flop. all the flip-flops are driven by a common clock, and all are set or reset simultaneously. These registers can be categorized based on the manner in which information is entered into and outputted from a register. There are basically two ways in which these transfers are done: Serially or Parallel. When information is transferred in a parallel manner, all the bits that comprise the information are handled simultaneously as an entity in a single unit of time. Such information transfer requires as many lines as number of information bits being transferred. On the other hand, the serial handling of information involves the bit by bit availability of information in a time sequence. These information transfers only require a single line to perform the transfer. Thus, there are four possible ways register can transfer information: Serial-in Serial-out, Serial-in Parallel-out, Parallel-in Serial-out, Parallel-in Parallel-out.
Serial-In, Serial-Out
These are the simplest kind of shift registers. The data string is presented at ‘Data Input’, and is shifted right one stage each time with every clock pulse. At each clock pulse, the bit on the far left(i.e. Data Input) is shifted into the first flip-flop’s output. The bit on the far-right(i.e. Data Output) is shifted out, read there and is eventually lost.
The data is stored in each flip-flop on the ‘Q’ output, so there are four storage ‘slots’ available in this arrangement, hence it is a 4-bit register.
Serial-in Parallel-Out
This configuration allows conversion from serial to parallel format. Data are input serially, as described in the ‘Serial-in, Serial-out’ register. Once the data has been input, it may be either read off at each output simultaneously, or it can be shifted out and replaced. These registers are different in the way the data bits are taken out of these registers. The data from its respective bit positions are available simultaneously. This type of register can be constructed using either D-flip-flops or JK-Flip-flops or Rs Flip-flops. The diagram of a 4-bit serial in parallel out register is shown below:

In this register, data is entered serially in sequence A3, A2, A1, A0. The 4-bit data is available simultaneously in the same clock cycle as Q0Q1Q2Q3. That means once the data is stored; it can be accessed in parallel.
Parallel in Serial out Registers
4-bit parallel in serial out shift register circuit uses four D flip-flops and NAND gates for writing data to the register. D0, D1, D2, D3 are the parallel inputs. Where D0 is the most significant bit and D3 is the least significant bit. To write data in, the mode control line(write/shift) is taken to LOW and the data is clocked in. The data can be shifted when the mode control line is HIGH as SHIFT is active high. The register performs right shift operation on the application of a clock pulse and read out the data serially. It can be constructed using either D-flip-flops or JK-Flip-Flops or RS-Flip-Flops.

Parallel In Parallel out Register
For parallel in - parallel out shift registers, all data bits appear on the parallel outputs immediately following the simultaneous entry of the data bits. The following circuit is a four-bit parallel in - parallel out shift register constructed by D flip-flops.

The D0, D1, D2, D3 are the parallel inputs and the Q3, Q2, Q1, Q0 are the parallel outputs. Once the register is clocked, all the data at the D inputs appear at the corresponding Q outputs simultaneously. . It can be constructed using either D-flip-flops or JK-Flip-Flops or RS-Flip-Flops.
Bidirectional Shift Registers
The shift registers discussed so far involved only right shift operations. Each right shift operation has the effect of successively dividing the binary number by two. If the operation is reversed (left shift), this has the effect of multiplying the number by two. With suitable gating arrangement a serial shift register can perform both operations. A bidirectional, or reversible, shift register is one in which the data can be shift either left or right. A four-bit bidirectional shift register using D flip-flops is shown below.

Here a set of NAND gates are configured as OR gates to select data inputs from the right or left adjacent bistables, as selected by the LEFT/RIGHT control line.
Bi-directional Shift Register with Parallel Load
Bi Directional shift register is capable of shifting its contents either left or right depending upon the signals present on appropriate control input lines. This register is also known as the universal shift register. Depending on the signal values on the select lines of the multiplexers, the registers can retain its current state, shift right, shift left or be loaded in parallel. Each of these operations is the result of the occurrence of a clock pulse.

The register consists of four D Flip-flops. The four multiplexers(MUX) are also part of the register. The four multiplexers have two common control signals S0 and S1. Total four operations are possible in this register as shown in the table below.
S1 S0 Operation 0 0 No Change (A3, A2, A1, A0) 0 1 Shift Right ( SI,A2, A1, A0) 1 0 Shift Left( A3, A2, A1, SI) 1 1 Parallel Load(I3, I2, I1, I0)
1. When S1S0 = 00, the input value at 0 input of multiplexer becomes the output of multiplexer and input to the flip-flop. Since the output of each flip-flop is applied to 0 input of multiplexer. That means output of each flip-flop is applied as input to same flip-flop. that means previous state value is retained in each flip-flop and no change of state occurs.
2. When S1S0 = 01, the serial input(SI) is feed at input 1 of multiplexer 1. A0 is feed at input 1 of multiplexer 2, A1 is feed at input 1 of multiplexer 3, A2 is feed at input 1 of multiplexer 4. That means shift left took place.
3. When S1S0 = 10, the serial input(SI) is feed at input 2 of multiplexer 4. A1 is feed at input 2 of multiplexer 1, A2 is feed at input 2 of multiplexer 2, A3 is feed at input 2 of multiplexer 3. That means shift right took place.
4. When S1S0 = 11, the data is parallel loaded into each flip-flop using input 3 of each multiplexer. Input I0 is feed at input 3 of multiplexer 1. I1 is feed at input 3 of multiplexer 2, I2 is feed at input 3 of multiplexer 3, I3 is feed at input 3 of multiplexer 4. That means the data is parallel loaded into the register.
Applications of Shift Registers
Shift registers can be found in many applications.
To produce time delay
The serial in -serial out shift register can be used as a time delay device. The amount of delay can be controlled by:
1. the number of stages in the register
2. the clock frequency
To simplify combinational logic
The ring counter technique can be effectively utilized to implement synchronous sequential circuits. A major problem in the realization of sequential circuits is the assignment of binary codes to the internal states of the circuit in order to reduce the complexity of circuits required. By assigning one flip-flop to one internal state, it is possible to simplify the combinational logic required to realize the complete sequential circuit. When the circuit is in a particular state, the flip-flop corresponding to that state is set to HIGH and all other flip-flops remain LOW.
To convert serial data to parallel data
A computer or microprocessor-based system commonly requires incoming data to be in parallel format. But frequently, these systems must communicate with external devices that send or receive serial data. So, serial-to-parallel conversion is required. As shown in the previous sections, a serial in - parallel out register can achieve this.
To Implement Hardware Stack
A hardware stack can be implemented by connecting several bi-directional shift registers in parallel.
To Perform Shift left or Shift right operations
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. Bidirectional shift registers can be used to perform ‘shift-right’ and ‘shift-left’ instructions.
To handle data processing
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 results being fed back to the input of one of the shift registers.
Types of register
Register are that media that temporary hold the binary bits. Computers require different register for manipulation of data, temporary storage of data, holding memory address and other conditions. A register is a very small amount of very fast memory that is built into the CPU (central processing unit). Its Contents can be accessed at extremely high speeds. The Registers are used to store data temporarily during the execution of a program. Different processors have different register sizes. Registers are normally measured by the number of bits they can hold, for example, an 8-bit register means it can store 8 bits of data or a 32-bit register means it can store 32 bit of data. Various registers are as bellow:-
1. Data Register
2. Address Register
3. Accumulator
4. Instruction Register
5. Program Counter
6. Temporary Register
7. Input Register
8. Output Register
1. Data Register: - It is used to hold memory operands (data). This register contains the data to be written into memory or receives the data read from memory. The size of data register is 16 bit.
2. Address Register: - This register specifies the address in memory for next read or writes operations. The size of address register is 12 bit.
3. Accumulator: - This register is general purpose register and it is the default register of computer. This register need not to be specified in the instruction. The size of accumulator is 16 bits. It is used to hold the results or partial results of arithmetic and logical operations. An accumulator is a register in which intermediate arithmetic and logic results are stored.
4. Instruction Register: - The purpose of the instruction register is to hold a copy of the instruction which the processor is to execute. In our basic computer, instruction register (IR) holds instruction code which is read from memory. The size of instruction register is 16 bit.
5. Program Counter: - It holds the address of the next instruction to be read from memory after the current execution is executed. The instructions are read sequentially because the program counters automatically increments after fetching the current instruction. This register is used for address sequencing and order of execution of instruction. The size program counter is 12 bit.
6. Temporary Register: - this register is used in addition to data register for storing the data temporarily accessed from memory. The size of temporary register is 16 bits.
7. Input Register: - INPR register receives a character from an input device and delivers it to the AC. The size is 8 bit.
8. Output Register: - The output register receives information from AC and transfer it to the output device. This register is used for holding the data that is to be sending to output devices like printer, monitor etc. It is also having the size of 8 bits register.




You can obtain Printed Copies of this material by making a request at brightways.org@gmail.com with a nominal print charges.

   

Return To Computer organization Topics