GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A clock is high during 0-10, 20-30, 40-50 and 60-70 ns and low otherwise. D starts at 0 with Q = 0, and D changes at 3 ns (→1), 8 (→0), 12 (→1), 25 (→0), 27 (→1), 33 (→0), 44 (→1), 52 (→0), 55 (→1) and 66 ns (→0). Q is observed from 0 to 80 ns. How many times does Q change value in each of the following: a D latch transparent while the clock is high, a rising-edge D flip-flop, and a falling-edge D flip-flop?
- A. Latch 6, rising-edge FF 3, falling-edge FF 2
- B. Latch 8, rising-edge FF 2, falling-edge FF 3
- C. Latch 8, rising-edge FF 3, falling-edge FF 2
- D. Latch 8, rising-edge FF 3, falling-edge FF 3
Correct answer: C. Latch 8, rising-edge FF 3, falling-edge FF 2
The latch passes every D change that happens while the clock is high and, at each rising edge, updates Q to the current D (even if D changed during the low phase). The rising-edge FF samples D at 20, 40, 60 ns (1, 0, 1: three changes); the falling-edge FF samples at 10, 30, 50, 70 ns (0, 1, 1, 0: two changes).
More Digital Logic questions
- An 8-bit adder adds two operands a and b (no carry-in), each treated as an 8-bit two's complement number. Over all 2¹⁶ operand pairs, for…
- An 8-bit adder adds two 8-bit operands a and b with no carry-in, producing the carry-out C8 and the signed (two's complement) overflow…
- A 4-bit ALU computes A − B as A + B' + 1 and sets C (the adder's carry-out) and V (signed two's complement overflow). Over all 256 ordered…
- A 4-bit two's complement adder computes A + B + Cin. Over all 512 combinations of A, B (each −8 to 7) and Cin (0 or 1), for how many is…
- Over one complete cycle of 10 counts (back to the starting state), how many flip-flop toggles in total does (i) a synchronous 4-bit BCD…
- The 8-bit binary-reflected Gray code of x is g(x) = x XOR (x >> 1). For how many of the 256 values of x does g(x) contain exactly two 1…