Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (christos):

I have a J-k flip flop. J=K= HIGH What is the Q output?

OpenStudy (christos):

@ganeshie8

ganeshie8 (ganeshie8):

output toggles :- if previous value of output Q is 0, it becomes 1 now if previous value of output Q is 1, it becomes 0 now you can get this much by looking at JK flipflop transition table right... which part u have problem ?

OpenStudy (christos):

bro I am trying to understand how to solve this one. http://screencast.com/t/ftrnYIYoj I have the solution, I just dont understand the solution

ganeshie8 (ganeshie8):

OK. First of all this is a sequential counter - all flops are clocked by same clock.

ganeshie8 (ganeshie8):

lets start with the LSB flop FF0 : since we connect JK to HIGH always, its output toggles always.

OpenStudy (christos):

ok

OpenStudy (christos):

so J0 = 1 K0 = 1 Q0 = 0 ?

ganeshie8 (ganeshie8):

how u say that Q0 = 0 ? lets reset the flops to an initial state of 0000 then we apply clock :- 1. first clock cycle, FF0 output toggles from 0 to 1

OpenStudy (christos):

oh ok

OpenStudy (christos):

first clock J1 = 1 K1 = 1 Q1= 1?

ganeshie8 (ganeshie8):

no, for FF1 :- inputs to AND gate : Q0 = 0, Q3' = 1 ; so AND gate output = 0 ; so FF1 will stay 0.

OpenStudy (christos):

but Q0 toggle didnt it toggle from 0 to 1?

ganeshie8 (ganeshie8):

for FF2 :- inputs to AND gate : Q0 = 0, Q1 = 0 ; so AND gate output = 0 ; so FF2 will stay 0

ganeshie8 (ganeshie8):

i wil get to that wait a sec, lets complete first cycle for all flops. then il answer that q ok

ganeshie8 (ganeshie8):

for FF3 :- (Q3Q0 + Q0Q1Q2) , so it stays 0 as well

ganeshie8 (ganeshie8):

so after first clock cycle, we see : 0001

OpenStudy (christos):

alright how about Q0

ganeshie8 (ganeshie8):

thats a really important and very fundamental question in sequential circuits. explanation follows -

ganeshie8 (ganeshie8):

here, all 4 flops are "positive edge triggered". what does that mean? it means, they capture data ONLY when clock is transitioning from LOW to HIGH.

ganeshie8 (ganeshie8):

and since clock is going to all flops at the same time, it will be transitioning from LOW to HIGH at the same time for all 4 flops. so the flops capture whatever the OLD data that exists at their input.

ganeshie8 (ganeshie8):

FF1 captures OLD Q0, which is 0. so FF1 wont toggle. does that make sense

OpenStudy (christos):

let me proccess

ganeshie8 (ganeshie8):

take ur time...

OpenStudy (christos):

ok I got the first cycle

OpenStudy (christos):

(yay!)

ganeshie8 (ganeshie8):

ok good. so at the end of first cycle, we have 0001 in our counter.

ganeshie8 (ganeshie8):

lets see second clock cycle :- FF0 : JK is permanently connected to HIGH, s Q toggles from 1 to 0.

ganeshie8 (ganeshie8):

FF1 : AND gate inputs : Q0 = 1, Q3'=1, so AND gate's output is 1 ; FF1 toggles from 0 to 1.

ganeshie8 (ganeshie8):

FF2 : 0 FF3 : 0 so at the end of second cycle, our counter has : 0010

ganeshie8 (ganeshie8):

see if u get this second cycle also.. u can analyze rest of the cycles same way, using the present value in counter to figure out next value.

OpenStudy (christos):

Thank you so much man, I was missing that fundamental thingy

ganeshie8 (ganeshie8):

great to hear.. yw !

OpenStudy (christos):

Ok I solved it all! The only thing I dont understand is just this first line of the solution

OpenStudy (christos):

Sorry I forgot to post the image http://screencast.com/t/c7AfoiSMwty9

ganeshie8 (ganeshie8):

In the 0th clock cycle, we reset the flops. here we are starting with an initial state of : Q3Q2Q1Q0 = 0000

OpenStudy (christos):

but why it doesnt even toggle

ganeshie8 (ganeshie8):

first line in that table shows the initial state of counter. resetting gives this initial state. resetting is required for ALL sequential circuits.

OpenStudy (christos):

its like assuming that the previews one was 1111

ganeshie8 (ganeshie8):

good q. we dont apply clock during reset cycle. so flops will not capture data.

ganeshie8 (ganeshie8):

u can think of it like this :- every sequential circuit requires a reset to happen before its normal functionality starts. resetting flops keeps the circuit in known state. in our case, it makes our counter to start at 0000. once the clock keeps ticking, the flops start capturing their input data and the counter keeps on incrementing.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!