SlideShare a Scribd company logo
1 of 17
ENGIN 112
                 Intro to Electrical and Computer
                            Engineering
                                  Lecture 26

                                Shift Registers




ENGIN112 L26: Shift Registers                     November 3, 2003
Overvie
       w
  ° Multiple flip flops can be combined to form a data
    register
  ° Shift registers allow data to be transported one bit at a
    time
  ° Registers also allow for parallel transfer
          • Many bits transferred at the same time

  ° Shift registers can be used with adders to build
    arithmetic units
  ° Remember: most digital hardware can be built from
    combinational logic (and, or, invert) and flip flops
          • Basic components of most computers




ENGIN112 L26: Shift Registers                        November 3, 2003
Reg
      iste
     °rRegister: Group of Flip-Flops
      with
     °Par D Flip-Flops
       Ex:
      allel
     °Loa
       Holds a Word (Nibble) of Data
     °dLoads in Parallel on Clock
       Transition
     ° Asynchronous Clear (Reset)




ENGIN112 L26: Shift Registers          November 3, 2003
Reg
      iste
     °r Load Control = 1
      with
         •
      Loa New data loaded
           on next positive
      d clock edge
      Con
     °trol Control = 0
       Load
             • Old data reloaded
               on next positive
               clock edge




ENGIN112 L26: Shift Registers      November 3, 2003
Shif
      t
     °Reg
       Cascade chain of Flip-Flops
      iste
     °rs
       Bits travel on Clock edges
     ° Serial in – Serial out, can also have parallel load /
       read




ENGIN112 L26: Shift Registers              November 3, 2003
Parallel Data
   Transfer
   ° All data transfers on rising clock edge
    ° Data clocked into register Y




ENGIN112 L26: Shift Registers           November 3, 2003
Par
      allel
      ver
    ° sus communications is defined as
      Serial
      Seri
         • Provides a binary number as a sequence of binary digits, one
      al after another, through one data line.


    ° Parallel communications
            • Provides a binary number through multiple data lines at the
              same time.




ENGIN112 L26: Shift Registers                         November 3, 2003
Shif
      t
     °regi
       Parallel-to-serial conversion for serial transmission
      ster
      app
      licat
      ion
                                                         parallel outputs




                    parallel inputs



                                      serial transmission




ENGIN112 L26: Shift Registers                       November 3, 2003
Seri
      al
    ° Data transfer one bit at a time
      Tra
    ° nsf loopback for register A
      Data
      er

       Time       Reg A         Reg B
         T0        1011         0011
         T1        1101         1001
         T2        1110         1100
         T3        0111         0110
         T4        1011         1011




ENGIN112 L26: Shift Registers           November 3, 2003
Serial Transfer of
       Data
     ° Transfer from register X to register Y (negative
       clock edges for this example)




ENGIN112 L26: Shift Registers            November 3, 2003
Patt
     ern
   ° Combinational function of input samples
     recin this case, recognizing the pattern 1001 on the single input
       •
     ogn signal
     izer
                                                                                 OUT




                                OUT1          OUT2       OUT3             OUT4

        IN             D Q          D Q         D Q        D Q
      CLK

 Clk                      IN OUT1 OUT2 OUT3 OUT4 OUT
 Before
      1                     1   0         0          0    0              0
      2                     0   1         0          0    0              0
      3                     0   0         1          0    0              0
      4                     1   0         0          1    0              0
      5                     0   1         0          0    1              1
ENGIN112 L26: Shift Registers                                 November 3, 2003
Seri
      al
     °Add
        Slower than
      itio
        parallel
      n (D
     °Flip cost
        Low
      -
     °Flo
        Share fast
        hardware on
      p)slow data

     ° Good for
       multiplexed
       data




ENGIN112 L26: Shift Registers   November 3, 2003
Seri
   al
   Add
° Only one full
   itio
  adder
   n (D
° Reused for
   Flip
  each bit
   -
   Flo
° Start with low-
   p)
  order bit
  addition
° Note that carry
  (Q) is saved
° Add multiple
  values.
      • New values
        placed in shift
        register B


ENGIN112 L26: Shift Registers   November 3, 2003
Seri
   al
   Add
° Shift control
   itio
  used to stop
   n (D
  addition
   Flip
° Generally not a
   -
  good idea to
   Flo
  gate the clock
   p)
° Shift register
  can be
  arbitrary length
° FA can be built
  from combin.
  logic




ENGIN112 L26: Shift Registers   November 3, 2003
Uni
       ver
     ° sal
        Clear
       Shif
     ° Clock
       t
     ° Reg
        Shift
       iste Right
           •
       r • Left
     ° Load
     ° Read
     ° Control




