• Best of luck to the class of 2024 for their HSC exams. You got this!
    Let us know your thoughts on the HSC exams here
  • YOU can help the next generation of students in the community!
    Share your trial papers and notes on our Notes & Resources page
MedVision ad

can someone explain flip flops to me (1 Viewer)

cyrax83

discrete is killing me :(
Joined
Nov 18, 2002
Messages
376
Gender
Male
HSC
2003
i've read books on flip flops but still dont get it :(

i dont see how one input of one gate can be the output of another gate. :confused:

because it just depends which gate you do first ? god there so confusing .. can someone please help me and clarify them ..
 

wogboy

Terminator
Joined
Sep 2, 2002
Messages
653
Location
Sydney
Gender
Male
HSC
2002
An RS flip flop stores 1 bit (high or low) of data. The RS flip flop (also called an RS latch). The best way to understand a flip flop is to look at it step by step.

Have a look at the attached schematic diagram for an RS latch.

If the R input is 1 (high) and the S input is 0 (low), then you can see that Q becomes 0 (because {1 NOR anything} is 0, right?). Also Q' becomes 1, since it is the complement of Q. Why is it the compliment of Q? Because Q feeds into another NOR gate, along with S which is 0. And {0 NOR anything}, is actually {NOT anything} right? So that's why the bottom output is the complement (i.e. the negation) of the top.

If the R input is 0 (low) and the S input is 1 (high), then the exact opposite occurs Q' is 0 and Q is 1 (with similar reasoning as above).

So what happens if BOTH R & S are zero? Well Q and Q' remain unchanged from whatever they were before. Why is this? Because when R and S are zero, the top NOR gate turns into an inverter ({0 NOR anything} is {NOT anything} remember). So whatever Q was, that value gets inverted and sent down to Q'. Also whatever Q' was, that value will get inverted and sent to Q. This process goes on in an infinite cycle while R and S are zero, so this is why Q and Q' themselves remain unchanged,

What about when R and S are both 1? Well then both Q and Q' are both forced to 0 (Q and Q' are no longer complements of each other!). This is not something you want to happen when designing a logic circuit. Setting either one of R or S (but not both) to 1 will fix this situation, and will cause the flip flop to start working again properly. If R and S are both set to 0 now, you're in big trouble. Q and Q' start oscillating very fast and crazily for a short while. Don't worry about this though, because I don't think it is in the HSC SDD syllabus and you won't have to learn it unless you do EE at uni ;)
 

JRasnier

Member
Joined
Apr 24, 2003
Messages
416
each gate is done at the same time, if a totally different number is being processed, it is done separetly it has its own circuit...
 

SamD

Member
Joined
Jul 21, 2002
Messages
256
Gender
Male
HSC
N/A
Truth tables for flip-flops are not easy to comprehend if you look at each set of inputs in isolation. By the way the circuit shown in wogboy's flipflop.gif is really a latch, this is just the data store part of the flip-flop. In reality there are further components to control the change of state (Ch10 of my text attempts to explain these other components).

When working through a flip-flop truth table remember:
- Inputs of 0 0 (in most cases) are the normal resting or holding state for the flip-flop. Therefore, work through other inputs assuming that 0 0 were the previous inputs.
- When one input changes form 0 to 1, it only changes briefly and then returns to 0. For example in an RS latch (or RS flip-flop) S changing to 1 and then back to 0 causes a 1 to be stored and output at Q (and a 0 at Q bar). The reverse occurs (ie 0 at Q and 1 at Q bar) when a 1 is applied briefly to the R input.


HTH
Sam
 

fatmuscle

Active Member
Joined
Jul 6, 2002
Messages
3,707
Location
Hornsby
Gender
Male
HSC
2001
play around with logic gates
there's 2 proggies available here.

I found out by trial and error, mucking around with them and reading what they are helped learn more about them.
 

yorkyorkxp

New Member
Joined
Aug 6, 2003
Messages
8
Flip Flops
One of the more interesting things that you can do with Boolean gates is to create memory with them. If you arrange the gates correctly, they will remember an input value. This simple concept is the basis of RAM (random access memory) in computers, and also makes it possible to create a wide variety of other useful circuits.
Memory relies on a concept called feedback. That is, the output of a gate is fed back into the input. The simplest possible feedback circuit using two inverters is shown below:


If you follow the feedback path, you can see that if Q happens to be 1, it will always be 1. If it happens to be 0, it will always be 0. Since it's nice to be able to control the circuits we create, this one doesn't have much use -- but it does let you see how feedback works.

It turns out that in "real" circuits, you can actually use this sort of simple inverter feedback approach. A more useful feedback circuit using two NAND gates is shown below:



This circuit has two inputs (R and S) and two outputs (Q and Q'). Because of the feedback, its logic table is a little unusual compared to the ones we have seen previously:


R S Q Q'
0 0 Illegal
0 1 1 0
1 0 0 1
1 1 Remembers

What the logic table shows is that:

If R and S are opposites of one another, then Q follows S and Q' is the inverse of Q.
If both R and S are switched to 1 simultaneously, then the circuit remembers what was previously presented on R and S.
There is also the funny illegal state. In this state, R and S both go to 0, which has no value in the memory sense. Because of the illegal state, you normally add a little conditioning logic on the input side to prevent it, as shown here:



In this circuit, there are two inputs (D and E). You can think of D as "Data" and E as "Enable." If E is 1, then Q will follow D. If E changes to 0, however, Q will remember whatever was last seen on D. A circuit that behaves in this way is generally referred to as a flip-flop.

from:http://computer.howstuffworks.com/boolean3.htm
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top