Consider the circuit in the diagram. The ⊕ operator represents Ex-OR. The D…

2006

Consider the circuit in the diagram. The ⊕ operator represents Ex-OR. The D flipflops are initialized to zeroes (cleared).

image.png

 The following data: 100110000 is supplied to the “data” terminal in nine clock cycles. After that the values of q2q1q0 are:

  1. A.

    000

  2. B.

    001

  3. C.

    010

  4. D.

    101

Attempted by 20 students.

Show answer & explanation

Correct answer: C

Key idea: On each clock the register shifts: q2 becomes the previous q1, q1 becomes the previous q0, and q0 becomes data XOR the previous q2.

Initialize: q2 q1 q0 = 000.

  1. After clock 1 (input 1): q0 = 1 XOR 0 = 1 → state = 001

  2. After clock 2 (input 0): q0 = 0 XOR 0 = 0 → state = 010

  3. After clock 3 (input 0): q0 = 0 XOR 0 = 0 → state = 100

  4. After clock 4 (input 1): q0 = 1 XOR 1 = 0 → state = 000

  5. After clock 5 (input 1): q0 = 1 XOR 0 = 1 → state = 001

  6. After clock 6 (input 0): q0 = 0 XOR 0 = 0 → state = 010

  7. After clock 7 (input 0): q0 = 0 XOR 0 = 0 → state = 100

  8. After clock 8 (input 0): q0 = 0 XOR 1 = 1 → state = 001

  9. After clock 9 (input 0): q0 = 0 XOR 0 = 0 → state = 010

Conclusion: After nine clocks the register contains q2 q1 q0 = 010.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir