Consider the circuit in the diagram. The \oplus operator represents Ex-OR…
Consider the circuit in the diagram. The \oplus operator represents Ex-OR. The D flip-flops are initialized to zeros (cleared). \draw (0,0) node[flipflop, flipflop def={t1={\ensuremath{D_0}}, c3=1, t6={\ensuremath{Q_0}}}] (F0) {}; \draw (5.6,0) node[flipflop, flipflop def={t1={\ensuremath{D_1}}, c3=1, t6={\ensuremath{Q_1}}}] (F1) {}; \draw (10.2,0) node[flipflop, flipflop def={t1={\ensuremath{D_2}}, c3=1, t6={\ensuremath{Q_2}}}] (F2) {}; \draw (F0.pin 1) -- ++(-1.4,0) node[left]{data}; \draw (F1.pin 1) -- ++(-0.6,0) node[xor port, anchor=out] (X) {}; \draw (F0.pin 6) -- ++(0.5,0) |- (X.in 2); \draw (F1.pin 6) -- (F2.pin 1); \draw (F2.pin 6) -- ++(0.8,0) node[circ]{} -- ++(0.6,0) node[right]{\ensuremath{Q_2}}; \draw ([xshift=0.8cm]F2.pin 6) |- ([xshift=-0.6cm]X.in 1 |- 0,2.4) |- (X.in 1); \foreach \f in {F0,F1,F2} { \draw (\f.pin 3) -- ++(-0.5,0) -- ([xshift=-0.5cm]\f.pin 3 |- 0,-2.2); } \draw ([xshift=-0.5cm]F0.pin 3 |- 0,-2.2) -- ([xshift=1.6cm]F2.pin 4 |- 0,-2.2) node[right]{CLK}; \draw ([xshift=-0.5cm]F1.pin 3 |- 0,-2.2) node[circ]{}; \draw ([xshift=-0.5cm]F2.pin 3 |- 0,-2.2) node[circ]{}; The following data: 100110000 is supplied to the "data" terminal in nine clock cycles. After that the values of Q_2Q_1Q_0 are
- $000$
- $001$
- $010$
- $101$
Correct answer
C. $010$
Explanation
From the figure: $D_0 = data$, $D_1 = Q_0 \oplus Q_2$, $D_2 = Q_1$. Apply the data bits left to right, starting from $Q_2Q_1Q_0 = 000$: {c|c|c} Clock & data & Q_2Q_1Q_0 \\ \hline 1 & 1 & 001 \\ 2 & 0 & 010 \\ 3 & 0 & 100 \\ 4 & 1 & 011 \\ 5 & 1 & 111 \\ 6 & 0 & 100 \\ 7 & 0 & 010 \\ 8 & 0 & 100 \\ 9 & 0 & 010 After nine clocks $Q_2Q_1Q_0 = 010$. Answer: (c).