Turning JKFF flip-flop into DFF

  • Thread starter Thread starter Femme_physics
  • Start date Start date
  • Tags Tags
    Turning
Click For Summary

Discussion Overview

The discussion revolves around the challenge of converting a JK flip-flop (JKFF) into a D flip-flop (DFF). Participants explore the truth tables, logic gates, and the necessary conditions for this transformation, addressing both theoretical and practical aspects of digital logic design.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses confusion about how to convert JKFF to DFF, noting difficulties in matching truth tables and asking for hints.
  • Another participant suggests that attaching a NOT gate to K could yield the expected states for DFF, but questions the correctness of the initial JKFF truth table.
  • Several participants discuss the implications of edge-triggering in DFFs and whether the clock pulse should be considered in the truth tables.
  • There is a suggestion to create a new truth table starting with CLK and D, leaving J and K columns empty initially, to determine how to derive J and K from D.
  • One participant mentions that if J and K are always the same, it leads to specific combinations that may not solve the problem of converting JKFF to DFF.
  • Another participant clarifies that the conversion requires more than just connecting J and K, emphasizing the need for a proper logic circuit to derive J and K from D.
  • There are discussions about the role of the clock signal in determining the behavior of flip-flops and how it affects the truth table interpretation.
  • Participants share images of truth tables and logic circuits, indicating their thought processes and proposed solutions.
  • One participant expresses satisfaction with the progress made in understanding the conversion process, while others acknowledge the complexity of the task.

Areas of Agreement / Disagreement

Participants exhibit a mix of agreement and disagreement regarding the correctness of the truth tables and the methods proposed for the conversion. There is no consensus on a definitive solution, as various interpretations and approaches are discussed.

Contextual Notes

Some participants note that the clock pulse's role is often overlooked in truth tables for clocked devices, which may lead to misunderstandings in the conversion process. The discussion also reflects uncertainty about the implications of connecting J and K inputs directly.

Who May Find This Useful

This discussion may be useful for students and practitioners in digital logic design, particularly those interested in flip-flop configurations and transformations between different types of flip-flops.

Femme_physics
Gold Member
Messages
2,548
Reaction score
1

Homework Statement


I'm asked to turn JFKK to DFF. I am always puzzled by such problems. I decided to take it step by step and first draw the truth charts and black-boxes for each:

http://img204.imageshack.us/img204/6189/jkffkk.jpg

I can see that in order to turn JKFF truth table to DFF, in line to I need it to be 00. But even if I attach NOT gate to K, then the first line no longer matches DFF truth table. I started looking at logic gates, but it appears no matter which change I make in one line I can't get all my lines to correspond. Can I get any hints?


Another question I have is, am I only allowed to attach logic gates to J or K in such exercises, or can I do crazier things like attaching J to K?
 
Last edited by a moderator:
Physics news on Phys.org
If you attach not gate to K (from J input) only 2nd and 3rd lines from JKFF truth table will be possible states. Thus your DFF will work as expected.

BTW, the 1st line of JKFF is wrong. It will be 0 0 Q Q'
The 1st and 2nd lines of DFF will be 0 0 Q Q' and 0 1 Q Q'
 
Femme_physics said:
I can see that in order to turn JKFF truth table to DFF, in line to I need it to be 00. But even if I attach NOT gate to K, then the first line no longer matches DFF truth table. I started looking at logic gates, but it appears no matter which change I make in one line I can't get all my lines to correspond. Can I get any hints?

Create a new table.
Start with your input CLK and D and fill it in.
Then 2 columns for J and K. Leave them empty for now.
And then a column for the expected output Q and fill that in too.

Now how do you need to fill in the columns for J and K to get the output Q?

If you have that, you can make a logic circuit to get J from CLK and D, and also one to get K from CLK and D.


Another question I have is, am I only allowed to attach logic gates to J or K in such exercises, or can I do crazier things like attaching J to K?

I like crazy. :biggrin:
It won't help you here though.
 
If I may interrupt... With the given truth tables the discussion would be right. But maybe the D-FF is supposed to be edge-triggered, and it is precisely the edge-triggering logic that the OP is being asked to implement. Maybe.
 
Dodo said:
If I may interrupt... With the given truth tables the discussion would be right. But maybe the D-FF is supposed to be edge-triggered, and it is precisely the edge-triggering logic that the OP is being asked to implement. Maybe.

Good point.
I didn't really think about that.

Still, I think the method will still work if we interpret each value for CLK in the table as being different from the one before.
 
The JK flip flop is a clocked device. Look up the 7476 for example. The problem is a lot easier if you assume this.
 
I was told to do this by my teacher:

http://img141.imageshack.us/img141/8427/jkok.jpg

But after getting home I try to look into the logic of it. Does it mean J and K always get the same signal?

I was trying to put it in a truth table but wasn't sure how
 
Last edited by a moderator:
Femme_physics said:
Does it mean J and K always get the same signal?

Yes.

I was trying to put it in a truth table but wasn't sure how

