J-K flip-flop

Use the buttons to control the clocking rate:

The meanings of the colours are:

This animation illustrates the case in which both J and K inputs are at logic high. The outputs change state at half the rate of the clock.