a flip-flop or latch is a circuit that has two stable states and can be used to store state information.
Questions tagged [flipflop]
1024 questions
67
votes
9 answers
Difference between latch and flip-flop?
What is the difference between a latch and a flip-flop?
What I am thinking is that a latch is equivalent to a flip-flop since it is used to store bits and is also equivalent to a register which is also used to store data. But after reading some…

ATR
- 1,213
- 2
- 11
- 9
33
votes
8 answers
Why is the output of stateful elements often named Q?
In logic circuit diagrams, I've seen various conventions for naming inputs and outputs of logic gates and combinatorial circuits. However, stateful elements like latches and flip-flops often have their "state" called Q. I suspect there is a…

Gyom
- 585
- 5
- 8
32
votes
4 answers
Why aren't resistors being used in this flip-flop used in static MOS RAM?
In the book, Digital Computer Electronics, there is a diagram on page 140 (figure 9-4 a) of a flip-flop used in static MOS RAM to store a bit. The book says that Q3 and Q4 act like resistors, which leads me to wonder, why aren't normal resistors…

Nitin Singhal
- 423
- 4
- 5
29
votes
6 answers
What is a flip flop?
There seem to be a number of different definitions of flip-flops and latches out there, some of which are contradictory.
The Computer Science text book for the course I teach is probably the most confusing (in fact I have little faith in the book…

Drummy
- 539
- 1
- 7
- 11
24
votes
4 answers
When is using latches better than flip-flops in an FPGA that supports both?
The Question:
When is using latches better than flip-flops in an FPGA that supports both?
Background:
It is a well-known principle that level-sensitive transparent latches should be avoided in FPGAs, and edge-sensitive flip-flops should be used…

wjl
- 1,042
- 1
- 8
- 17
22
votes
9 answers
Make a momentary switch control a toggle
What are the simplest, cheapest, smallest ways to make a momentary switch produce a 2-state toggling output (latching momentary switch)?
In other words, the output is continuously low, and when you momentarily press the button/tact switch, the…

endolith
- 28,494
- 23
- 117
- 181
20
votes
1 answer
What is the meaning of JK flip flop's J and K?
In D flip flop, D means DATA. In SR flip flop, S means SET and R means RESET. What is the meaning of JK flip flop's J and K?

iNdra
- 315
- 3
- 5
- 11
20
votes
5 answers
Why do we clock Flip Flops?
I am trying to understand Flip Flops & Latches. I am reading from Digital Logic book by Morris Mano. One thing I am not able to understand is why we clock flip-flops?
I understand why we need 'enabled' or gated latches. But what’s the use of clock?…

avi
- 605
- 2
- 8
- 13
16
votes
7 answers
Why do cascading D-Flip Flops prevent metastability?
I understand what metastability is but don't understand how linking together flip flops reduces this?
If the output of the first flipflop is metastable, this gets used as input for the second one. But I don't see how the 2nd flip flop will be able…

Wouter A
- 163
- 1
- 7
15
votes
5 answers
How to understand the SR Latch
I can't wrap my head around how the SR Latch works. Seemingly, you plug an input line from R, and another from S, and you are supposed to get results in Q and Q′.
However, both R and S require input from the other's output, and the other's output…

CodyBugstein
- 435
- 2
- 5
- 12
15
votes
4 answers
What is the beginning state for Q in a SR latch?
In this diagram
what would be the beginning state for Q? Since the first NOR for S and R rely on previous results, there must be something for the first iteration?
NOTE:
I'm in a first year digital logic class, so the question is for theoretical…

Marty
- 271
- 2
- 7
13
votes
3 answers
Why is S=1, R=1 state forbidden in RS flip flop?
I have come across the RS flip flop & I have tried implementing that on a simulator & using actual logic gates. But I'm still not sure whether I have correctly understood the unstable or the forbidden case S=1, R=1 in the flip flop. Can anyone tell…

Mohammed Fawzan
- 275
- 1
- 4
- 11
13
votes
4 answers
What does it mean to "gate the clock"?
In my lecture notes I keep reading "do not gate the clock". I tried searching on the Internet, but I'm unable to find the exact meaning of this phrase.

user129048
- 257
- 2
- 6
13
votes
5 answers
SR Flip-Flop: NOR or NAND?
I started studying flip-flops recently and I am stuck at this point:
At some video tutorials, people explain the SR flip-flop like this:
So they use NAND gates, producing a transition table like this:
| t | t+1
| S | R | Q
| 0 | 0 …

pavlos163
- 233
- 1
- 2
- 5
12
votes
2 answers
What is this "flip-flop-like" circuit element from the Apollo Guidance Computer?
I've been trying to condense the pure NOR-gate based Apollo Guidance Computer schematics into a more higher level view of the logic elements and came across this interesting piece:
simulate this circuit – Schematic created using CircuitLab
From…

stix
- 344
- 2
- 10