ENGIN112 L26: Shift Registers   November 3, 2003
Design of Universal Shift
    Register
° Consider one of the four
  flip-flops                        clear   s0     s1      new value
        • new value at next clock   1       –      –       0
                                    0       0      0       output
          cycle:                    0       0      1       output value of FF to left (shift right)
                                    0       1      0       output value of FF to right (shift left)
° Note slightly different           0       1      1       input
  than Mano version                                             Q[N]
  (Clear)                                                            Nth cell
                                             to N-1th                            to N+1th
                                                   cell          Q               cell
                                                                 D
                                                                                 CLK



                                                                                 CLEAR

                                                                     0 1 2 3 s0 and s1
                                                                             control mux
                                                 Q[N-1]                              Q[N+1]
                                                  (left)              Input[N]       (right)
ENGIN112 L26: Shift Registers                           November 3, 2003
Summary

  ° Shift registers can be combined together to allow for
    data transfer
  ° Serial transfer used in modems and computer
    peripherals (e.g. mouse)
  ° D flip flops allow for a simple design
          • Data clocked in during clock transition (rising or falling edge)

  ° Serial addition takes less chip area but is slow
  ° Universal shift register allows for many operations
          • The register is programmable.
          • It allows for different operations at different times

  ° Next time: counters (circuits that count!)


ENGIN112 L26: Shift Registers                            November 3, 2003

More Related Content

What's hot (20)

Johnson counter
Johnson counterJohnson counter
Johnson counter
 
latches
 latches latches
latches
 
12 latches
12 latches12 latches
12 latches
 
Johnson Counter
Johnson CounterJohnson Counter
Johnson Counter
 
Digital logic circuit
Digital logic circuitDigital logic circuit
Digital logic circuit
 
Flip flop
Flip flopFlip flop
Flip flop
 
Sr Latch or Flip Flop
Sr Latch or Flip FlopSr Latch or Flip Flop
Sr Latch or Flip Flop
 
8.flip flops and registers
8.flip flops and registers8.flip flops and registers
8.flip flops and registers
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
B sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuitB sc cs i bo-de u-iv sequential circuit
B sc cs i bo-de u-iv sequential circuit
 
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-FlopsFYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
FYBSC IT Digital Electronics Unit IV Chapter II Sequential Circuits- Flip-Flops
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 
Jk flip flop
Jk flip flopJk flip flop
Jk flip flop
 
Lecture 5 Synchronous Sequential Logic
Lecture 5 Synchronous Sequential LogicLecture 5 Synchronous Sequential Logic
Lecture 5 Synchronous Sequential Logic
 
Latches & flip flop
Latches & flip flopLatches & flip flop
Latches & flip flop
 
Flip-Flop (Clocked Bistable)
Flip-Flop (Clocked Bistable)Flip-Flop (Clocked Bistable)
Flip-Flop (Clocked Bistable)
 
Cs1104 11
Cs1104 11Cs1104 11
Cs1104 11
 

Viewers also liked

Viewers also liked (10)

PLC basic concepts
PLC  basic conceptsPLC  basic concepts
PLC basic concepts
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
B sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registersB sc cs i bo-de u-iii counters & registers
B sc cs i bo-de u-iii counters & registers
 
Digital electronics - Basics
Digital electronics - BasicsDigital electronics - Basics
Digital electronics - Basics
 
Basics of digital electronics
Basics of digital electronicsBasics of digital electronics
Basics of digital electronics
 
Shift registers
Shift registersShift registers
Shift registers
 
PLC - Programmable Logic Controller
PLC - Programmable Logic ControllerPLC - Programmable Logic Controller
PLC - Programmable Logic Controller
 
Overview of Shift register and applications
Overview of Shift register and applicationsOverview of Shift register and applications
Overview of Shift register and applications
 
PLC Basic
PLC BasicPLC Basic
PLC Basic
 

Similar to Lect26 Engin112 (20)

Lect27 Engin112
Lect27 Engin112Lect27 Engin112
Lect27 Engin112
 
Counter
CounterCounter
Counter
 
17 registers
17 registers17 registers
17 registers
 
Shift registers
Shift registersShift registers
Shift registers
 
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Register
RegisterRegister
Register
 
Flipflop
FlipflopFlipflop
Flipflop
 
Shift register
Shift registerShift register
Shift register
 
Digital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptxDigital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptx
 
Digital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdfDigital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdf
 
Dns module3 p3
Dns module3 p3Dns module3 p3
Dns module3 p3
 
Dns module3 p3_shift registers
Dns module3 p3_shift registersDns module3 p3_shift registers
Dns module3 p3_shift registers
 
Ch2
Ch2Ch2
Ch2
 
L16 digital firing scheme
L16 digital firing schemeL16 digital firing scheme
L16 digital firing scheme
 
