# Bidirectional Shift Register

**Bidirectional shift registers**are the storage devices which are capable of shifting the data either right or left depending on the mode selected. Figure 1 shows an n-bit bidirectional shift register with serial data loading and retrieval capacity. Initially all the flip-flops in the register are reset by driving their clear pins high. Next R/LÌ… control line is made either low or high in order to opt for either left-shift or right-shift of the data bits, respectively. Now if R/L̅ = 1, then A

_{1}gates of all the combinational circuits get activated while the A

_{2}gates will get disabled at the same time. Due to this, the outputs of each flip-flop appear at the inputs of the very-next flip-flop via OR gate output (except for the last flip-flop FFn).

For example, Q_{1} appears at D_{2} via the output of OR gate 1 (O_{1}), Q_{2} appears at D_{3} via the output of OR gate 2 (O_{2}), … and Q_{n-1} appears at D_{n} via the output of OR gate 1 (O_{n}) (red lines). At this instant if the positive edge of the clock pulse appears, then the outputs of the respective flip-flops reflect their inputs. Thus Q_{1} = D_{1}, Q_{2} = Q_{1},… and Q_{n} = Q_{n-1}. This is nothing but right-shift of the data by a single bit within the register. Following on the same grounds, one can note that for every rising edge of the clock, the data within the register shifts right by a single bit as long as R/L̅ remains high.
On the other hand, if R/L̅ goes low, then A_{2} gates of the combinational circuits get enabled while A_{1} gates get deactivated. This causes the outputs of each flip-flop to appear at the input pins of the very-previous flip-flop through their OR gate outputs (except the first flip-flop, FF_{1}). For example, Q_{n} appears at D_{n-1} through the output of OR gate n-1 (O_{n-1}), … Q_{3} appears at D_{2} via the output of OR gate 2 (O_{2}), and Q_{2} appears at D_{1} via the output of OR gate 1 (O_{1}). These input bits are latched onto their respective output pins as soon as the leading edge of the clock pulse appears and thus Q_{n-1} = Q_{n}, …Q_{2} = Q_{3} and Q_{1} = Q_{2} (green lines). This means that for every clock tick, the data within the register moves left by one bit, provided R/L̅ line is zero.

The working of such bidirectional register can be summarized as in Table I and can be further explained by the output wave forms shown by Figure 2.

Closely Related Articles Latches and Flip FlopsS R Flip Flop S R LatchActive Low S R Latch and Flip FlopGated S R Latches or Clocked S R Flip FlopsD Flip Flop or D LatchJ K Flip FlopMaster Slave Flip FlopRead Only Memory | ROMProgrammable Logic DevicesProgrammable Array LogicApplication of Flip FlopsShift RegistersBuffer Register and Controlled Buffer RegisterData Transfer in Shift RegistersSerial In Serial Out (SISO) Shift RegisterSerial in Parallel Out (SIPO) Shift RegisterParallel in Serial Out (PISO) Shift RegisterParallel in Parallel Out (PIPO) Shift RegisterUniversal Shift RegistersDynamic Shift RegisterUninterruptible Power Supply | UPSConversion of Flip FlopsMore Related Articles Digital ElectronicsBoolean Algebra Theorems and Laws of Boolean AlgebraDe Morgan Theorem and Demorgans LawsTruth Tables for Digital LogicBinary Arithmetic Binary AdditionBinary SubtractionSimplifying Boolean Expression using K MapBinary DivisionExcess 3 Code Addition and SubtractionK Map or Karnaugh MapSwitching Algebra or Boolean AlgebraBinary MultiplicationParallel SubtractorBinary Adder Half and Full AdderBinary SubstractorSeven Segment DisplayBinary to Gray Code Converter and Grey to Binary Code ConverterBinary to BCD Code ConverterAnalog to Digital ConverterDigital Encoder or Binary EncoderBinary DecoderBasic Digital CounterDigital ComparatorBCD to Seven Segment DecoderParallel AdderParallel Adder or SubtractorMultiplexerDemultiplexerOR Operation | Logical OR OperationAND Operation | Logical AND OperationLogical OR GateLogical AND GateNOT GateUniversal Gate | NAND and NOR Gate as Universal GateNAND GateDiode and Transistor NAND Gate or DTL NAND Gate and NAND Gate ICsX OR Gate and X NOR GateTransistor Transistor Logic or TTLNOR GateFan out of Logic GatesINHIBIT GateNMOS Logic and PMOS LogicSchmitt GatesLogic Families Significance and Types of Logic FamiliesBinary Number System | Binary to Decimal and Decimal to Binary ConversionBinary to Decimal and Decimal to Binary ConversionBCD or Binary Coded Decimal | BCD Conversion Addition SubtractionBinary to Octal and Octal to Binary ConversionOctal to Decimal and Decimal to Octal ConversionBinary to Hexadecimal and Hex to Binary ConversionHexadecimal to Decimal and Decimal to Hexadecimal ConversionGray Code | Binary to Gray Code and that to Binary ConversionOctal Number SystemDigital Logic Gates2′s Complement1′s ComplementASCII CodeHamming Code2s Complement ArithmeticError Detection and Correction Codes9s complement and 10s complement | SubtractionSome Common Applications of Logic GatesKeyboard EncoderAlphanumeric codes | ASCII code | EBCDIC code | UNICODENew Articles Voltage SensorFlow MeasurementVoltage in ParallelVoltage in SeriesVoltage Regulator 7805How to Use a Digital Multimeter?