I have designed a simple 4-bit synchronous up-counter, using master/slave JK flip flops in Logisim.

Here is my JK design:

Master/Slave JK Flip Flop

And my counter design:

4-bit synchronous up counter

It works perfectly as intended, however if the INC (count enable) is toggled to 0 while the CLK pulse is high - it doesn’t actually stop the count. Each successive clock pulse still increments the overall count, even though INC/count enable is now 0.

However, if INC is toggled to 0 while the clock pulse is low, it does indeed prevent the count from increasing. Am I missing something in the design?

I’ve tested this exact layout in other simulators too, so it’s definitely a flaw in the logic.

Note - PRE and NOT Q are the two unused pins on each JK chip in the counter circuit.


2 Answers 2


"if the INC (count enable) is toggled to 0 while the CLK pulse is high - it doesn’t actually stop the count"

You need to try this in two different states - with Q0 at zero and with Q0 at 1.

I suspect you are changing the INC input when Q0 is 1. When this happens, Q0 stays at 1 and the subsequent stages are toggling.

Try changing your logic to run INC to all FFs. Use a 2-input AND for the second FF, and increase the other 2 to 3-input gates.


The rising clock edge forces the first stage of the first flipflop to respond. Then INC goes low but the second stage of the first flipflop will still respond to the trailing (falling) edge of the clock pulse making Q0 change state. Q0 should then freeze at this new state because J & K have both been taken low.

You need to add some circuitry which will freeze the CLK in its current state when required to prevent the next falling or rising CLK edge.

A T-Type flip flop should do that made from a D-Type flipflop and an EX-Or gate.

T-Type Flipflop


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.