Similar questions 4 more →
Counters & Timing

Answer & solution
Official answer: B
Givens and goal
A synchronous 2-bit counter uses D flip-flops. With P=0 it increments, saturating at 11; with P=1 it decrements, saturating at 00. Find formulas for D₁,D₀ from the displayed next-state table. For current states 00,01,10,11, the next states are 01,10,11,11 when P=0 and 00,00,01,10 when P=1.
Approach
Use D=next-state for each flip-flop, enumerate the minterms, and combine adjacent rows that differ in one Boolean variable.
Step-by-step solution
1. A D flip-flop takes its next state from its D input. Thus D1 and D0 must equal the corresponding next-state bits in all eight input/current-state rows.
2. Use variable order (P,Q1,Q0). The rows where D1=1 have binary indices 1,2,3,7. Adjacent pairs (1,3), (2,3) and (3,7) yield the implicants (NOT P)Q0, (NOT P)Q1 and Q1Q0. Therefore D1=(NOT P)Q1 OR (NOT P)Q0 OR Q1Q0.
3. The rows where D0=1 have indices 0,2,3,6. Adjacent pairs (0,2), (2,3) and (2,6) yield (NOT P)(NOT Q0), (NOT P)Q1 and Q1(NOT Q0). Therefore D0=(NOT P)(NOT Q0) OR (NOT P)Q1 OR Q1(NOT Q0).
4. These two expressions are the pair in B. Each of the other offered pairs fails at least one row: A gives the wrong D0 at 000; C gives the wrong D1 at 000; D gives the wrong D1 at 100.
Computational check: Evaluated B on all eight assignments and compared the resulting two-bit value with min(3,current+1) for P=0 and max(0,current−1) for P=1. All eight matched.
Visual check: Inspected both the full next-state table and each complement bar in the four expression pairs.
Complete transition check, written as P: current→next:
0: 00→01, 01→10, 10→11, 11→11
1: 00→00, 01→00, 10→01, 11→10The last increment case and first decrement case are saturation cases: they hold at the boundary rather than wrapping to 00 or 11. Ignoring those two rows would derive an ordinary modulo-4 counter instead of the required saturating one.