Registers Digital Logic and Computer Design by Ravinder Nath Rajotiya - October 25, 2023October 25, 20230 Share on Facebook Share Send email Mail Print Print Table of Contents Toggle IntroductionRegister:Types of registers:a) The storage registers:b) The shift registers:Types of shift registers :Serial- in-Serial-Out Shift Register(i) Serial Shift Right register:(ii) Serial Shift Left Operation: Introduction We are all familiar with the word “register”, yes, the same which we use in our schools days. That register is a place we write our day-to-day notes, and these notes get stored permanently in this register. So we define such register as a group of pages used to store characters. This register come in various size, the total capacity in terms of number of characters is calculated as: Capacity = (number of pages) x (number of lines) x (number of characters per line) Register: In computers also information is stored in registers. A register is a collection of storage elements that are used to store or process the binary information. The memory elements used are the flip-flops. Types of registers: Figure-1: Types of registers a) The storage registers: The storage /or the buffer register is the simplest one and its purpose is to store the binary information for later use. The size of the register is known by the number of memory cells/elements used in it. In computer systems, the size of the register depends on the word size of the computer. The typical word size in computer is 8-bit, 16-bit, 32-bit, 64-bit etc. Thus to store a word size of 1-byte(8-bits), a register will have 8 flip-flops, to store 16-bit would require 16 flip-flops and so on. b) The shift registers: The shift registers are basically used for processing the binary information. These types of registers allow data to be processed by shifting in various ways. The shift registers are of the following types. Types of shift registers : Serial in Serial Out Shift Register (SISO) Serial in Parallel Out Shift Register (SIPO) Parallel in Serial out Shift Register (PISO) Parallel in Parallel out Shift Register (PIPO) How the registers process the information: To clarify the above question, we explain the concept of processing using left and right shift. Shift Left: Let us assume that the register already contain some information as Q3Q2Q1Q0=0001. Figure-2: Left and Right Shift Register block diagram Left Shift operation Each time a shift left operation made the contents shift 1-bit to the left and a zero is inserted in from the right. This is graphically represented as shown below: Figure-3: The Left Shift Procedure Let the content of the register be Q3Q2Q1Q0=0001 = decimal 1. 1st Shift Left: Each bit is shifter 1-bit to left as shown in figure, and a zero inserted from right. So the content after 1st left shift become Q3Q2Q1Q0=0010 = decimal 2. 2nd Shift Left: Again each bit is shifter 1-bit to left as shown in figure, and a zero inserted from right. So the content after 1st left shift become Q3Q2Q1Q0=0100 = decimal 4. Thus we find that each time the content of the register is shifted left, the content get multiplied by binary 2. Right Shift operation: In this type of operation each bit of the register is shifted right. Let us consider the following example. Figure-4: Right Shift Procedure Let the content of the register be Q3Q2Q1Q0=1000 = decimal 8. 1st Shift Right: Each bit is shifter 1-bit to the right as shown in figure, and a zero inserted from the left. So the content after 1st right shift become Q3Q2Q1Q0=0100 = decimal 4. 2nd Shift Right: Again each bit is shifted 1-bit to the right as shown in figure, and a zero inserted from the left. So the content after 2nd right shift become Q3Q2Q1Q0=0010 = decimal 2. Thus we find that each time the content of the register is shifted to the right, the content get divided by binary 2. So initially if the content is decimal 8 (1000), after 1st right shift the output of register become decimal 4 (0100) and after 2nd right shift the content become decimal 2 (0010). **So we see that shifting of the content of the register left or right means multiplication or division by binary 2. This simply means shift register are used to process the binary information. Serial- in-Serial-Out Shift Register These registers are used to shift the information through the register serially left or right. Generally D flip-flop are used as part of such type of registers. The information to be shifted left or right is always controlled. That is shift operation take place when the shift pulse is active. (i) Serial Shift Right register: Figure-5 shows the cascading of four D flip-flops. Serial input 1101 is connected at the leftmost D flip-flop, and all the FF are connected to a common clock, thus forming a synchronous sequential four bit register. Figure 5: Shift Right Register The shift right register with the given input operates as shown in the following table. Clock input Serial input Output Q0 Q1 Q2 Q3 1101 0 0 0 0 1st Clock 110 1 0 0 0 2nd Clock 11 0 1 0 0 3rd Clock 1 1 0 1 0 4th Clock – 1 1 0 1 Assuming that all the flip-flops are initially in clear state. With 1101 applied at D input: When 1st clock pulse arrives the LSB of of 1101 i.e. ‘1’ get shifted at the output of 1st D-FF i.e. Q0=1. And Q0,Q1,Q2,Q3= 1000 When 2nd clock pulse arrives, input to 1st FF is 0, and the Q0=1 acts as input to 2nd D-FF, So Q0 will become 0 and Q1 will become 1, i.e. Q0,Q1,Q2,Q3= 0100. When the 3rd clock pulse arrives, input are D0=1, D1=0, and D2=1. Thus at the 3rd clock pulse the output will be Q0,Q1,Q2,Q3= 1010. When 4th clock pulse arrives, input are D0=1, D1=1, D2=0, D3=1 and when the 4th clock pulse strike the clock input of Ffs, the output will be Q0,Q1,Q2,Q3= 1101. The above operation of a 4-bit shift right register is also shown using waveform below: Figure 6: serial right shift waveform (ii) Serial Shift Left Operation: The serial left shift operation is similarly achieved. Here the data input is fed to the D input of right most FF. Output of right most FF is fed as input to the next FF towards left and so on. The shift left register is shown in figure-8. Figure-7: Shift Right Register Share on Facebook Share Send email Mail Print Print