DLD4.pdf
DLD4.pdfDLD4.pdf
DLD4.pdf
 
Lect19 Engin112
Lect19 Engin112Lect19 Engin112
Lect19 Engin112
 
Lect20 Engin112
Lect20 Engin112Lect20 Engin112
Lect20 Engin112
 

More from John Williams

Employee job retention
Employee job retentionEmployee job retention
Employee job retentionJohn Williams
 
Mobile cellular-telecommunication-system-revised
Mobile cellular-telecommunication-system-revisedMobile cellular-telecommunication-system-revised
Mobile cellular-telecommunication-system-revisedJohn Williams
 
Microwave engineering jwfiles
Microwave engineering jwfilesMicrowave engineering jwfiles
Microwave engineering jwfilesJohn Williams
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051John Williams
 
Lut optimization for memory based computation
Lut optimization for memory based computationLut optimization for memory based computation
Lut optimization for memory based computationJohn Williams
 
Llr test english_totalquestions
Llr test english_totalquestionsLlr test english_totalquestions
Llr test english_totalquestionsJohn Williams
 
Lecture notes -_microwaves_jwfiles
Lecture notes -_microwaves_jwfilesLecture notes -_microwaves_jwfiles
Lecture notes -_microwaves_jwfilesJohn Williams
 
Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfilteringJohn Williams
 
Image processing9 segmentation(pointslinesedges)
Image processing9 segmentation(pointslinesedges)Image processing9 segmentation(pointslinesedges)
Image processing9 segmentation(pointslinesedges)John Williams
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformationsJohn Williams
 
Image processing3 imageenhancement(histogramprocessing)
Image processing3 imageenhancement(histogramprocessing)Image processing3 imageenhancement(histogramprocessing)
Image processing3 imageenhancement(histogramprocessing)John Williams
 
morphological image processing
morphological image processingmorphological image processing
morphological image processingJohn Williams
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching materialJohn Williams
 
4 things you_cannot_recover
4 things you_cannot_recover4 things you_cannot_recover
4 things you_cannot_recoverJohn Williams
 

More from John Williams (20)

Employee job retention
Employee job retentionEmployee job retention
Employee job retention
 
Moore's law & more
Moore's law & moreMoore's law & more
Moore's law & more
 
Mobile cellular-telecommunication-system-revised
Mobile cellular-telecommunication-system-revisedMobile cellular-telecommunication-system-revised
Mobile cellular-telecommunication-system-revised
 
Mnr
MnrMnr
Mnr
 
Microwave engineering jwfiles
Microwave engineering jwfilesMicrowave engineering jwfiles
Microwave engineering jwfiles
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
Lut optimization for memory based computation
Lut optimization for memory based computationLut optimization for memory based computation
Lut optimization for memory based computation
 
Llr test english_totalquestions
Llr test english_totalquestionsLlr test english_totalquestions
Llr test english_totalquestions
 
Lecture1
Lecture1Lecture1
Lecture1
 
Lecture notes -_microwaves_jwfiles
Lecture notes -_microwaves_jwfilesLecture notes -_microwaves_jwfiles
Lecture notes -_microwaves_jwfiles
 
Image processing spatialfiltering
Image processing spatialfilteringImage processing spatialfiltering
Image processing spatialfiltering
 
Image processing9 segmentation(pointslinesedges)
Image processing9 segmentation(pointslinesedges)Image processing9 segmentation(pointslinesedges)
Image processing9 segmentation(pointslinesedges)
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
 
Image processing3 imageenhancement(histogramprocessing)
Image processing3 imageenhancement(histogramprocessing)Image processing3 imageenhancement(histogramprocessing)
Image processing3 imageenhancement(histogramprocessing)
 
Friday xpress
Friday xpressFriday xpress
Friday xpress
 
Fft
FftFft
Fft
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
An atm with an eye
An atm with an eyeAn atm with an eye
An atm with an eye
 
4 things you_cannot_recover
4 things you_cannot_recover4 things you_cannot_recover
4 things you_cannot_recover
 

