SlideShare a Scribd company logo
1 of 16
Download to read offline
ENGIN 112
                  Intro to Electrical and Computer
                             Engineering
                                                 Lecture 20
                           Sequential Circuits: Flip flops




ENGIN112 L20: Sequential Circuits: Flip flops                 October 20, 2003
Overvie
       w
  ° Latches respond to trigger levels on control inputs
          • Example: If G = 1, input reflected at output

  ° Difficult to precisely time when to store data with
    latches
  ° Flip flips store data on a rising or falling trigger edge.
          • Example: control input transitions from 0 -> 1, data input appears at
            output
          • Data remains stable in the flip flop until until next rising edge.

  ° Different types of flip flops serve different functions
  ° Flip flops can be defined with characteristic functions.




ENGIN112 L20: Sequential Circuits: Flip flops              October 20, 2003
D Latch
                                            S
                   D                             S’
                                                                     Q
                             C

                                                                     Q’

                                           R     R’
                                                S R   C     Q        Q’
             D         C       Q        Q’
                                                0 0   1     Q0       Q0’     Store
             0         1       0        1
             1         1       1        0       0 1   1     0        1       Reset
             X         0       Q0       Q0’     1 0   1     1        0       Set
                                                1 1   1     1        1       Disallowed
                                                X X   0     Q0       Q0’     Store

  ° When C is high, D passes from input to output (Q)

ENGIN112 L20: Sequential Circuits: Flip flops             October 20, 2003
Clocking Event

° What if the output only changed on a C transition?

            Positive edge triggered

                                                         D C Q                  Q’
                            D                   Q
                                                         0   0                  1
           C                                    Q’       1   1                  0
                                                         X 0 Q0                 Q0’




                                    Hi-Lo edge       Lo-Hi edge
ENGIN112 L20: Sequential Circuits: Flip flops                October 20, 2003
Master-Slave D Flip
            Flop
 ° Consider two latches combined together
 ° Only one C value active at a time
 ° Output changes on falling edge of the clock




ENGIN112 L20: Sequential Circuits: Flip flops   October 20, 2003
D
    Flip
 ° Stores a value on the positive edge of C
    -
    Flo
 ° Input changes at other times have no effect on output
    p

                Positive edge triggered

                                                     D C Q               Q’
                                D               Q
                                                     0   0               1
              C                                 Q’   1   1               0
                                                     X 0 Q0              Q0’

            D gets latched to Q on the rising edge of the clock.



ENGIN112 L20: Sequential Circuits: Flip flops         October 20, 2003
Clocked D Flip-Flop

 ° Stores a value on the positive edge of C
 ° Input changes at other times have no effect on output




ENGIN112 L20: Sequential Circuits: Flip flops   October 20, 2003
Positive and Negative Edge D Flip-
   Flop
 ° D flops can be triggered on positive or negative edge
 ° Bubble before Clock (C) input indicates negative edge
   trigger




                              Lo-Hi edge        Hi-Lo edge
ENGIN112 L20: Sequential Circuits: Flip flops       October 20, 2003
Positive Edge-Triggered J-K Flip-Flop




  °Created from D flop                              J K CLK Q Q’
  °J sets                                       0    0   ↑        Q0        Q0’
                                                0    1   ↑        0          1
  °K resets                                     1    0   ↑        1          0
  °J=K=1 -> invert output                       1    1   ↑       TOGGLE

ENGIN112 L20: Sequential Circuits: Flip flops            October 20, 2003
Clocked J-K Flip
       Flop
 ° Two data inputs, J and K
 ° J -> set, K -> reset, if J=K=1 then toggle output




                                                                   Characteristic Table




ENGIN112 L20: Sequential Circuits: Flip flops   October 20, 2003
Positive Edge-Triggered T Flip-Flop




  °Created from D flop
                                                T C            Q         Q’
  °T=0 -> keep current
                                                 0 ↑                Q0        Q0’
  °K resets                                                   TOGGLE
                                                1 ↑
  °T=1 -> invert current

ENGIN112 L20: Sequential Circuits: Flip flops    October 20, 2003
Asynchronous Inputs


• J, K are synchronous inputs
      o Effects on the output are synchronized with the CLK input.
• Asynchronous inputs operate independently of the synchronous
inputs and clock
      o Set the FF to 1/0 states at any time.




 ENGIN112 L20: Sequential Circuits: Flip flops     October 20, 2003
Asynchronous Inputs




ENGIN112 L20: Sequential Circuits: Flip flops   October 20, 2003
Asynchronous Inputs




                                                • Note reset signal (R) for
                                                D flip flop
                                                • If R = 0, the output Q is
                                                cleared
                                                •This event can occur at
                                                any time, regardless of the
                                                value of the CLK




ENGIN112 L20: Sequential Circuits: Flip flops       October 20, 2003
Parallel Data Transfer

 ° Flip flops store outputs from combinational logic
 ° Multiple flops can store a collection of data




