I am trying to make a BCD ripple counter that count from 0 to 9 , and I have watched a tutorial on YouTube , I implemented BCD counter as the instructor explained and after the counter reaches the value of 9 it should be cleared in order to begin to count from 0 again.
But my problem is that after the counter reaches 1001 , it clears all flip-flops then make the value of the third flip-flop to one (after 1001 (9) the value will be 0100 (4) not 0000 (0) as I expected).
I don't know what is the cause of the problem, is it due to the clear input ? I simulated the circuit using logisim.