I want to build a circuit with two inputs A and B and one output Q with the following behavior:
- assume A and B are never high at the same time
- on the rising edge of A, Q must become low (A means "clear")
- on the rising edge of B, Q must become high (B means "set")
Do I need to have a clock for such a simple circuit? It seems I cannot directly use (A or B) as the clock of a J-K flip-flop and at the same time use A and B as the inputs of the flip-flop because it would violate the setup time.
Is it acceptable practice to just use A as the clear and B as the preset of a flip-flop without using the clock and inputs of the flip-flop?
Finally, let's now remove the assumption that A and B are not high at the same time. How do I detect the rising edges of both inputs, again without a clock?