ENGIN112 L20: Sequential Circuits: Flip flops   October 20, 2003
Summary


 ° Flip flops are powerful storage elements
         • They can be constructed from gates and latches!

 ° D flip flop is simplest and most widely used
 ° Asynchronous inputs allow for clearing and presetting
   the flip flop output
 ° Multiple flops allow for data storage
         • The basis of computer memory!

 ° Combine storage and logic to make a computation
   circuit
 ° Next time: Analyzing sequential circuits.



ENGIN112 L20: Sequential Circuits: Flip flops       October 20, 2003

More Related Content

What's hot

Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flopShuaib Hotak
 
state diagrams of flip flops
 state diagrams of flip flops state diagrams of flip flops
state diagrams of flip flopsUnsa Shakir
 
Flipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop SlidesFlipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop SlidesSid Rehmani
 
Logic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip FlopsLogic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip FlopsGouda Mando
 
95414579 flip-flop
95414579 flip-flop95414579 flip-flop
95414579 flip-flopKyawthu Koko
 
Aeav 301 lec 19
Aeav 301 lec 19Aeav 301 lec 19
Aeav 301 lec 190mehdi
 
State table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuitState table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuitPreet_patel
 
Understanding Flip Flops
Understanding Flip FlopsUnderstanding Flip Flops
Understanding Flip Flopsgavhays
 
Bcd counter with mode control & parallel load capability
Bcd counter with mode control & parallel load capabilityBcd counter with mode control & parallel load capability
Bcd counter with mode control & parallel load capabilityGaurang Rathod
 
COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSStarlee Lathong
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuitWan Afirah
 
Flip flop conversions
Flip flop conversionsFlip flop conversions
Flip flop conversionsuma jangaman
 
Flip-Flop (Clocked Bistable)
Flip-Flop (Clocked Bistable)Flip-Flop (Clocked Bistable)
Flip-Flop (Clocked Bistable)Aravir Rose
 
Edge Trigged Flip Flops
Edge Trigged Flip FlopsEdge Trigged Flip Flops
Edge Trigged Flip FlopsFaizan Janjua
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsAneeq Malik
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and SynthesisAbhilash Nair
 

What's hot (20)

Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
state diagrams of flip flops
 state diagrams of flip flops state diagrams of flip flops
state diagrams of flip flops
 
Flipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop SlidesFlipflops JK T SR D All FlipFlop Slides
Flipflops JK T SR D All FlipFlop Slides
 
Logic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip FlopsLogic Design - Chapter 6: Flip Flops
Logic Design - Chapter 6: Flip Flops
 
Problemset3 278
Problemset3 278Problemset3 278
Problemset3 278
 
95414579 flip-flop
95414579 flip-flop95414579 flip-flop
95414579 flip-flop
 
Aeav 301 lec 19
Aeav 301 lec 19Aeav 301 lec 19
Aeav 301 lec 19
 
State table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuitState table and characteristic equation for sequential circuit
State table and characteristic equation for sequential circuit
 
Understanding Flip Flops
Understanding Flip FlopsUnderstanding Flip Flops
Understanding Flip Flops
 
Conversion of flip flop
Conversion of flip flopConversion of flip flop
Conversion of flip flop
 
Bcd counter with mode control & parallel load capability
Bcd counter with mode control & parallel load capabilityBcd counter with mode control & parallel load capability
Bcd counter with mode control & parallel load capability
 
COMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPSCOMBINATIONAL CIRCUITS & FLIP FLOPS
COMBINATIONAL CIRCUITS & FLIP FLOPS
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuit
 
Flip flop conversions
Flip flop conversionsFlip flop conversions
Flip flop conversions
 
D flip Flop
D flip FlopD flip Flop
D flip Flop
 
Flip-Flop (Clocked Bistable)
Flip-Flop (Clocked Bistable)Flip-Flop (Clocked Bistable)
Flip-Flop (Clocked Bistable)
 
D Flip Flop
D Flip Flop D Flip Flop
D Flip Flop
 
Edge Trigged Flip Flops
Edge Trigged Flip FlopsEdge Trigged Flip Flops
Edge Trigged Flip Flops
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
State Machine Design and Synthesis
State Machine Design and SynthesisState Machine Design and Synthesis
State Machine Design and Synthesis
 

Similar to Lect20 Engin112

Similar to Lect20 Engin112 (20)

Lect19 Engin112
Lect19 Engin112Lect19 Engin112
Lect19 Engin112
 
Lect21 Engin112
Lect21 Engin112Lect21 Engin112
Lect21 Engin112
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Cs1104 11
Cs1104 11Cs1104 11
Cs1104 11
 
lec7.ppt
lec7.pptlec7.ppt
lec7.ppt
 
best slides latches.pdf
best slides latches.pdfbest slides latches.pdf
best slides latches.pdf
 