Lect26 Engin112

  • 1. ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers ENGIN112 L26: Shift Registers November 3, 2003
  • 2. Overvie w ° Multiple flip flops can be combined to form a data register ° Shift registers allow data to be transported one bit at a time ° Registers also allow for parallel transfer • Many bits transferred at the same time ° Shift registers can be used with adders to build arithmetic units ° Remember: most digital hardware can be built from combinational logic (and, or, invert) and flip flops • Basic components of most computers ENGIN112 L26: Shift Registers November 3, 2003
  • 3. Reg iste °rRegister: Group of Flip-Flops with °Par D Flip-Flops Ex: allel °Loa Holds a Word (Nibble) of Data °dLoads in Parallel on Clock Transition ° Asynchronous Clear (Reset) ENGIN112 L26: Shift Registers November 3, 2003
  • 4. Reg iste °r Load Control = 1 with • Loa New data loaded on next positive d clock edge Con °trol Control = 0 Load • Old data reloaded on next positive clock edge ENGIN112 L26: Shift Registers November 3, 2003
  • 5. Shif t °Reg Cascade chain of Flip-Flops iste °rs Bits travel on Clock edges ° Serial in – Serial out, can also have parallel load / read ENGIN112 L26: Shift Registers November 3, 2003
  • 6. Parallel Data Transfer ° All data transfers on rising clock edge ° Data clocked into register Y ENGIN112 L26: Shift Registers November 3, 2003
  • 7. Par allel ver ° sus communications is defined as Serial Seri • Provides a binary number as a sequence of binary digits, one al after another, through one data line. ° Parallel communications • Provides a binary number through multiple data lines at the same time. ENGIN112 L26: Shift Registers November 3, 2003
  • 8. Shif t °regi Parallel-to-serial conversion for serial transmission ster app licat ion parallel outputs parallel inputs serial transmission ENGIN112 L26: Shift Registers November 3, 2003
  • 9. Seri al ° Data transfer one bit at a time Tra ° nsf loopback for register A Data er Time Reg A Reg B T0 1011 0011 T1 1101 1001 T2 1110 1100 T3 0111 0110 T4 1011 1011 ENGIN112 L26: Shift Registers November 3, 2003
  • 10. Serial Transfer of Data ° Transfer from register X to register Y (negative clock edges for this example) ENGIN112 L26: Shift Registers November 3, 2003
  • 11. Patt ern ° Combinational function of input samples recin this case, recognizing the pattern 1001 on the single input • ogn signal izer OUT OUT1 OUT2 OUT3 OUT4 IN D Q D Q D Q D Q CLK Clk IN OUT1 OUT2 OUT3 OUT4 OUT Before 1 1 0 0 0 0 0 2 0 1 0 0 0 0 3 0 0 1 0 0 0 4 1 0 0 1 0 0 5 0 1 0 0 1 1 ENGIN112 L26: Shift Registers November 3, 2003
  • 12. Seri al °Add Slower than itio parallel n (D °Flip cost Low - °Flo Share fast hardware on p)slow data ° Good for multiplexed data ENGIN112 L26: Shift Registers November 3, 2003
  • 13. Seri al Add ° Only one full itio adder n (D ° Reused for Flip each bit - Flo ° Start with low- p) order bit addition ° Note that carry (Q) is saved ° Add multiple values. • New values placed in shift register B ENGIN112 L26: Shift Registers November 3, 2003
  • 14. Seri al Add ° Shift control itio used to stop n (D addition Flip ° Generally not a - good idea to Flo gate the clock p) ° Shift register can be arbitrary length ° FA can be built from combin. logic ENGIN112 L26: Shift Registers November 3, 2003
  • 15. Uni ver ° sal Clear Shif ° Clock t ° Reg Shift iste Right • r • Left ° Load ° Read ° Control ENGIN112 L26: Shift Registers November 3, 2003
  • 16. Design of Universal Shift Register ° Consider one of the four flip-flops clear s0 s1 new value • new value at next clock 1 – – 0 0 0 0 output cycle: 0 0 1 output value of FF to left (shift right) 0 1 0 output value of FF to right (shift left) ° Note slightly different 0 1 1 input than Mano version Q[N] (Clear) Nth cell to N-1th to N+1th cell Q cell D CLK CLEAR 0 1 2 3 s0 and s1 control mux Q[N-1] Q[N+1] (left) Input[N] (right) ENGIN112 L26: Shift Registers November 3, 2003
  • 17. Summary ° Shift registers can be combined together to allow for data transfer ° Serial transfer used in modems and computer peripherals (e.g. mouse) ° D flip flops allow for a simple design • Data clocked in during clock transition (rising or falling edge) ° Serial addition takes less chip area but is slow ° Universal shift register allows for many operations • The register is programmable. • It allows for different operations at different times ° Next time: counters (circuits that count!) ENGIN112 L26: Shift Registers November 3, 2003

Editor's Notes

  1. Give qualifications of instructors: DAP teaching computer architecture at Berkeley since 1977 Co-athor of textbook used in class Best known for being one of pioneers of RISC currently author of article on future of microprocessors in SciAm Sept 1995 RY took 152 as student, TAed 152,instructor in 152 undergrad and grad work at Berkeley joined NextGen to design fact 80x86 microprocessors one of architects of UltraSPARC fastest SPARC mper shipping this Fall
  2. credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.
  3. credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.