Logic phase shift detection

digital-logic

I have two logic signals that can be in two different configurations as shown in the image below.

Two cases

I would like to output a third signal that is HIGH for case A and LOW for case B. How can I accomplish this?

Best Answer

XOR both signals, the pulse train and the state one. Use this result as the clock for a positive edge trigger latch and the state signal as the value to latch. In state A the latch output is high and in state B the latch output is low.