08 Latches and Flipflops.pdf
08 Latches and Flipflops.pdf08 Latches and Flipflops.pdf
08 Latches and Flipflops.pdf
 
Types of flip flops ppt
Types of flip flops pptTypes of flip flops ppt
Types of flip flops ppt
 
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
 
Flip flop slide
Flip flop slideFlip flop slide
Flip flop slide
 
latchesandflipflops.ppt
latchesandflipflops.pptlatchesandflipflops.ppt
latchesandflipflops.ppt
 
flip-flop1.ppt
flip-flop1.pptflip-flop1.ppt
flip-flop1.ppt
 
Flip flops
Flip flopsFlip flops
Flip flops
 
Flip flops
Flip flopsFlip flops
Flip flops
 
10529144.ppt
10529144.ppt10529144.ppt
10529144.ppt
 
Latches and flip flops
Latches and flip flopsLatches and flip flops
Latches and flip flops
 
unit3.ppt
unit3.pptunit3.ppt
unit3.ppt
 
Memory elements
Memory elementsMemory elements
Memory elements
 
5.8 Integrated circuits
5.8 Integrated circuits5.8 Integrated circuits
5.8 Integrated circuits
 
Flip flops & registers
Flip flops & registersFlip flops & registers
Flip flops & registers
 

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
 

Lect20 Engin112

  • 1. ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip flops ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 2. Overvie w ° Latches respond to trigger levels on control inputs • Example: If G = 1, input reflected at output ° Difficult to precisely time when to store data with latches ° Flip flips store data on a rising or falling trigger edge. • Example: control input transitions from 0 -> 1, data input appears at output • Data remains stable in the flip flop until until next rising edge. ° Different types of flip flops serve different functions ° Flip flops can be defined with characteristic functions. ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 3. D Latch S D S’ Q C Q’ R R’ S R C Q Q’ D C Q Q’ 0 0 1 Q0 Q0’ Store 0 1 0 1 1 1 1 0 0 1 1 0 1 Reset X 0 Q0 Q0’ 1 0 1 1 0 Set 1 1 1 1 1 Disallowed X X 0 Q0 Q0’ Store ° When C is high, D passes from input to output (Q) ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 4. Clocking Event ° What if the output only changed on a C transition? Positive edge triggered D C Q Q’ D Q 0 0 1 C Q’ 1 1 0 X 0 Q0 Q0’ Hi-Lo edge Lo-Hi edge ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 5. Master-Slave D Flip Flop ° Consider two latches combined together ° Only one C value active at a time ° Output changes on falling edge of the clock ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 6. D Flip ° Stores a value on the positive edge of C - Flo ° Input changes at other times have no effect on output p Positive edge triggered D C Q Q’ D Q 0 0 1 C Q’ 1 1 0 X 0 Q0 Q0’ D gets latched to Q on the rising edge of the clock. ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 7. Clocked D Flip-Flop ° Stores a value on the positive edge of C ° Input changes at other times have no effect on output ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 8. Positive and Negative Edge D Flip- Flop ° D flops can be triggered on positive or negative edge ° Bubble before Clock (C) input indicates negative edge trigger Lo-Hi edge Hi-Lo edge ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 9. Positive Edge-Triggered J-K Flip-Flop °Created from D flop J K CLK Q Q’ °J sets 0 0 ↑ Q0 Q0’ 0 1 ↑ 0 1 °K resets 1 0 ↑ 1 0 °J=K=1 -> invert output 1 1 ↑ TOGGLE ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 10. Clocked J-K Flip Flop ° Two data inputs, J and K ° J -> set, K -> reset, if J=K=1 then toggle output Characteristic Table ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 11. Positive Edge-Triggered T Flip-Flop °Created from D flop T C Q Q’ °T=0 -> keep current 0 ↑ Q0 Q0’ °K resets TOGGLE 1 ↑ °T=1 -> invert current ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 12. Asynchronous Inputs • J, K are synchronous inputs o Effects on the output are synchronized with the CLK input. • Asynchronous inputs operate independently of the synchronous inputs and clock o Set the FF to 1/0 states at any time. ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 13. Asynchronous Inputs ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 14. Asynchronous Inputs • Note reset signal (R) for D flip flop • If R = 0, the output Q is cleared •This event can occur at any time, regardless of the value of the CLK ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 15. Parallel Data Transfer ° Flip flops store outputs from combinational logic ° Multiple flops can store a collection of data ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003
  • 16. Summary ° Flip flops are powerful storage elements • They can be constructed from gates and latches! ° D flip flop is simplest and most widely used ° Asynchronous inputs allow for clearing and presetting the flip flop output ° Multiple flops allow for data storage • The basis of computer memory! ° Combine storage and logic to make a computation circuit ° Next time: Analyzing sequential circuits. ENGIN112 L20: Sequential Circuits: Flip flops October 20, 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.