Flip-FLops
What It Does
A flip-flop is a digital circuit that has two stable states and can be used to store a single bit of data.
SR-LATCH (Set, Reset Latch)
S | R | Q | Q' |
---|---|---|---|
0 | 0 | latch | latch |
0 | 1 | 0 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | invalid | invalid |
Clocked SR-LATCH
Clock | S | R | Q | Q' |
---|---|---|---|---|
0 | 0 | 0 | latch | latch |
0 | 0 | 1 | latch | latch |
0 | 1 | 0 | latch | latch |
0 | 1 | 1 | latch | latch |
1 | 0 | 0 | latch | latch |
1 | 0 | 1 | 0 | 1 |
1 | 1 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | 0 |
D-Latch (Data-latch)
CLOCK | DATA | Q | Q' |
---|---|---|---|
UP | 0 | 0 | 1 |
UP | 1 | 1 | 0 |
other | 0 | Latch | Latch |
other | 1 | Latch | Latch |
- A classical positive-edge-triggered D flip-flop
- Please play with the DATA button.
- Notice the DATA value gets copied to when and only when the CLOCK goes from LOW to HIGH. Any other state or state change has no impact on the outputs.
- Notice the bottom output is the inverse of Q (Q').
Flip-FLop: Toggle
A flip-flop can act similar like a basic toggle switch.
- Notice the inverted output is connected back into the data input. By this the DATA input gets the inverse of previous state.
- Please play with both the switch and flip-flop, and notice the similarities.
- Notice you need to click twice to get back to the initial state with both the switch and flip-flop.
Flip-Flop: Memory
A flip-flop can also act like a basic piece of memory.
- Please play with both the switch and flip-flop.
- Notice the left LED immediately "forgets" its state after the switch being released. It has no memory.
- Notice the right LED keeps its state after the switch being released. It remembers.
Memory
A flip-flop can keep its state even after releasing. Therefore it is a basic buidling block for (computer) memory.
Flip-FLop: Divide by 2.
A flip-flop can also act like a clock divider.
Writers note
Please notice this is the same circuit as previous versions. I just wanted to help you understand you probably are already using flip-flop (mechanisms), and why they are so awesome!
- Notice the clock division.
Frequency divider
When you divide a clock signal by two -> you divide the frequency by two -> and you will hear this as an octave lower.
Divide by 2^n.
If you daisy chain multiple flip-flops you keep dividing by two.
Shift Register.
A data copy device .... shift register
- Please press the DATA button for a brief moment.
- Notice that the data is being copied into the first flip-flop (left-one), and then at each clock pulse is transferred from flip-flop to flop-flop.
- Empty the register with the Reset button.
Next
More to flip
We only discussed a few common flip-flop types, but please be aware of the many other types and variations. See also: Wikipedia