Decrement with J-K FF and gate/gates

ogward

Last edited by a moderator:
Related Engineering and Comp Sci Homework Help News on Phys.org

LCKurtz

Homework Helper
Gold Member
It looks like the J and K inputs on the LSB are connected together and connected to one of the AND inputs. But nothing is connected to them as an input. Also the i input is missing. Is that your missing input? I know, I know, the answer is yes, and with that change your circuit is logically fine.

But the standard way of displaying flip-flops and gates is with the inputs on the left and the outputs on the right. Look at your circuit in a mirror and it would be properly displayed.

ogward

It looks like the J and K inputs on the LSB are connected together and connected to one of the AND inputs. But nothing is connected to them as an input. Also the i input is missing. Is that your missing input? I know, I know, the answer is yes, and with that change your circuit is logically fine.

But the standard way of displaying flip-flops and gates is with the inputs on the left and the outputs on the right. Look at your circuit in a mirror and it would be properly displayed.
http://img35.imageshack.us/img35/3654/20111015001.th.jpg [Broken]

Last edited by a moderator:

LCKurtz

Homework Helper
Gold Member
Much better. And correct too.

phinds

Gold Member
ogward, I gotta tell you I almost had a heart attack when I looked at your first circuit diagram. My mind absolutely rebelled and I felt like making the sign of the cross to ward off evil (and I'm not even religious).

THAT'S the kind of response you're likely to get from an EE prof if you draw your circuits right to left.

(well, OK, I might be a BIT extreme)

ogward

Hehe you are are probably right i just didn't like the Idea of heaving the MSB on the right side and the LSB on the left, made me a bit confused :P

phinds

Gold Member
i just didn't like the Idea of heaving the MSB on the right side and the LSB on the left, made me a bit confused
I'll be darned. It's been probably 35 years since I've designed those circuits but I DO remember now having exactly the same thought back when I started. You get used to it.

LCKurtz

Homework Helper
Gold Member
Hehe you are are probably right i just didn't like the Idea of heaving the MSB on the right side and the LSB on the left, made me a bit confused :P

If you like the LSB flip-flop on the right, just put it there. What's the problem?

ogward

I thought it wouldn't work that way so I didn't wanna experiment with something that works.
But I've tried it and it works, no problems.

lewando

Homework Helper
Gold Member
1. Homework Statement [/b]
Construct a synchronous down counter with J-K FFs and gate/gates. It should only count when the CP is high, look at the state diagram.
Is the original problem stated correctly? If CP is being used as the clock input into the JK flip-flops and it is always high, how do the flip-flops change state (count)?

ogward

I formulated it wrong, it should count when the CP goes from 0 to 1 as stated in the state diagram.

lewando

Homework Helper
Gold Member
Maybe I am picking nits (to get out of doing housework...), but the state diagram is not clear about CP going from 0 to 1 causing a state transition. If I read the state diagram literally, when CP is 0: stay in same state, when CP is 1: change state. So when CP is 1, the diagram says that the states are constantly changing. Apparently that is not what you want to do, but that is what the diagram is saying (to me, anyway). I would propose adjusting your notation somehow to indicate if CP is either a 0 or a 1: stay in same state, if there is a transition from 0 to 1 (perhaps a rising edge symbol) go ahead and change state.

LCKurtz

Homework Helper
Gold Member
Of course JK flip-flops change state at the falling edge of the clock. I wondered about the "only change state when the CP is high" too. That doesn't make sense to me for a clocked state machine using JK flip-flops. The proposed solution runs the counter downward counting on every clock pulse falling edge when i = 1 and pausing when i = 0.

It seems like a correct solution to a poorly worded problem to me. Perhaps the OP will return with his teacher's comments later.

ogward

You guys are right. It is probably poorly worded because I had to translate everything from swedish to english.
And yes I can get back with my professors notes.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving