0

I am studying Computer Science and I am very confused. Let us say our Q is 1 and our Q* (Negation of Q) is 0. So when we go for R = 1 and S = 0, why isn't the value of Q* = 0?

I mean the NOR Gate for Q gives us Q = 0, which makes sense for me. But why is this value taken for the input of the NOR Gate for Q* instead of the earlier saved one (which was our 1). How is it accomplished? Shouldn't be the NOR Gate for Q as fast as the NOR Gate for Q*?

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208
J.Doe
  • 3
  • 2
  • Edit your question and provide a diagram either a picture or draw with the circuit diagram tool, without a better description this question is not answerable. – Voltage Spike Dec 07 '16 at 19:25

2 Answers2

0

So when we go for R = 1 and S = 0, why isn't the value of Q* = 0? I just don't get it.

enter image description here

When R = 1, it forces Q to be 0 (iirespective of nQ) and that puts a zero as an input on the other NOR gate. With S being zero on the other NOR gate input, nQ has to be 1. That's how it works.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • Sorry I meant Q* = 0. I edited it now. – J.Doe Dec 07 '16 at 18:43
  • Do'h do'h do'h! – Andy aka Dec 07 '16 at 18:43
  • Yea but I don't understand why the NOR Gatter at the bottom takes the 0 over the 1, since both gatters should be the same in speed. I assume they both put out their results in the same time, so why should the bottom gatter wait until the first one returns 0? – J.Doe Dec 07 '16 at 18:49
  • The gates output might change whenever its input changes. If Q changes, then the bottom NOR gate gets a new input, so its output might change. If Q* changes, then the top NOR gate gets a new input so its output might change. The gates don't know which wires are inputs to the whole gate and which are outputs. They just know which are inputs to themselves. – The Photon Dec 07 '16 at 18:52
  • @J.Doe: Both things happen, one after the other. Assuming that the `R` and `S` signals are held for some decent length of time, the `nQ` signal will become 1 early on and then hold as long as `R` and `S` remain stable. Circuit nodes don't have single values, they vary over time. And glitches do happen (such as `Q` and `nQ` both being 1) but they don't last long. – Ben Voigt Dec 07 '16 at 18:52
  • Look up a truth table for a NOR gate - the only combination of inputs that takes the output to 1 is 0,0. With Q = 0 = S, nQ = 1. – Andy aka Dec 07 '16 at 18:53
  • Okay I think I got it. Thank you very much. One last thing. What happens if Q and nQ are not initialized at all? Would the NOR gate just ignore the Q and nQ input and just use the given R and S input to initialize Q and nQ? Or how is it initialized? – J.Doe Dec 07 '16 at 19:04
  • On power up the flip flop is indeterminate. – Andy aka Dec 07 '16 at 19:07
  • So is it a general problem? Sorry for this maybe stupid question but I'm not really well teached in that topic. Whenever a Gate gets an undefined input, even though there are other defined inputs, the result is nevertheless undefined? – J.Doe Dec 07 '16 at 19:13
  • And another one: How much influence has this nQ = 0 ( even though it just stands for an extreme short amount of time). Well, I just realized that in this case, there is no consequence, since nQ is never used as an output. But let us talk in case of other situations, where an output would be for a really short amount of time a non desired output? – J.Doe Dec 07 '16 at 19:24
  • @J.Doe this site is a learning experience in that the sum total of all the knowledge is for the benefit of all so stop trying to make this a personal learning exercise and do some research on the questions or ask new questions. People answer questions for free and nobody really expects to follow up a changed question with a changed answer followed by a bunch more questions that can easily be found on the internet. If you are satisified your original question was satisfied with this answer, please consider formally accepting it. – Andy aka Dec 07 '16 at 20:30
0

I believe you are talking about an RS latch when you say Flip Flop.

Lets considder this RS-latch:

¬(R V ¬Q) = Q

¬(S V Q) = ¬Q

As there are two inputs and two states per input we have a total of 2^2 = 4 possible states:


  1. S = 0, R = 1

¬(R V ¬Q) = ¬(1 V ¬Q) = ¬(1) = 0 = Q

¬(S V Q) = ¬(0 V Q) = (¬Q) = ¬Q, Q = 0 => ¬Q = 1

Result: Q = 0, ¬Q = 1 => Q has been RESET


  1. S = 1, R = 0

¬(S V Q) = ¬(1 V Q) = ¬(1) = 0 = ¬Q

¬(R V ¬Q) = ¬(0 V ¬Q) = ¬(¬Q) = Q, ¬Q = 0, ¬(¬Q) = ¬(0) = 1

Result: Q = 1, ¬Q = 0 => Q has been SET


  1. S = R = 0

¬(R V ¬Q) = ¬(0 V ¬Q) = ¬(¬Q) = Q

¬(S V Q) = ¬(0 V Q) = ¬Q

Result: Q = Q, ¬Q = ¬Q => Q remains UNCHANGED


  1. S = R = 1

¬(R V ¬Q) = ¬(1) = 0 = Q

¬(S V Q) = ¬(1 V Q) = ¬(1) = 0 = ¬Q

Result: Q = 0, ¬Q = 0, this state is useless/FORBIDDEN


I hope this helps...