Serial/parallel-load shift registers and bit rotations are going to work most naturally with a D flip flop, since they just send data straight through; binary counters are going to work most naturally with a T flip flop, since each counter bit Ck = Ck,previous XOR carryk, where carry is the carry bit from the previous stage.
If you look at JK flip-flops, however, they are the "universal" flip-flop that can act as a D- or T- flip-flop depending on the input signals.
To get a D from a T, or vice versa, you need an XOR gate. To get a T from a JK, you just tie the JK inputs together. To get a D from a JK, you need an inverter, as the J/K inputs need to be opposites.
In your application, you've got enough complexity, that I suspect the gate counts are going to be very close, and it's probably not worth worrying about -- unless you have to optimize, in which case you'll just have to try it for each case.
IMHO, the D flip-flop is conceptually the simplest to use, and it works naturally with most of your operations, so I'd start with that.
When the clock is low, X follows whatever value D has continuously. However, M is isolated from X, and so Q holds whatever value is stored in the slave FF.
When the clock is high, W is isolated from D, but now M is connected to X, so now the value on X is transferred to Q.
There's a critical moment as the clock goes from low to high at which X stops following D. If D is changing at this time, it's impossible to predict what value X will end up with — it could even become metastable. There's a certain amount of time starting before the rising edge of the clock and ending some time afterward, during which D must be stable in order to guarantee that its value is correctly transferred to Q; these are called "setup" and "hold" time, respectively.
Note that since the two transmission gates in the top row are never "on" at the same time, there's no way that D can ever directly affect the value of Q.
Does this anser the question?
Best Answer
I made this small circuit plan for you:![enter image description here](https://i.stack.imgur.com/6JAnm.png)
It basically splits the signal from the button and compares it with the JKs output to determin whether J or K shall be activated. Please notice that the purpose of the two inverters in the very middle is just adding a delay. You can achieve that in a more elegant way probably in reality (e.g. loading a capacitor to the threshold voltage).
Short summary:
if Button:
if J==1:
if K==1:
I hope that this answer was helpful!
All the best!