Electrical – Preset and Clear in SR Flip Flop

flipflop

In Practical Electronics for Inventors, Paul states the following as the pulse triggered SR flip flop:
enter image description here

Of course there are some minor issues in the truth table. (One of the \$Q\$’s must be \$\overline Q\$ and \$00\$ must be \$ Q \overline Q\$ in the hold condition.) But even after correcting them in the back of my mind, I think that the given truth table is not correct for the Set and Preset conditions for the given circuit.

I think that for the circuit shown, \$\overline{PRE}=0\$ and \$\overline{CLR}=1\$ condition is not correct in the truth table. I think it also depends on the values of \$S\$ and \$R\$. Like if \$SR=01\$ I think \$Q \overline Q = 11\$, not \$10\$ as the text purports.

Similar concerns for the other non-\$11\$ configurations of \$\overline{PRE} \; \overline{CLR}\$.


Can you please provide a correct truth table?


Edit: The following is the truth table that I came up with. Please make sure that it is correct.

\$
\begin{array}{cccc|cc}
\overline{PRE} & \overline{CLR} & S & R & Q & \overline Q\\
\hline
1 & 0 & 0 & 0 & Q & 1 \\
1 & 0 & 0 & 1 & 0 & 1 \\
1 & 0 & 1 & 0 & 1 & 1 \\
\hline
0 & 1 & 0 & 0 & 1 & \overline Q \\
0 & 1 & 0 & 1 & 1 & 1 \\
0 & 1 & 1 & 0 & 1 & 0 \\
\hline
0 & 0 & X & X & 1 & 1 \\
\end{array}
\$


Another Question: I think that this implies that Preset should be activated after activating Set; and Clear, after activating Reset, to have the outputs complements of each other. Correct?

Best Answer

One point of confusion here is that the circuit is not a combinational logic block; you can't exactly have a normal truth table. Instead, you have to somehow say what happens relative to the clock edges, possibly over multiple clock edges. That's what the picture of a pulse in the \$CLK\$ column is supposed to mean in the book. As a first step, instead of making a single truth table for the entire master/slave combination, I would first make two separate truth tables. The slave truth table should probably have \$Y\$, \$\overline{Y}\$, \$CLK\$, \$\overline{PRE}\$ and \$\overline{CLR}\$ as inputs. The master truth table would just have \$S\$, \$R\$, and \$CLK\$ as inputs.

I think what you might find is the \$\overline{PRE}\$ and \$\overline{CLR}\$ function correctly, but only when \$CLK\$ is high.

The last line of your truth table is definitely concerning. When \$PRE\$ and \$CLR\$ are both high (inactive), \$S\$ and \$R\$ don't matter, and \$Q\$ and \$\overline{Q}\$ are both high? Are you sure about that? Try re-casting it in terms of \$Y\$, \$\overline{Y}\$, and \$CLK\$ and see if it's still true.

I hope the rest of the book is better than this example.