4097 words - 17 pages

Given a flip-flop circuit,

Determine how the circuit will behave for a sequence of inputs.

Be able to use a flip-flop to store a single bit.

Basic Circuit

Here's a basic circuit that involves just two NAND gates. There are two inputs to this circuit, X and Y. Can you generate a truth table for this circuit?

* Note that there is no connection where the two wires running from the output back to the input cross.

Let's address that issue of the truth table. Here is a truth table for you to fill in. (Print this web page if you want to work on it.)

X | Y | P | Q |

0 | 0 | | |

0 | 1 | | |

1 | 0 | | |

1 | 1 | | |

Let's review ...view middle of the document...

In that situation, X = 0, and Y = 1.

* If X = 0, then P = 1. We know that if either input to a NAND gate is 0, the output is 1. That's the same as before.

* Now. try to take advantage of the knowledge that P = 1. If P = 1 AND Y = 1, then Q = 0.

* That gives us the second entry in the truth table above. Here's the truth table with what we have figured out so far.

X | Y | P | Q |

0 | 0 | 1 | 1 |

0 | 1 | 1 | 0 |

1 | 0 | | |

1 | 1 | | |

Next, let's address the third entry in the truth table. In that situation, X = 1, and Y = 0.

* If Y = 0, then Q = 1. We know that if either input to a NAND gate is 0, the output is 1. That's the same as before. However, this time, we take advantage of knowing that Y = 0. Before, it was X that was equal to zero, but X = 1 here and it doesn't help us get started.

* Now. try to take advantage of the knowledge that Q = 1. If Q = 1 AND X = 1, then P = 0.

* That gives us the third entry in the truth table above. Here's the truth table with what we have figured out so far.

X | Y | P | Q |

0 | 0 | 1 | 1 |

0 | 1 | 1 | 0 |

1 | 0 | 0 | 1 |

1 | 1 | | |

Finally, we have the case where X = 1 and Y = 1.

* If X = 1, then we need to know Q to determine P.

* If Y = 1, then we need to know P to determine Q.

* We are stuck! There is no obvious way to proceed!

There is one way to proceed. We could just assume that P = 1, for example. Let's try that.

* If Y = 1, and P = 1, then we know that Q = 0.

* If we know that Q = 0, it is an input to the top NAND gate, so the output there is 1. Thus, P = 1. That's what we assumed to start with, so we don't get a contradiction.

* All is copasetic! Or is it?

* Here is the truth table.

X | Y | P | Q |

0 | 0 | 1 | 1 |

0 | 1 | 1 | 0 |

1 | 0 | 0 | 1 |

1 | 1 | 1 | 0 |

This is interesting, but we need to note the following.

* This result is not at all intuitive.

* The circuit is symmetric.

* If we have symmetric inputs (X = 1, Y = 1), we should have symmetric outputs.

* Instead, we seem to have shown that P = 1 and Q = 0. That's not at all symmetric, and it it bothersome.

* We got to the result by making an unsymmetrical assumption. We assumed P = 1.

What if we made the opposite assumption? Let's assume P = 0.

* If P = 0, then Q = 1 since P is an input to the bottom NAND gate.

* If we know that Q = 1, it is an input to the top NAND gate, so the output there is P = 0 since the other input to the top gate, X, is also 1.

* But, P = 0 is what we assumed to start all this. Again, we do not get a contradiction, so everything seems OK.

* Here is the truth table for this situation.

X | Y | P | Q |

0 | 0 | 1 | 1 |

0 | 1 | 1 | 0 |

1 | 0 | 0 | 1 |

1 | 1 | 0 | 1 |

Now, we can't have it both ways. This truth table summarizes what we have found.

X | Y | P | Q |

0 | 0...

Tap into the world’s largest open writing community