The Gateway to Computer Science Excellence

+20 votes

Consider the following circuit involving three D-type flip-flops used in a certain type of counter configuration.

If all the flip-flops were reset to $0$ at power on, what is the total number of distinct outputs (states) represented by $PQR$ generated by the counter?

- $3$
- $4$
- $5$
- $6$

+25 votes

Best answer

Characteristic equation of D FF is , $Q(t+1)=D$

So, $P^+ = R, \;\;Q^+=\overline{P+R},\;\;\text{and}\;R^+=Q.R'$

Sequence of states will be as:

${\begin{array}{|c|c|}\hline

\textbf{Clock Pulse}& \textbf{PQR} \\\hline

\text{Initially}&000 \\\hline 1&010 \\ \hline 2&011 \\ \hline 3&100 \\ \hline 4&000 \\ \hline

\end{array}}$

$4$ is the number of distinct states.

Correct Answer: $B$

So, $P^+ = R, \;\;Q^+=\overline{P+R},\;\;\text{and}\;R^+=Q.R'$

Sequence of states will be as:

${\begin{array}{|c|c|}\hline

\textbf{Clock Pulse}& \textbf{PQR} \\\hline

\text{Initially}&000 \\\hline 1&010 \\ \hline 2&011 \\ \hline 3&100 \\ \hline 4&000 \\ \hline

\end{array}}$

$4$ is the number of distinct states.

Correct Answer: $B$

+3 votes

Initial State | Final State |

Qp Qq Qr | Qpn Qqn Qrn |

0 0 0 | 0 1 0 |

0 0 1 | 1 0 0 |

0 1 0 | 0 1 1 |

0 1 1 | 1 0 0 |

1 0 0 | 0 0 0 |

1 0 1 | 1 0 0 |

1 1 0 | 0 0 1 |

1 1 1 | 1 0 0 |

if we draw the state diagram from this we'll get

0 --> 2 --> 3 --> 4 --> 0

which represents a mod 4 counter, hence the total number of distinct output states = 4

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,382 answers

198,530 comments

105,323 users