As per the clear signal, when the input of Nand gate is 110, then it will send a clear pulse to all the JK flip flops and then they will give output as 0, so after 110, the stage becomes 0000
So I got following states:
0000
0001
0010
0011
1100 (since the 4th Flip Flop is positive edge, so moment 3rd flip flop output goes from 0 to 1, the fourth flip flop will also go from 0 to 1)
Now this 1100, will reset the Nand output to 0, and that will send clear command. So output becomes 0000.
So there are only 4 stages that are underlined above.
So output frequency should be f(clock)/4
It would be f(clock)/16 if there were 16 stages. As per timing diagram also i am getting output frequency as f(clock)/4
Here is the timing diagram.
The negative edge is in blue color. For FF/3 the positive edge is in blue color as that activates FF/4.
In yellow region, the output of FF's becomes 1100--MSB being right most FF. This sends clear command to Flip Flop via Nand gate, so output becomes 0000. Assuming T(delay) of Nand gate is very less as compared to Time period of FF.