Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

870 questions

988 answers


439 users

+1 vote

in case we need to create the control logic for an SR flipflop and have to apply logic minimization:

Suppose for some input variable assignments the values of r and s are irrelevant. If you would get smaller DNFs for example in the KV diagrams if you set these don't care values to 1, would that be wrong because r&s holds for some assignments?

Kind regards!
in # Mandatory Modules Bachelor by (260 points)

1 Answer

+1 vote
Best answer

To keep it short: That will be no problem.

Side story: There are many rumors about SR-Flipflops which are not true. Consider a typical implementation by two NOR gates:

        next(p) = !(s | q)
        next(q) = !(r | p)

This leads to the following cases for the four possible inputs if these are kept stable:

  1. s=0 & r=0 : (next(p) = !q) & (next(q) = !p)
  2. s=0 & r=1 : (next(p) = !q) & (next(q) = 0) and thus (p =1) & (q = 0) after two steps
  3. s=1 & r=0 : (next(p) = 0) & (next(q) = !p) and thus (p =0) & (q = 1) after two steps
  4. s=1 & r=1 : (next(p) = 0) & (next(q) = 0)

Hence, you can see that s=1&r=1 do not lead to unstable outputs as often stated, but they violate the invariant that we want that q=!p. That is established by one of the inputs s=0&r=1 or s=1&r=0 and kept invariant by s=0&r=0. However, if we would have once the input s=1&r=1 which makes p=q=0, then the input s=0&r=0 would lead to an unstable state where p and q will oscillate. 

You can look at is also from the perspective of the states

  1. p=0 & q=0 : (next(p) = !s) & (next(q) = !r), i.e. all four states are reachable from here
  2. p=0 & q=1 : (next(p) = 0) & (next(q) = !r), i.e. with r=1 we switch to p=q=0 and otherwise remain in p=0 & q=1
  3. p=1 & q=0 : (next(p) = !s) & (next(q) = 0), i.e. with s=1 we switch to p=q=0 and otherwise remain in p=1 & q=0
  4. p=1 & q=1 : (next(p) = 0) & (next(q) = 0), i.e. we switch to p=q=0
As you can see, it is unavoidable to go through state p=q=0.
Having written way too much, let me emphasize here finally, that all of this is not relevant for the exam tomorrow. I don't want to create the impression that this is maybe something you should look at in detail. Please don't waste your time!
by (139k points)
edited by
Thank you very much!

Related questions

+1 vote
1 answer
asked Aug 23, 2020 in # Mandatory Modules Bachelor by least (260 points)
0 votes
1 answer
asked Aug 23, 2020 in # Mandatory Modules Bachelor by VF (120 points)
0 votes
1 answer
0 votes
1 answer
asked Aug 23, 2020 in # Mandatory Modules Bachelor by davidschulz (410 points)
Imprint | Privacy Policy