# JK and D Flip-Flops

Discussion in 'Homework Help' started by oney, Jan 10, 2012.

1. ### oney Thread Starter New Member

Jan 10, 2012
10
0
Hey guys!

Can you please tell me the differences between JK and D Flip-Flops?
And can we transform a JK FF on a D FF, and vice-versa? If so, how?

Thanks!

2. ### MrChips Moderator

Oct 2, 2009
12,446
3,362
Hmm, tough question to answer if you have been following the other threads on Homework Help.

3. ### oney Thread Starter New Member

Jan 10, 2012
10
0
Well, it is, but there are somethings that i don't understand very well...
For example, i do understand how JK works internally but not how D works, so i cant compare them.
I do know that JK is more flexible then D because it has two entries J and K, but this is the only i know to compare them...

4. ### MrChips Moderator

Oct 2, 2009
12,446
3,362
The acceptable guideline is for me not to give you the fish, but to teach you how to fish.

Search for flip-flop and draw the truth table of a J-K flip-flop and a D flip-flop.

Last edited by a moderator: Jan 10, 2012
5. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
There are two approaches to this question.

The two FFs have differences in their internal circuitry which of course leads to differences in behavior.
The first can be identified by looking at the two schematics.
The second can be seen by drawing the truth tables.
Which one are you interested in?

You can also convert from one FF to the other with the adequate components.

6. ### oney Thread Starter New Member

Jan 10, 2012
10
0
well, i cant find the truth table for the d FF but i just learned that my work will be only with JK! I'm already made the circuit but the led is not turning on.

The circuit needs to read 0011 and 0100 (from now on i apologize because i don't know how to say somethings about my project in English, but i'll try my best) i've made the projection of the states, which are the current state and the following state, my projection is a moore machine.
With that and the transition table of jk i've calculated the fk entries (I forgot to mention that i have to dual flip-flops jk) and with that i've got the karnaugh maps and from that the boolean expressions.

With this i've made my circuit but it still doesn't work. What do you thing i'm doing wrong?

7. ### MrChips Moderator

Oct 2, 2009
12,446
3,362
Now you've lost me.

What are you trying to build?

8. ### oney Thread Starter New Member

Jan 10, 2012
10
0
I'm sorry. I'll try and explain again.

I need to build a counter with 2 dual flip-flops jk that needs to process 0011 and 0100.

I've already done it, but it isnt working and i cant find the mistake.

What i've done was first make a Moore machine that would read those 2 numbers.
From that i've made the entries and exits table, and from that i've made the karnaugh maps. From the maps i got the boolean expressions and with them i've made my circuit.

The sets are connected to the Vcc and the resets are connected to the GND.
All clocks are connected with each other because this is a synchronous circuit.

My only problem is that after making these things my led isnt turning on...

Where do you think i've made the mistake?

9. ### oney Thread Starter New Member

Jan 10, 2012
10
0
This is my circuit

File size:
59.8 KB
Views:
27

Nov 25, 2009
5,142
1,266
11. ### oney Thread Starter New Member

Jan 10, 2012
10
0
this is my transition diagram

File size:
22.4 KB
Views:
22
12. ### oney Thread Starter New Member

Jan 10, 2012
10
0
I've already done all of that, but the led still doesnt turn on, and i cant find the damn mistake. i'm seriously getting crazy because of this ~~

13. ### Georacer Moderator

Nov 25, 2009
5,142
1,266

Consider these cases of input:
00100
This one should be accepted and lead to the final stage. However, it gives ABCDBC.
010011
This one should also be accepted as 0011 and end in G, but instead it goes ABEFGAA.

Spend some more time working on your transition diagrams. Post a new one and we 'll comment on that.

14. ### oney Thread Starter New Member

Jan 10, 2012
10
0
i'm trying to make one again but i get a bunch of errors! Can you give some suggestion, please? I really need this!

15. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
Okay, you need patience and insight for this task. You did the right thing drawing the two paths from A to G, using your two desired inputs.

You now need to take into account all the possible cases of input.

For example: If you get 000000011, you need a point to loop around 0 and wait for those two aces to get you to G. That can happen if you loop the 0 on C instead of returning it to B.

On the similar case of 000000100, since you loop around C (as I suggested earlier), you will go to D on the 1 and then you need to go to F on the next 0, since you now have 010 as your last

The input 00110100 must end in G. That means that after you go to G the first time for 0011, on the arrival of 0 you must go to B, not A, in order to follow the lower path on the second run.

No one said it was easy. There are many cases to take into account and unfortunately there isn't an algorithmic way to design a word recognizer (at least that I know of).

Keep your spirits up and try to invent more and more test cases. Each time you make a change be sure that the previous inputs still work.

16. ### oney Thread Starter New Member

Jan 10, 2012
10
0
Thank you so so much! You just saved my life ^^

17. ### Georacer Moderator

Nov 25, 2009
5,142
1,266
Were you held prisoner in some cave trying to make an iron suit before your captors understood what you were building?

18. ### MrChips Moderator

Oct 2, 2009
12,446
3,362
You did not give the part number of the flip-flops you are using.
Check the data sheet. It is not usual that you would connect the SET to HIGH and the RESET to LOW at the same time.

19. ### oney Thread Starter New Member

Jan 10, 2012
10
0
I'm a prisoner at my college, and you just set me freee ^^

Yes, i've already check that, i have both high!

20. ### MrCarlos Active Member

Jan 2, 2010
400
134
Hello oney

You begin this discussion by asking the differences between Flip-Flop's type J-K and D.

Then, after wondering, you mention that you have a counter with 2 dual Flip-Flop type J-K's and you have to light a LED when the counter count is from 3(0011) to 4(0100).
Certainly, with that kind of Flip-Flip you can perform a 4 BIT's counter which would count from 0 to 15.

Which you must do is detect when the counter is in the states 0011 or 0100.
I suppose that BIT of the extreme right is the least significant (LSB) and the extreme left is the most significant BIT (MSB) in the binary numbers that show

The first thing you do is counter: from 0 to 15.
Then, with AND and OR gates, to detect when the counter reaches the number you want to turn the LED on.

So take a look at the attached image for compliance with the provisions of your project.

Greetings