Question

Consider a 4-bit Johnson counter with an initial value of 00000000. The counting sequence of this counter is:

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2015 answer key

Solution

Trace the register state transitions of a 4-bit twisted ring (Johnson) counter.

A 4-bit Johnson counter uses four flip-flops (Q3,Q2,Q1,Q0)(Q_3, Q_2, Q_1, Q_0) where the serial input to the highest bit is the inverted output of the lowest bit: D3=Q0‾D_3 = \overline{Q_0}, with shift Qi(t+1)=Qi+1(t)Q_i(t+1) = Q_{i+1}(t).

Tracing starting from 00002=00000_2 = 0:

  1. State 0: 00002=00000_2 = 0
  2. Next: D3=0‾=1  ⟹  10002=8D_3 = \overline{0} = 1 \implies 1000_2 = 8
  3. Next: D3=0‾=1  ⟹  11002=12D_3 = \overline{0} = 1 \implies 1100_2 = 12
  4. Next: D3=0‾=1  ⟹  11102=14D_3 = \overline{0} = 1 \implies 1110_2 = 14
  5. Next: D3=0‾=1  ⟹  11112=15D_3 = \overline{0} = 1 \implies 1111_2 = 15
  6. Next: D3=1‾=0  ⟹  01112=7D_3 = \overline{1} = 0 \implies 0111_2 = 7
  7. Next: D3=1‾=0  ⟹  00112=3D_3 = \overline{1} = 0 \implies 0011_2 = 3
  8. Next: D3=1‾=0  ⟹  00012=1D_3 = \overline{1} = 0 \implies 0001_2 = 1
  9. Next: D3=1‾=0  ⟹  00002=0D_3 = \overline{1} = 0 \implies 0000_2 = 0

The sequence of decimal states is:

0,8,12,14,15,7,3,1,0.0, 8, 12, 14, 15, 7, 3, 1, 0.

This matches option D.

Final answer

D

Common trap

Tracing in the opposite shift direction without checking the option values, or confusing Johnson counter with a standard ring counter.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2015 Computer Science and Information Technology (CS) Session 1
Question
30 of 65, printed as CS Q.20
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.