A counter is constructed with three D flip-flops. The input-output pairs are named (D0, Q0), (D1, Q1), and (D2, Q2), where the subscript 0 denotes the least significant bit. The output sequence is desired to be the Gray-code sequence 000, 001, 011, 010, 110, 111, 101, and 100, repeating periodically. Note that the bits are listed in the Q2 Q1 Q0 format. The combinational logic expression for D1 is
Solution :
To design the counter, we first list the desired state transition sequence. The outputs of the three D flip-flops represent the state variables , , and , where the bits are given in the order .
For a D flip-flop, the next-state equation is given by:
Therefore, the input to the second flip-flop must be equal to the next-state value of (i.e., ).
Let's map each current state () to its corresponding next state () based on the given periodic sequence:
1. Current State: 000 ⇒ Next State: 001 (so )
2. Current State: 001 ⇒ Next State: 011 (so )
3. Current State: 011 ⇒ Next State: 010 (so )
4. Current State: 010 ⇒ Next State: 110 (so )
5. Current State: 110 ⇒ Next State: 111 (so )
6. Current State: 111 ⇒ Next State: 101 (so )
7. Current State: 101 ⇒ Next State: 100 (so )
8. Current State: 100 ⇒ Next State: 000 (so )
We compile these values into a truth table to find the logic function for as a function of the current states ():
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 |
From the table, the minterms for which correspond to the following current states:
- (minterm 1)
- (minterm 3)
- (minterm 2)
- (minterm 6)
We can simplify this logic expression using a Karnaugh map (K-map):
| 00 | 01 | 11 | 10 | ||
| 0 | 0 | 1 | 1 | 1 | |
| 1 | 0 | 0 | 0 | 1 | |
Let's identify the prime implicants to group the 1s:
1. **First Group**: Grouping the two adjacent 1s in the first row () at columns and . This eliminates and yields:
2. **Second Group**: Grouping the adjacent 1s at column across rows and . This eliminates and yields:
Combining these two groups gives the minimized sum-of-products expression for the combinational logic input :
Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.
Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.
Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.
Prepare for success in the GATE Electrical Engineering exam with our comprehensive Ultimate Revision Test. Designed for aspirants aiming for top scores, this test covers all key topics in the GATE EE syllabus, including Circuit Theory, Electromagnetic Fields, Power Systems, Electrical Machines, Control Systems, and Analog & Digital Electronics. Our revision test offers a balanced mix of theory-based and application-based questions that will help you assess your understanding and boost your problem-solving skills. With carefully selected questions that mirror the difficulty level of the actual GATE exam, this test will help you identify areas for improvement and fine-tune your exam strategy.
SSC CHSL Tier-1 Shift 1 2 July 2024 question paper with answers and detailed solutions. This practice paper covers questions from General Intelligence & Reasoning, General Awareness, Quantitative Aptitude, and English Language as asked in the SSC CHSL Tier-1 examination. Practice the SSC CHSL 2 July 2024 Shift 1 paper to understand the exam pattern, question types, difficulty level, and important topics for upcoming SSC CHSL exams.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.