Electrical – SR flip-flop race condition

digital-logicflipfloplatchmemory

The schematic of a SR flip-flop is the following:

enter image description here

The equation for the output is:

$$Q^{t+dt}=(S+\bar{R}Q)^{t}$$

What I don't understand is that as the output \$Q\$ is given again as an input and the same happens with the \$\bar{Q}\$, doesn't this create a race condition?

Best Answer

On startup, there is a race condition between between Q and Q' settling. Also, if both S and R are simultaneously toggled active, there is a race condition and invalid state. However, in normal operation, a race condition is pretty rare.

The case in which there could be a race condition during normal operation (only S or R is active at a time) is when the S or R active edge is not held long enough (minimum pulse width is violated) for the outputs Q and Q' to properly settle. In this case, there will be a race between the Q/Q' which is propagating through the feedback loop to stabilize the system, and the inactive edge of S or R (whichever caused the toggle).