If J and K are always the same, which possibilities do you have for the combination of J and K?
 
00 and 11

so 00 = No change
11 = Flips values

Same as DFF
 
  • #10
Femme_physics said:
00 and 11

so 00 = No change
11 = Flips values

Yep.

Same as DFF

There is no input to DFF that flips Q.
So this is not the solution to your problem.
 
  • #11
Are you telling me my teacher was wrong?
 
  • #12
Femme_physics said:
Are you telling me my teacher was wrong?

I do not know what your teacher told you or what he meant.

Apparently he told you to connect the J and K inputs, which is something you can do.
However, it does not generally turn JFKK into DFF.
You need more to do something like that.
 
  • #13
I just looked up JK flipflop and realized that it has a 3rd input: the clock pulse.

Both JF and D flipflops only change state on a clock pulse trigger.

It means you can ignore the clock pulse trigger and look only at the D-input.
You need to turn the D-input into J and F inputs.

So you need a truth table with only D-input, show intermediary J and K inputs, and end up with a Q-output.

It means a slight tweak to the solution your teacher gave you.
 
  • #14
ILS -- can you confirm this?

Kholdstare said:
BTW, the 1st line of JKFF is wrong. It will be 0 0 Q Q'
The 1st and 2nd lines of DFF will be 0 0 Q Q' and 0 1 Q Q'

...and as far as what you said:...
You need to turn the D-input into J and F inputs.

Don't you mean the other way around? After all, I'm turning JKFF to DFF.
 
  • #15
Femme_physics said:
ILS -- can you confirm this?
Kholdstare said:
If you attach not gate to K (from J input) only 2nd and 3rd lines from JKFF truth table will be possible states. Thus your DFF will work as expected.

BTW, the 1st line of JKFF is wrong. It will be 0 0 Q Q'
The 1st and 2nd lines of DFF will be 0 0 Q Q' and 0 1 Q Q'

Your lines are not wrong.
What Kholdstare says is the same as what you already have.
I think he misinterpreted the NC entries.

For instance, he meant that the 1st line of JFKK should be ##0\ 0\ Q\ \overline{Q}##.
But this is the same as ##0\ 0\ NC\ NC##.


...and as far as what you said:...




Don't you mean the other way around? After all, I'm turning JKFF to DFF.

I'm interpreting this that you try to build a DFF from a JKFF flipflop.
That is, you get a D-input, try to connect it to a JKFF somehow, and try to get the related DFF output.
Did you mean it differently?
 
  • #16
the value of clk doesn't generally get included in a truth table, because the operation of a clocked flip flop is not dependent on its value, rather on its edge. a truth table for a clocked device is generally supposed to be interpreted as "what happens when you get a triggering edge on clk"

flipjk_tab.jpg
flipd_tab.jpg


those two images are easier to work from, and you can see that the D output matches the jk output for two specific cases, D = 1 matches J = 1,K = 0, and D = 0 matches J = 0, K = 1.

with that information, can you see the combinational logic circuit required to take D as input, and J, K as output?

edit: just noticed that clk is included in the t-tables i posted, despite me saying that they shouldn't be there. all that entry is showing is that this is only valid for a rising edge on clk, and since they all have it, the conclusion is that without a rising edge nothing happens...
 
  • #17
earlofwessex said:
the value of clk doesn't generally get included in a truth table, because the operation of a clocked flip flop is not dependent on its value, rather on its edge. a truth table for a clocked device is generally supposed to be interpreted as "what happens when you get a triggering edge on clk"

flipjk_tab.jpg



flipd_tab.jpg


those two images are easier to work from, and you can see that the D output matches the jk output for two specific cases, D = 1 matches J = 1,K = 0, and D = 0 matches J = 0, K = 1.

with that information, can you see the combinational logic circuit required to take D as input, and J, K as output?

edit: just noticed that clk is included in the t-tables i posted, despite me saying that they shouldn't be there. all that entry is showing is that this is only valid for a rising edge on clk, and since they all have it, the conclusion is that without a rising edge nothing happens...

Oh, yes! I think I finally get the picture here:


http://img7.imageshack.us/img7/9407/notqid.jpg
 
Last edited by a moderator:
  • #18
Almost!

You're definitely on the right track. :)
 
  • #20
Yep! ;D
Femme_physics said:
I hope I'm right, I don't think this pic can take anymore copy-paste ;)
:smile:
 
  • #21
Thank you very much, ILS and earlofwessex :) ! and everyone else who posted. I got to poke back at those who misled me IRL-- I knew something doesn't make sense.
 
  • #22
np.
I find it quite strange that your lecturer told you the wrong answer, be sure to ask them for clarification!

ps, do you recognise any other type of flip flop in the truth table for the drawing
http://img141.imageshack.us/img141/8427/jkok.jpg

it is a valid conversion, just not for the D-type.
 
Last edited by a moderator:
  • #23
Yes! T Flip-flop!
 

Similar threads

Replies
20
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
8K
Replies
1
Views
4K
Replies
5
Views
4K
Replies
1
Views
3K