Skip to main content

Chapter 8 · 5 hours

Counters

IOE past exam questions

Past questions and answers

38 questions set from this chapter, 7 of them more than once. Most asked first.

  • Asked 3 times
  • 2081 Bhadra · 7 marks
  • 2080 Bhadra · 7 marks
  • 2076 Asoj

Design a mod-5 synchronous counter using positive edge-triggered JK flip flops.

Answer

A mod-5 synchronous counter counts 0, 1, 2, 3, 4 and returns to 0 (5 states). Since 22<5≤232^2 < 5 \le 2^3, 3 flip-flops (Q2 Q1 Q0, Q2 = MSB) are needed. All flip-flops get the same clock (positive edge triggered J-K), and the J, K inputs are found from the excitation table.

Step 1: state diagram

 000 -> 001 -> 010 -> 011 -> 100
  ^                            |
  +----------------------------+
 Unused: 101, 110, 111 (don't cares)

Step 2: J-K excitation table

QQ+JK
000x
011x
10x1
11x0

Step 3: state table with flip-flop inputs

StateQ2Q1Q0Q2+Q1+Q0+J2K2J1K1J0K0
00000010x0x1x
10010100x1xx1
20100110xx01x
30111001xx1x1
4100000x10x0x

States 5, 6 and 7 never occur, so all their inputs are don't cares (x).

Step 4: K-maps and simplified expressions

K-map for J2
Q2\Q1Q0  00  01  11  10
  0       0   0   1   0
  1       x   x   x   x

K-map for K2
Q2\Q1Q0  00  01  11  10
  0       x   x   x   x
  1       1   x   x   x

K-map for J1
Q2\Q1Q0  00  01  11  10
  0       0   1   x   x
  1       0   x   x   x

K-map for K1
Q2\Q1Q0  00  01  11  10
  0       x   x   1   0
  1       x   x   x   x

K-map for J0
Q2\Q1Q0  00  01  11  10
  0       1   x   x   1
  1       0   x   x   x

K-map for K0
Q2\Q1Q0  00  01  11  10
  0       x   1   1   x
  1       x   x   x   x
J2=Q1Q0,K2=1J1=Q0,K1=Q0J0=Q2‾,K0=1\begin{aligned} J_2 &= Q_1 Q_0, & K_2 &= 1 \\ J_1 &= Q_0, & K_1 &= Q_0 \\ J_0 &= \overline{Q_2}, & K_0 &= 1 \end{aligned}

Step 5: logic diagram

     +--------+    +--------+    +--------+
 J0->|J0   Q0 |J1->|J1   Q1 |J2->|J2   Q2 |
 K0->|K0  Q0' |K1->|K1  Q1' |K2->|K2  Q2' |
     |>  FF0  |    |>  FF1  |    |>  FF2  |
     +--------+    +--------+    +--------+
 CLK ---^-------------^-------------^
 Input connections:
   J0 <- Q2'            K0 <- 1 (HIGH)
   J1 <- Q0             K1 <- Q0
   J2 <- AND(Q1, Q0)    K2 <- 1 (HIGH)

Timing diagram

       1   2   3   4   5   6   7
CLK   _|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|
Q0    _|‾‾‾|___|‾‾‾|_______|‾‾‾|__
Q1    _____|‾‾‾‾‾‾‾|___________|‾‾
Q2    _____________|‾‾‾|__________

The counter goes 000, 001, 010, 011, 100, 000, ...; Q2 is high for one clock in five, so the output frequency is fCLK/5f_{CLK}/5.

Unused states check: with these equations, 101 goes to 010, 110 goes to 010 and 111 goes to 000, so the counter returns to the main sequence by itself (self-starting).

  • Asked 3 times
  • 2082 Baisakh · 5 marks
  • 2078 Kartik · 7 marks
  • 2076 Asoj · 5 marks

Construct asynchronous T flip-flopped mod-12 up-counter and use positive edge triggered clock.

Answer

A mod-12 asynchronous (ripple) up counter counts 0 to 11 (0000 to 1011) and then resets to 0000. Since 23<12≤242^3 < 12 \le 2^4, 4 T flip-flops are needed. Each flip-flop has T = 1, so it toggles at every active clock edge it receives.

Clock connections for positive edge triggering

In an up counter, a flip-flop must toggle when the previous output goes 1 to 0. With positive (rising) edge triggered flip-flops, this 1-to-0 change of Q is the same instant as the 0-to-1 change of Q‾\overline{Q}. So:

  • FF0 is clocked by the external CLK.
  • FF1 is clocked by Q0‾\overline{Q_0}, FF2 by Q1‾\overline{Q_1}, FF3 by Q2‾\overline{Q_2}.

Reset logic

The count must stop at 11, so the first unwanted state 12 = 1100 is detected. In 1100 only Q3 and Q2 are 1 (and no earlier count 0 to 11 has both Q3 and Q2 = 1), so

CLR‾=Q3Q2‾\overline{CLR} = \overline{Q_3 Q_2}

A 2-input NAND gate drives the active-low CLEAR inputs of all flip-flops. As soon as 1100 appears, the NAND output goes 0 and all flip-flops clear to 0000 (state 1100 exists only for a few ns).

Circuit

      T=1          T=1          T=1          T=1
    +------+     +------+     +------+     +------+
CLK>|> FF0 | +-->|> FF1 | +-->|> FF2 | +-->|> FF3 |
    |   Q0'|-+   |   Q1'|-+   |   Q2'|-+   |      |
    | CLR' |     | CLR' |     | CLR' |     | CLR' |
    +------+     +------+     +------+     +------+
 Outputs: Q0 (LSB), Q1, Q2, Q3 (MSB)
 Q3 --+
      +-->[NAND]--> CLR' of all four flip-flops
 Q2 --+

Count sequence

CLKQ3Q2Q1Q0Count
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
10101010
11101111
1200000

At the 12th clock the counter reaches 1100 for a moment and is immediately cleared to 0000.

Timing diagram

      1   2   3   4   5   6   7   8   9   10  11  12
CLK  _|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|
Q0   _|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|__
Q1   _____|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|__
Q2   _____________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|__________________
Q3   _____________________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|__

Q0 toggles at every rising edge of CLK; Q1 toggles when Q0 falls; Q2 when Q1 falls; Q3 when Q2 falls. Q3 is high for counts 8 to 11, so Q3 has frequency fCLK/12f_{CLK}/12. (In a real ripple counter each change is delayed by one flip-flop delay from the previous stage.)

  • Asked 3 times
  • 2082 Shrawan · 7 marks
  • 2081 Bhadra · 7 marks
  • 2075 Chaitra · 7 marks

Design a mod-6 synchronous counter using T Flip-Flops with timing diagrams.

Answer

A mod-6 synchronous counter goes through 6 states, 0 to 5 (000 to 101), and then returns to 000. Since 22<6≤232^2 < 6 \le 2^3, 3 T flip-flops (Q2 Q1 Q0, Q2 = MSB) with a common clock are used. A T flip-flop must have T = 1 whenever its output has to change.

Step 1: state diagram

 000 -> 001 -> 010 -> 011 -> 100 -> 101
  ^                                   |
  +-----------------------------------+
 Unused: 110, 111 (don't cares)

Step 2: T excitation table

QQ+T
000
011
101
110

Step 3: state table with flip-flop inputs

StateQ2Q1Q0Q2+Q1+Q0+T2T1T0
0000001001
1001010011
2010011001
3011100111
4100101001
5101000101

Step 4: K-maps

K-map for T2
Q2\Q1Q0  00  01  11  10
  0       0   0   1   0
  1       0   1   x   x

K-map for T1
Q2\Q1Q0  00  01  11  10
  0       0   1   1   0
  1       0   0   x   x

K-map for T0
Q2\Q1Q0  00  01  11  10
  0       1   1   1   1
  1       1   1   x   x
  • T0T_0: all used states are 1, so T0=1T_0 = 1.
  • T1T_1: 1s at states 1 and 3; state 5 is 0, so T1=Q0Q2‾T_1 = Q_0 \overline{Q_2}.
  • T2T_2: 1s at states 3 and 5; with don't care 7: T2=Q1Q0+Q2Q0T_2 = Q_1 Q_0 + Q_2 Q_0.
T0=1T1=Q0 Q2‾T2=Q0Q1+Q0Q2=Q0(Q1+Q2)\begin{aligned} T_0 &= 1 \\ T_1 &= Q_0\,\overline{Q_2} \\ T_2 &= Q_0 Q_1 + Q_0 Q_2 = Q_0 (Q_1 + Q_2) \end{aligned}

Step 5: logic diagram

  1           T1            T2
  |           |             |
 +----+      +----+        +----+
 |T0  |      |T1  |        |T2  |
 | FF0|--Q0  | FF1|--Q1    | FF2|--Q2
 |>   |      |>   |        |>   |
 +----+      +----+        +----+
  ^           ^             ^
 CLK ---------+-------------+   (common clock)

 T1 = Q0 AND Q2'       : one 2-input AND
 T2 = Q0.Q1 + Q0.Q2    : two ANDs + one OR
                         (= Q0 AND (Q1 OR Q2))

Timing diagram

       1   2   3   4   5   6   7
CLK   _|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|
Q0    _|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾
Q1    _____|‾‾‾‾‾‾‾|______________
Q2    _____________|‾‾‾‾‾‾‾|______

The output sequence is 000, 001, 010, 011, 100, 101, 000, ...; Q2 is high for two clocks out of six, so its frequency is fCLK/6f_{CLK}/6.

Unused states: 110 goes to 111 and 111 goes to 010, so the counter enters the main count by itself (self-starting).

  • Asked 2 times
  • 2076 Chaitra · 8 marks
  • 2069 Chaitra · 8 marks

Design the synchronous decade counter using T flip-flop and also show its timing diagram.

Answer

A synchronous decade (BCD / mod-10) counter counts from 0000 to 1001 (0 to 9) and returns to 0000 on the 10th clock pulse. All flip-flops receive the same clock, so they change state together.

Step 1: Number of flip-flops and states

  • 10 states are needed, so 2n≥10⇒n=42^n \ge 10 \Rightarrow n = 4 T flip-flops (Q3Q2Q1Q0Q_3Q_2Q_1Q_0, Q0Q_0 = LSB).
  • Used states: 0000 to 1001. Unused states 1010 to 1111 are taken as don't cares (X).
  • T flip-flop excitation: T=Q⊕Q+T = Q \oplus Q^+ (T = 1 whenever the flip-flop must change).

Step 2: Excitation table

Present Q3Q2Q1Q0Next Q3Q2Q1Q0T3T2T1T0
000000010001
000100100011
001000110001
001101000111
010001010001
010101100011
011001110001
011110001111
100010010001
100100001001

Step 3: K-maps (X = don't care)

T0=1T_0 = 1 for every state. The other inputs:

T1: Q3Q2 / Q1Q000011110
000110
010110
11XXXX
1000XX
T2: Q3Q2 / Q1Q000011110
000010
010010
11XXXX
1000XX
T3: Q3Q2 / Q1Q000011110
000000
010010
11XXXX
1001XX

Step 4: Simplified equations

T3=Q3Q0+Q2Q1Q0T2=Q1Q0T1=Q3‾Q0T0=1\begin{aligned} &T_3 = Q_3Q_0 + Q_2Q_1Q_0 \\ &T_2 = Q_1Q_0 \\ &T_1 = \overline{Q_3}Q_0 \\ &T_0 = 1 \end{aligned}

So two 2-input AND gates (Q3‾Q0\overline{Q_3}Q_0 and Q1Q0Q_1Q_0), one 3-input AND (Q2Q1Q0Q_2Q_1Q_0), one 2-input AND (Q3Q0Q_3Q_0) and one OR gate for T3T_3 are needed.

Step 5: Circuit diagram

   +-----+       +-----+       +-----+       +-----+
T0>|T   Q|-Q0 T1>|T   Q|-Q1 T2>|T   Q|-Q2 T3>|T   Q|-Q3
   | FF0 |       | FF1 |       | FF2 |       | FF3 |
   |     |       |     |       |     |       |     |
   +--o--+       +--o--+       +--o--+       +--o--+
      |             |             |             |
CLK---+-------------+-------------+-------------+
T0 = 1          T1 = Q3'.Q0
T2 = Q1.Q0      T3 = Q3.Q0 + Q2.Q1.Q0

Step 6: Timing diagram (negative-edge clock)

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|_______
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   6   7   8   9   0   1

Q0Q_0 toggles on every clock edge, Q1Q_1 toggles when Q0=1Q_0 = 1 (except at count 9), Q2Q_2 toggles when Q1Q0=1Q_1Q_0 = 1, and Q3Q_3 goes high at count 8 and returns low after count 9. The counter therefore divides the clock frequency by 10 (fQ3=fclk/10f_{Q_3} = f_{clk}/10).

Self-starting check: the unused states go back into the count (1010→1011→0110, 1100→1101→0100, 1110→1111→0010), so the counter cannot lock out.

  • Asked 2 times
  • 2078 Bhadra · 6 marks
  • 2074 Chaitra · 6 marks

Explain the operation of 3 bit Asynchronous up/down counter with timing diagram.

Answer

An asynchronous up/down counter is a ripple counter that can count either upward (0, 1, 2, …, 7) or downward (7, 6, …, 0) depending on a mode control input M. Only the first flip-flop gets the external clock; each later flip-flop is clocked by the previous stage.

Principle

For negative-edge triggered JK flip-flops with J=K=1J = K = 1 (toggle mode):

  • Up count: the next flip-flop must toggle when the previous output goes 1→01 \to 0, so it is clocked from QQ.
  • Down count: the next flip-flop must toggle when the previous output goes 0→10 \to 1, i.e. when Q‾\overline{Q} goes 1→01 \to 0, so it is clocked from Q‾\overline{Q}.

A 2-input AND-OR (or MUX) between stages selects QQ or Q‾\overline{Q}:

CLK1=M Q0+M‾ Q0‾,CLK2=M Q1+M‾ Q1‾CLK_1 = M\,Q_0 + \overline{M}\,\overline{Q_0}, \qquad CLK_2 = M\,Q_1 + \overline{M}\,\overline{Q_1}

M = 1 gives up counting, M = 0 gives down counting.

Circuit

 M=1: UP    M=0: DOWN      (all J = K = 1)

       +-----+  Q0 --[AND]--+
CLK --o| FF0 |       M      +--[OR]--> CLK of FF1
       +-----+ Q0' --[AND]--+
                     M'
       +-----+  Q1 --[AND]--+
 ... -o| FF1 |       M      +--[OR]--> CLK of FF2
       +-----+ Q1' --[AND]--+
                     M'

Outputs Q2Q1Q0Q_2Q_1Q_0 (Q0 = LSB) give the count.

Operation

  1. M = 1 (up): FF0 toggles on every falling clock edge. When Q0Q_0 falls from 1 to 0, FF1 toggles; when Q1Q_1 falls, FF2 toggles. Sequence: 000, 001, 010, …, 111, 000.
  2. M = 0 (down): FF1 toggles when Q0Q_0 rises (its Q0‾\overline{Q_0} falls), and FF2 toggles when Q1Q_1 rises. Sequence: 000, 111, 110, …, 001, 000.

Timing diagram: up mode (M = 1)

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   0

Timing diagram: down mode (M = 0)

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q1   ____|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    7   6   5   4   3   2   1   0

Points to note

  • Each stage waits for the previous one, so the total delay is 3 tpd3\,t_{pd} and short false states appear during transitions.
  • The mode M should be changed only when the clock is steady; switching M can create an extra edge at the next stage and give a wrong count.
  • Asked 2 times
  • 2076 Chaitra · 8 marks
  • 2072 Chaitra · 7 marks

Design and draw the circuit diagram of a 3 bit gray code synchronous counter.

Answer

A 3-bit Gray code counter steps through the 3-bit Gray sequence, in which only one bit changes between successive counts: 000 → 001 → 011 → 010 → 110 → 111 → 101 → 100 → 000. A synchronous design with JK flip-flops is given below.

Step 1: Flip-flops

8 states, so 3 JK flip-flops (Q2Q1Q0Q_2Q_1Q_0) with a common clock. No unused states.

JK excitation: 0→0: J=0, K=X; 0→1: J=1, K=X; 1→0: J=X, K=1; 1→1: J=X, K=0.

Step 2: Excitation table

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
0000010X0X1X
0010110X1XX0
0110100XX0X1
0101101XX00X
110111X0X01X
111101X0X1X0
101100X00XX1
100000X10X0X

Step 3: K-maps

J0: Q2 / Q1Q000011110
01XX0
10XX1
K0: Q2 / Q1Q000011110
0X01X
1X10X
J1: Q2 / Q1Q000011110
001XX
100XX
K1: Q2 / Q1Q000011110
0XX00
1XX10
J2: Q2 / Q1Q000011110
00001
1XXXX
K2: Q2 / Q1Q000011110
0XXXX
11000

Step 4: Equations

J2=Q1Q0‾,K2=Q1‾Q0‾J1=Q2‾Q0,K1=Q2Q0J0=Q2Q1+Q2‾Q1‾,K0=Q2Q1‾+Q2‾Q1\begin{aligned} &J_2 = Q_1\overline{Q_0},\quad K_2 = \overline{Q_1}\overline{Q_0} \\ &J_1 = \overline{Q_2}Q_0,\quad K_1 = Q_2Q_0 \\ &J_0 = Q_2Q_1 + \overline{Q_2}\overline{Q_1},\quad K_0 = Q_2\overline{Q_1} + \overline{Q_2}Q_1 \end{aligned}

So J0=Q2⊕Q1‾J_0 = \overline{Q_2 \oplus Q_1} (XNOR) and K0=Q2⊕Q1K_0 = Q_2 \oplus Q_1 (XOR).

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = XNOR(Q2,Q1)   K0 = XOR(Q2,Q1)
J1 = Q2'.Q0        K1 = Q2.Q0
J2 = Q1.Q0'        K2 = Q1'.Q0'

Gates needed: one XOR, one XNOR (or XOR + NOT) and four 2-input AND gates.

Step 6: Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q1   ________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______
Cnt  000  001 011 010 110 111 101 100 000

Only one output changes at each clock edge, which is the main advantage of a Gray code counter (no decoding glitches, low noise).

  • Asked 2 times
  • 2075 Chaitra · 5 marks
  • 2072 Chaitra · 5+2 marks

Construct an Asynchronous Decade counter.

Answer

An asynchronous (ripple) decade counter is a mod-10 ripple counter: it counts 0000 to 1001 and resets to 0000 on the 10th clock pulse.

Design

  • Number of flip-flops: 2n≥10⇒n=42^n \ge 10 \Rightarrow n = 4 JK flip-flops, negative-edge triggered, all with J=K=1J = K = 1 (toggle mode).
  • The clock drives FF0 only; Q0Q_0 clocks FF1, Q1Q_1 clocks FF2, Q2Q_2 clocks FF3.
  • The counter must reset when the count reaches 10 = 1010. In 1010, Q3=1Q_3 = 1 and Q1=1Q_1 = 1; this is the first count in which both are 1. So a 2-input NAND gate of Q3Q_3 and Q1Q_1 drives the active-low CLEAR inputs of all flip-flops.

Circuit diagram

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q1  ---|      |

Count sequence

ClockQ3 Q2 Q1 Q0Decimal
00 0 0 00
10 0 0 11
20 0 1 02
30 0 1 13
40 1 0 04
50 1 0 15
60 1 1 06
70 1 1 17
81 0 0 08
91 0 0 19
101 0 1 0 → 0 0 0 00 (reset)

Operation

On each falling clock edge FF0 toggles. Each later flip-flop toggles when the previous output falls from 1 to 0, so the count goes up by one per clock. At the 10th pulse the counter momentarily enters 1010; NAND output goes low and clears all flip-flops to 0000 within a few nanoseconds. The state 1010 lasts only for this short time, so the counter shows 0 to 9.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   0

(A very short spike on Q1Q_1 at the 10th edge, caused by the 1010 state, is ignored in the ideal diagram.) Q3Q_3 has a frequency of fclk/10f_{clk}/10, so the circuit is also a divide-by-10 circuit. IC 7490 is a ready-made decade ripple counter.

  • 2081 Bhadra · 2+6 marks

Define a sequential logic circuit. Explain the mod-10 negative edge-triggered ripple counter with its timing diagram. Use JK flip-flops in your design.

Answer

Sequential logic circuit

A sequential logic circuit is a circuit whose output depends on the present inputs and on the past history (stored state) of the circuit. It contains memory elements (flip-flops or latches) and a feedback path; flip-flops, registers and counters are examples.

Mod-10 negative-edge ripple counter

A mod-10 (decade) ripple counter has 10 states, 0000 to 1001. Since 23<10≤242^3 < 10 \le 2^4, four JK flip-flops are used.

Connections

  • All J and K inputs are tied to logic 1, so every flip-flop toggles on its active (falling) clock edge.
  • The external clock goes to FF0 only. Q0Q_0 is the clock of FF1, Q1Q_1 of FF2 and Q2Q_2 of FF3 (negative-edge triggering means a stage toggles when the previous Q falls from 1 to 0, which gives up counting).
  • Count 10 = 1010 must not be held. It is the first state with Q3=Q1=1Q_3 = Q_1 = 1, so Q3Q1‾\overline{Q_3Q_1} (NAND) is fed to the active-low CLEAR of all flip-flops.
     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q1  ---|      |

Operation

  1. Initially all flip-flops are cleared: Q3Q2Q1Q0=0000Q_3Q_2Q_1Q_0 = 0000.
  2. Every falling clock edge toggles FF0. Whenever Q0Q_0 goes 1→0, FF1 toggles; whenever Q1Q_1 goes 1→0, FF2 toggles; whenever Q2Q_2 goes 1→0, FF3 toggles. The count rises 0, 1, 2, …, 9.
  3. On the 10th falling edge the outputs try to become 1010. At once the NAND output goes low and clears all flip-flops, so the counter returns to 0000. The false state 1010 exists only for a few nanoseconds.
Clock pulse012345678910
Q300000000110
Q200001111000
Q100110011000
Q001010101010

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   0

Each output changes on the falling edge of the signal that clocks it. Q3Q_3 is high only for counts 8 and 9, and its frequency is fclk/10f_{clk}/10. In a real circuit each stage adds a propagation delay tpdt_{pd}, so the outputs ripple and a narrow spike appears on Q1Q_1 at the reset.

  • 2081 Baisakh · 2+6 marks

Differentiate between synchronous and asynchronous counter. Design 3-bit synchronous down counter using JK flip-flops.

Answer

Synchronous vs asynchronous counter

PointSynchronous counterAsynchronous (ripple) counter
ClockCommon clock to all flip-flopsOnly FF0 gets the clock; each next FF is clocked by the previous output
Change of stateAll flip-flops change togetherFlip-flops change one after another (ripple)
DelayOne FF delay + gate delayAdds up: n×tpdn \times t_{pd}
SpeedFast, high clock frequencySlow, frequency falls as nn grows
CircuitNeeds extra gating logicSimple, few or no extra gates
Decoding glitchesNone (no false states)Momentary false states give glitches
Example ICs74160/74163, 741907490, 7493

Design of 3-bit synchronous down counter (JK)

A 3-bit down counter counts 7, 6, 5, …, 0 and then returns to 7. Three JK flip-flops (Q2Q1Q0Q_2Q_1Q_0) share one clock.

Excitation table (JK: 0→0: 0X, 0→1: 1X, 1→0: X1, 1→1: X0)

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
111110X0X0X1
110101X0X11X
101100X00XX1
100011X11X1X
0110100XX0X1
0100010XX11X
0010000X0XX1
0001111X1X1X

K-maps

J1: Q2 / Q1Q000011110
010XX
110XX
J2: Q2 / Q1Q000011110
01000
1XXXX

J0J_0 and K0K_0 are 1 in every row (Q0 toggles every clock), so J0=K0=1J_0 = K_0 = 1. J1J_1 and K1K_1 have the same map, and so do J2J_2 and K2K_2.

Equations

J2=Q1‾Q0‾,K2=Q1‾Q0‾J1=Q0‾,K1=Q0‾J0=1,K0=1\begin{aligned} &J_2 = \overline{Q_1}\overline{Q_0},\quad K_2 = \overline{Q_1}\overline{Q_0} \\ &J_1 = \overline{Q_0},\quad K_1 = \overline{Q_0} \\ &J_0 = 1,\quad K_0 = 1 \end{aligned}

In words, a stage toggles when all lower bits are 0 (the "borrow" condition), just as an up counter stage toggles when all lower bits are 1.

Circuit diagram

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = K0 = 1
J1 = K1 = Q0'
J2 = K2 = Q1'.Q0'   (one 2-input AND gate)

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q1   ____|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    7   6   5   4   3   2   1   0

All outputs change together on the falling clock edge, so no ripple delay or false state appears.

  • 2080 Bhadra · 2+6 marks

Define a ripple counter. Design an asynchronous mod-11 up-counter with negative edge triggering clock.

Answer

Ripple counter

A ripple counter is an asynchronous counter in which only the first flip-flop is driven by the external clock and each following flip-flop is clocked by the output of the previous one. The change of state "ripples" through the chain, one flip-flop after another.

Design: asynchronous mod-11 up counter

  1. Number of flip-flops: a mod-11 counter needs 11 states (0 to 10). 23=8<11≤24=162^3 = 8 < 11 \le 2^4 = 16, so 4 flip-flops are needed. JK flip-flops with J=K=1J = K = 1 (toggle) and negative-edge clocks are used.
  2. Clocking: CLK → FF0; Q0Q_0 → clock of FF1; Q1Q_1 → FF2; Q2Q_2 → FF3. With falling-edge triggering, using Q as the next clock gives an up count.
  3. Reset logic: the counter should go from 10 (1010) back to 0. So it must be cleared as soon as it reaches 11 = 1011. In 1011, Q3=Q1=Q0=1Q_3 = Q_1 = Q_0 = 1. In the states 0 to 10, these three bits are never all 1, so a 3-input NAND gate of Q3,Q1,Q0Q_3, Q_1, Q_0 drives the active-low CLEAR of all flip-flops.
CLR‾=Q3 Q1 Q0‾\overline{CLR} = \overline{Q_3\,Q_1\,Q_0}

Circuit diagram

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
Q1  ---| NAND |o--> CLR of all FFs (active low)
Q0  ---|      |

Count table

ClockQ3 Q2 Q1 Q0Count
000000
1–70001 … 01111–7
810008
910019
10101010
111011 → 00000 (cleared)

Operation: each falling clock edge toggles FF0, and each stage toggles when the previous output falls 1→0, so the count increases by one per pulse. On the 11th pulse the state 1011 appears for a moment, the NAND output becomes 0, all flip-flops clear, and the count restarts from 0000.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾|___
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|_______
Cnt  0    1   2   3   4   5   6   7   8   9   10  0

Q3Q_3 is high for counts 8, 9 and 10, so the output frequency at Q3Q_3 is fclk/11f_{clk}/11.

  • 2080 Baisakh · 8 marks

Design mod-5 Gray code synchronous up-counter with negative edge triggering clock system. (Use JK flip-flops).

Answer

A mod-5 Gray code counter steps through the first five codes of the 3-bit Gray sequence, changing only one bit per clock:

000→001→011→010→110→000000 \to 001 \to 011 \to 010 \to 110 \to 000

Step 1: Flip-flops and unused states

  • 5 states need n=3n = 3 JK flip-flops (Q2Q1Q0Q_2Q_1Q_0), all clocked together on the negative (falling) edge.
  • Unused states 100, 101 and 111 are treated as don't cares (X).

Step 2: Excitation table

JK excitation: 0→0: J=0, K=X; 0→1: J=1, K=X; 1→0: J=X, K=1; 1→1: J=X, K=0.

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
0000010X0X1X
0010110X1XX0
0110100XX0X1
0101101XX00X
110000X1X10X

Step 3: K-maps

J0: Q2 / Q1Q000011110
01XX0
1XXX0
K0: Q2 / Q1Q000011110
0X01X
1XXXX
J1: Q2 / Q1Q000011110
001XX
1XXXX
K1: Q2 / Q1Q000011110
0XX00
1XXX1
J2: Q2 / Q1Q000011110
00001
1XXXX

K2K_2: Q2 = 1 only in state 110, where it must reset, and the other cells are X, so K2=1K_2 = 1.

Step 4: Equations

J2=Q1Q0‾,K2=1J1=Q0,K1=Q2J0=Q1‾,K0=Q1\begin{aligned} &J_2 = Q_1\overline{Q_0},\quad K_2 = 1 \\ &J_1 = Q_0,\quad K_1 = Q_2 \\ &J_0 = \overline{Q_1},\quad K_0 = Q_1 \end{aligned}

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = Q1'    K0 = Q1
J1 = Q0     K1 = Q2
J2 = Q1.Q0' K2 = 1

Only one AND gate and one inverter are needed (Q1‾\overline{Q_1} and Q0‾\overline{Q_0} can be taken from the flip-flops' Q‾\overline{Q} outputs, so in practice just one 2-input AND gate).

Step 6: Check of unused states

Unused stateNext state
100001
101011
111000

All unused states enter the main sequence after one clock, so the counter is self-starting.

Step 7: Timing diagram (negative edge)

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾‾‾‾‾|_______|‾‾‾
Q0   ____|‾‾‾‾‾‾‾|___________|‾‾‾‾‾‾‾
Cnt  000  001 011 010 110 000 001 011
  • 2079 Baisakh · 2+4 marks

Differentiate between combinational and sequential circuits. Explain the operation of asynchronous mod-12 counter with timing diagrams.

Answer

Combinational vs sequential circuits

PointCombinational circuitSequential circuit
Output depends onPresent inputs onlyPresent inputs and past state
MemoryNo memoryHas memory (flip-flops/latches)
FeedbackNo feedback pathFeedback from output to input
ClockNot neededUsually clocked
Analysis toolTruth tableState table / state diagram
ExamplesAdder, MUX, decoderFlip-flop, register, counter

Asynchronous mod-12 counter

A mod-12 ripple counter counts 0 to 11 and returns to 0 on the 12th clock pulse. Four negative-edge JK flip-flops (24=16≥122^4 = 16 \ge 12) are used with J=K=1J = K = 1. CLK drives FF0, and Q0Q_0, Q1Q_1, Q2Q_2 clock FF1, FF2, FF3.

The counter must be cleared at 12 = 1100. It is the first count with Q3=Q2=1Q_3 = Q_2 = 1, so a 2-input NAND of Q3Q_3 and Q2Q_2 drives the active-low CLEAR of all flip-flops.

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q2  ---|      |

Operation: FF0 toggles on every falling clock edge; each later flip-flop toggles when the previous Q falls 1→0, so the count goes 0000, 0001, …, 1011. At the 12th pulse the counter momentarily reaches 1100, the NAND output goes low and all flip-flops clear to 0000.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   10  11  0

Q3Q_3 is high for counts 8 to 11, so fQ3=fclk/12f_{Q_3} = f_{clk}/12.

  • 2079 Baisakh · 2+6 marks

Define Synchronous and Asynchronous counter. Design a MOD-10 synchronous counter and draw its timing diagram.

Answer

Definitions

  • Synchronous counter: a counter in which all flip-flops are driven by the same clock pulse, so all outputs change at the same time. Logic gates decide which flip-flops toggle.
  • Asynchronous (ripple) counter: a counter in which only the first flip-flop gets the external clock; each later flip-flop is clocked by the output of the previous one, so the outputs change one after another.

Design of MOD-10 synchronous counter (JK flip-flops)

Step 1: 10 states (0000–1001) need 4 JK flip-flops (Q3Q2Q1Q0Q_3Q_2Q_1Q_0). States 1010–1111 are don't cares.

Step 2: Excitation table (JK: 0→0: 0X, 0→1: 1X, 1→0: X1, 1→1: X0)

Present Q3Q2Q1Q0Next Q3Q2Q1Q0J3K3J2K2J1K1J0K0
000000010X0X0X1X
000100100X0X1XX1
001000110X0XX01X
001101000X1XX1X1
010001010XX00X1X
010101100XX01XX1
011001110XX0X01X
011110001XX1X1X1
10001001X00X0X1X
10010000X10X0XX1

Step 3: K-maps (only the non-trivial ones)

J1: Q3Q2 / Q1Q000011110
0001XX
0101XX
11XXXX
1000XX
J3: Q3Q2 / Q1Q000011110
000000
010010
11XXXX
10XXXX
K3: Q3Q2 / Q1Q000011110
00XXXX
01XXXX
11XXXX
1001XX

K1=Q0K_1 = Q_0 and J2=K2=Q1Q0J_2 = K_2 = Q_1Q_0 are read the same way.

Step 4: Equations

J3=Q2Q1Q0,K3=Q0J2=Q1Q0,K2=Q1Q0J1=Q3‾Q0,K1=Q0J0=1,K0=1\begin{aligned} &J_3 = Q_2Q_1Q_0,\quad K_3 = Q_0 \\ &J_2 = Q_1Q_0,\quad K_2 = Q_1Q_0 \\ &J_1 = \overline{Q_3}Q_0,\quad K_1 = Q_0 \\ &J_0 = 1,\quad K_0 = 1 \end{aligned}

Step 5: Circuit diagram

   +-----+       +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2 J3>|J   Q|-Q3
   | FF0 |       | FF1 |       | FF2 |       | FF3 |
K0>|K    |    K1>|K    |    K2>|K    |    K3>|K    |
   +--o--+       +--o--+       +--o--+       +--o--+
      |             |             |             |
CLK---+-------------+-------------+-------------+
J0 = K0 = 1        J1 = Q3'.Q0   K1 = Q0
J2 = K2 = Q1.Q0    J3 = Q2.Q1.Q0  K3 = Q0

Step 6: Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|_______
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   6   7   8   9   0   1

All flip-flops change together on the falling clock edge. Q3Q_3 is high for counts 8 and 9, giving fQ3=fclk/10f_{Q_3} = f_{clk}/10. Unused states 10–15 return to the main count within two clocks, so the counter is self-starting.

  • 2079 Bhadra · 3+6 marks

What is an asynchronous counter? Design a synchronous counter with counting sequence: 000, 001, 011, 111, 110, 100, 000, ... using JK flip-flop.

Answer

Asynchronous counter

An asynchronous (ripple) counter is a counter in which the external clock is applied only to the first flip-flop, and every other flip-flop is clocked by the output of the preceding flip-flop. The flip-flops therefore change state one after another, not together. It is simple but slow, and it shows short false states while the change ripples through.

Design of the synchronous counter: 000, 001, 011, 111, 110, 100, 000 …

Step 1: 6 states, so 3 JK flip-flops (Q2Q1Q0Q_2Q_1Q_0) with a common clock. Unused states: 010 and 101 (don't cares).

Step 2: Excitation table (JK: 0→0: 0X, 0→1: 1X, 1→0: X1, 1→1: X0)

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
0000010X0X1X
0010110X1XX0
0111111XX0X0
111110X0X0X1
110100X0X10X
100000X10X0X

Step 3: K-maps

J0: Q2 / Q1Q000011110
01XXX
10XX0
K0: Q2 / Q1Q000011110
0X00X
1XX1X
J1: Q2 / Q1Q000011110
001XX
10XXX
K1: Q2 / Q1Q000011110
0XX0X
1XX01
J2: Q2 / Q1Q000011110
0001X
1XXXX
K2: Q2 / Q1Q000011110
0XXXX
11X00

Step 4: Equations

The minimum groups give J2=Q1J_2 = Q_1, but then the unused states form a closed loop 010 → 101 → 010, so a counter that powers up in 010 or 101 would never enter the sequence (lock-out). Taking the 1-cell 011 alone, J2=Q1Q0J_2 = Q_1Q_0, removes this problem at the cost of one AND gate:

J2=Q1Q0,K2=Q1‾J1=Q0,K1=Q0‾J0=Q2‾,K0=Q2\begin{aligned} &J_2 = Q_1Q_0,\quad K_2 = \overline{Q_1} \\ &J_1 = Q_0,\quad K_1 = \overline{Q_0} \\ &J_0 = \overline{Q_2},\quad K_0 = Q_2 \end{aligned}

Check of unused states (with J2=Q1Q0J_2 = Q_1Q_0)

Unused stateNext state
010001 (in sequence)
101010 → 001

So the counter is self-starting.

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = Q2'   K0 = Q2
J1 = Q0    K1 = Q0'
J2 = Q1.Q0 K2 = Q1'

This is a 3-bit Johnson (twisted-ring) counter: each flip-flop copies the one before it, and the last output is fed back inverted.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ____________|‾‾‾‾‾‾‾‾‾‾‾|_______
Q1   ________|‾‾‾‾‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾‾‾‾‾‾‾‾‾|___________|‾‾‾
Cnt  000  001 011 111 110 100 000 001
  • 2078 Bhadra · 1+6 marks

Define synchronous sequential circuits. Explain the operation of asynchronous decade counter with timing diagrams and circuit diagram.

Answer

Synchronous sequential circuit

A synchronous sequential circuit is a sequential circuit whose state changes only at discrete instants fixed by a common clock signal (at the clock edge). All memory elements (flip-flops) are driven by the same clock, so the outputs are predictable and free of timing races.

Asynchronous decade counter

An asynchronous decade (mod-10) counter counts 0 (0000) to 9 (1001) and resets on the 10th clock pulse.

Circuit: four negative-edge triggered JK flip-flops with J=K=1J = K = 1. CLK drives FF0; Q0Q_0, Q1Q_1, Q2Q_2 drive the clocks of FF1, FF2, FF3. A NAND gate of Q3Q_3 and Q1Q_1 drives the active-low CLEAR of all flip-flops.

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q1  ---|      |

Operation

  1. All flip-flops are cleared first, so the count is 0000.
  2. FF0 toggles on each falling edge of CLK. FF1 toggles whenever Q0Q_0 goes 1→0, FF2 whenever Q1Q_1 goes 1→0, FF3 whenever Q2Q_2 goes 1→0. This produces the binary up count.
  3. On the 10th pulse the outputs reach 1010. This is the first state with Q3=Q1=1Q_3 = Q_1 = 1, so the NAND output goes low and clears all flip-flops to 0000. The counter therefore has 10 stable states (0–9).
Clock012345678910
Q300000000110
Q200001111000
Q100110011000
Q001010101010

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   0

Each stage changes on the falling edge of the stage before it. Q3Q_3 gives one pulse for every 10 clock pulses (fclk/10f_{clk}/10). Because the stages change one after another, the real outputs are delayed by tpdt_{pd} per stage and a short glitch appears at the reset (state 1010). IC 7490 is a commercial decade ripple counter.

  • 2078 Bhadra · 1+7 marks

Define parallel counter. Design a mod-6 synchronous up counter using JK flip flop.

Answer

Parallel counter

A parallel counter is another name for a synchronous counter: the clock is applied to all flip-flops in parallel, so they all change state at the same instant. Gates at the J-K (or T/D) inputs decide which flip-flops toggle.

Design: mod-6 synchronous up counter (JK)

Step 1: States. A mod-6 counter counts 0 to 5 (000 to 101) and returns to 000. 23=8≥62^3 = 8 \ge 6, so 3 JK flip-flops (Q2Q1Q0Q_2Q_1Q_0) are used. Unused states 110 and 111 are don't cares.

Step 2: Excitation table (JK: 0→0: 0X, 0→1: 1X, 1→0: X1, 1→1: X0)

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
0000010X0X1X
0010100X1XX1
0100110XX01X
0111001XX1X1
100101X00X1X
101000X10XX1

Step 3: K-maps

J1: Q2 / Q1Q000011110
001XX
100XX
K1: Q2 / Q1Q000011110
0XX10
1XXXX
J2: Q2 / Q1Q000011110
00010
1XXXX
K2: Q2 / Q1Q000011110
0XXXX
101XX

J0=K0=1J_0 = K_0 = 1 since Q0Q_0 toggles on every clock.

Step 4: Equations

J2=Q1Q0,K2=Q0J1=Q2‾Q0,K1=Q0J0=1,K0=1\begin{aligned} &J_2 = Q_1Q_0,\quad K_2 = Q_0 \\ &J_1 = \overline{Q_2}Q_0,\quad K_1 = Q_0 \\ &J_0 = 1,\quad K_0 = 1 \end{aligned}

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = K0 = 1
J1 = Q2'.Q0     K1 = Q0
J2 = Q1.Q0      K2 = Q0

Two 2-input AND gates are needed.

Step 6: Unused states

Unused stateNext state
110111
111000

So the counter is self-starting.

Step 7: Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾|_______
Q1   ________|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   0   1

All outputs change together at the falling clock edge; Q2Q_2 gives fclk/6f_{clk}/6.

  • 2076 Chaitra · 2+6 marks

Differentiate between combinational and sequential logic circuits. Construct and explain mod-12 asynchronous down counter with negative edge clock triggering system. Use JK flip-flops and necessary logic gates.

Answer

Combinational vs sequential logic circuits

PointCombinational circuitSequential circuit
Output depends onPresent inputs onlyPresent inputs and past state
MemoryNo memoryHas memory (flip-flops/latches)
FeedbackNo feedback pathFeedback from output to input
ClockNot neededUsually clocked
Analysis toolTruth tableState table / state diagram
ExamplesAdder, MUX, decoderFlip-flop, register, counter

Mod-12 asynchronous down counter (negative-edge JK)

Design idea

  1. 12 states need 4 flip-flops (24=16≥122^4 = 16 \ge 12). JK flip-flops with J=K=1J = K = 1 toggle on each falling clock edge.
  2. Down counting with negative-edge clocks: a stage must toggle when the previous output goes 0→10 \to 1, i.e. when its Q‾\overline{Q} goes 1→01 \to 0. So FF0 gets CLK, and Q0‾\overline{Q_0}, Q1‾\overline{Q_1}, Q2‾\overline{Q_2} drive the clocks of FF1, FF2, FF3.
  3. Truncating to 12 states: a natural 4-bit down counter counts 15, 14, …, 0. We keep the 12 states 1111 (15) down to 0100 (4). When the count falls from 0100 to 0011, the counter is preset at once to 1111.
  4. Preset logic: 0011 is the only state reached in which Q3=Q2=0Q_3 = Q_2 = 0 (the ripple transients of the other steps never make both 0). An OR gate gives Q3+Q2=0Q_3 + Q_2 = 0 only then, and its output drives the active-low PRESET of all four flip-flops:
PR‾=Q3+Q2\overline{PR} = Q_3 + Q_2

(If the count 11 → 0 is chosen instead, the reset state 1111 must be decoded, but 1111 also appears as a ripple transient when the count goes from 1000 to 0111, which would cause a false load. The 15 → 4 sequence avoids this.)

Circuit diagram

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0'-o FF1 |Q1'-o FF2 |Q2'-o FF3 |Q3
    +-----+     +-----+     +-----+     +-----+
 (count is read from Q3 Q2 Q1 Q0; each FF has an
  active-low PRESET input)

Q3  ---|    |
       | OR |----> PRESET of all FFs (active low)
Q2  ---|    |

Count sequence

ClockQ3 Q2 Q1 Q0State
0111115
1111014
2110113
………
1001015
1101004
120011 → 1111preset to 15

Operation: each falling clock edge toggles FF0. When Q0Q_0 rises (0→1), Q0‾\overline{Q_0} falls and FF1 toggles, and so on, so the count decreases by one per pulse. After the 12th pulse the counter tries to enter 0011; the OR output goes low and presets all flip-flops to 1111, starting a new cycle of 12 states.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________|‾‾‾
Q2   ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Q1   ‾‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾
Q0   ‾‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  15   14  13  12  11  10  9   8   7   6   5   4   15

Q3Q_3 completes one cycle every 12 clock pulses (fclk/12f_{clk}/12).

  • 2076 Asoj · 7 marks

Design BCD synchronous counter with circuit diagram, truth table and timing waveform. Use T flip-flop.

Answer

A BCD (decade) synchronous counter counts 0000 to 1001 and returns to 0000 on the 10th clock. All T flip-flops share the clock. A T flip-flop toggles when T=1T = 1 and holds when T=0T = 0, so T=Q⊕Q+T = Q \oplus Q^+.

Truth (excitation) table

4 flip-flops are needed (24=16≥102^4 = 16 \ge 10); states 1010–1111 are don't cares.

Present Q3Q2Q1Q0Next Q3Q2Q1Q0T3T2T1T0
000000010001
000100100011
001000110001
001101000111
010001010001
010101100011
011001110001
011110001111
100010010001
100100001001

K-map simplification

T1: Q3Q2 / Q1Q000011110
000110
010110
11XXXX
1000XX
T3: Q3Q2 / Q1Q000011110
000000
010010
11XXXX
1001XX

Similarly T2T_2 is 1 for states 0011 and 0111, giving T2=Q1Q0T_2 = Q_1Q_0, and T0=1T_0 = 1.

T3=Q3Q0+Q2Q1Q0T2=Q1Q0T1=Q3‾Q0T0=1\begin{aligned} &T_3 = Q_3Q_0 + Q_2Q_1Q_0 \\ &T_2 = Q_1Q_0 \\ &T_1 = \overline{Q_3}Q_0 \\ &T_0 = 1 \end{aligned}

Circuit diagram

   +-----+       +-----+       +-----+       +-----+
T0>|T   Q|-Q0 T1>|T   Q|-Q1 T2>|T   Q|-Q2 T3>|T   Q|-Q3
   | FF0 |       | FF1 |       | FF2 |       | FF3 |
   |     |       |     |       |     |       |     |
   +--o--+       +--o--+       +--o--+       +--o--+
      |             |             |             |
CLK---+-------------+-------------+-------------+
T0 = 1           T1 = Q3'.Q0
T2 = Q1.Q0       T3 = Q3.Q0 + Q2.Q1.Q0

Timing waveform

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|_______
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   6   7   8   9   0   1
  • Q0Q_0 toggles on every falling edge (fclk/2f_{clk}/2).
  • Q1Q_1 toggles when Q0=1Q_0 = 1, except at 9 where Q3‾=0\overline{Q_3} = 0 blocks it.
  • Q2Q_2 toggles when Q1Q0=1Q_1Q_0 = 1 (at 3 → 4 and 7 → 8).
  • Q3Q_3 sets at 7 → 8 (Q2Q1Q0=1Q_2Q_1Q_0 = 1) and resets at 9 → 0 (Q3Q0=1Q_3Q_0 = 1); its frequency is fclk/10f_{clk}/10.

Unused states return to the count (1010→1011→0110, 1100→1101→0100, 1110→1111→0010), so the counter is self-starting.

  • 2075 Chaitra · 6 marks

Explain the working principle of 4 bit down asynchronous counter with neat timing diagram using negative clock edge triggering.

Answer

A 4-bit asynchronous down counter counts 15, 14, 13, …, 0 and then back to 15, decreasing by one on every clock pulse. Only the first flip-flop gets the external clock.

Principle

In a down count a flip-flop must toggle when the next lower bit changes from 0 to 1 (a "borrow"). With negative-edge triggered flip-flops, a 0→1 change of QQ is a 1→0 change of Q‾\overline{Q}. So each stage is clocked from the Q‾\overline{Q} of the previous stage.

Circuit

Four negative-edge JK flip-flops, all with J=K=1J = K = 1 (toggle mode). CLK → FF0; Q0‾\overline{Q_0} → FF1; Q1‾\overline{Q_1} → FF2; Q2‾\overline{Q_2} → FF3. The count is read from Q3Q2Q1Q0Q_3Q_2Q_1Q_0.

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0'-o FF1 |Q1'-o FF2 |Q2'-o FF3 |Q3
    +-----+     +-----+     +-----+     +-----+

Working

  1. Start with 0000. On the first falling edge FF0 toggles: Q0Q_0 goes 0→1, so Q0‾\overline{Q_0} falls and FF1 toggles; Q1Q_1 goes 0→1, so FF2 toggles; and then FF3 toggles. The count becomes 1111 (15).
  2. Next edge: Q0Q_0 goes 1→0, Q0‾\overline{Q_0} rises, so FF1 does not change: 1110 (14).
  3. Next edge: Q0Q_0 0→1 toggles FF1 (Q1Q_1 1→0), which does not clock FF2: 1101 (13).
  4. The count keeps falling by one per pulse: 12, 11, …, 1, 0, and then 15 again.
Clock012345678
Q3Q2Q1Q0000011111110110111001011101010011000
Count015141312111098

and continuing 0111 (7), 0110 (6), …, 0000 (0).

Timing diagram (falling-edge clock)

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q2   ____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Q1   ____|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    15  14  13  12  11  10  9   8   7   6   5   4

Each QQ changes when the QQ of the stage before it goes high (its Q‾\overline{Q} falls). In practice each stage adds a delay tpdt_{pd}, so the change from 0000 to 1111 takes 4 tpd4\,t_{pd}. The circuit also divides frequency: Q0=f/2Q_0 = f/2, Q1=f/4Q_1 = f/4, Q2=f/8Q_2 = f/8, Q3=f/16Q_3 = f/16.

  • 2075 Asoj · 1+5 marks

Define synchronous sequential circuits. Explain the operation of asynchronous mod-12 counter with necessary diagrams.

Answer

Synchronous sequential circuit

A synchronous sequential circuit is a sequential circuit in which all flip-flops are driven by a common clock, so the state can change only at the active clock edge. Examples: synchronous counters, shift registers, sequence detectors.

Asynchronous mod-12 counter

It counts 0 to 11 (0000 to 1011) and returns to 0 on the 12th clock pulse.

Construction

  • 4 negative-edge JK flip-flops (24=16≥122^4 = 16 \ge 12), J=K=1J = K = 1.
  • CLK → FF0; Q0Q_0 → clock of FF1; Q1Q_1 → FF2; Q2Q_2 → FF3.
  • Count 12 = 1100 is the first state with Q3=Q2=1Q_3 = Q_2 = 1. A NAND gate of Q3Q_3 and Q2Q_2 drives the active-low CLEAR of all flip-flops.
     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q2  ---|      |

Operation

  1. FF0 toggles on every falling edge; each later stage toggles when the previous Q falls 1→0, so the count rises 0, 1, 2, …, 11.
  2. On the 12th pulse the outputs go from 1011 towards 1100. As soon as Q3=Q2=1Q_3 = Q_2 = 1, the NAND output goes low and clears all flip-flops to 0000. State 1100 lasts only a few nanoseconds.
Clock0123456789101112
Q30000000011110
Q20000111100000
Q10011001100110
Q00101010101010

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   10  11  0

Q3Q_3 is high for counts 8–11, so it is a divide-by-12 output. IC 7492 is a commercial divide-by-12 ripple counter.

  • 2074 Asoj · 2+6 marks

List the advantages and disadvantages of a synchronous counter over asynchronous counter. Design a 3 bit synchronous counter which follow gray code sequence.

Answer

Synchronous over asynchronous counter

Advantages

  • All flip-flops change together, so the total delay is one flip-flop delay plus one gate delay; the counter can run at a much higher clock frequency.
  • No ripple, so there are no temporary false states and no glitches when outputs are decoded.
  • Any count sequence (Gray, BCD, arbitrary) can be designed directly from the state table.
  • Maximum frequency does not fall as more stages are added (with parallel carry).

Disadvantages

  • Needs extra combinational logic (AND gates) for each stage, so the circuit is more complex and costlier.
  • The clock drives every flip-flop, so the clock line has a larger load.
  • Design takes more effort (excitation table, K-maps).

Design: 3-bit synchronous Gray code counter (D flip-flops)

Sequence: 000 → 001 → 011 → 010 → 110 → 111 → 101 → 100 → 000. 8 states, so 3 D flip-flops with a common clock. For a D flip-flop, D=Q+D = Q^+, so the next-state columns give the D inputs directly.

Present Q2Q1Q0Next Q2Q1Q0D2D1D0
000001001
001011011
011010010
010110110
110111111
111101101
101100100
100000000

K-maps

D0: Q2 / Q1Q000011110
01100
10011
D1: Q2 / Q1Q000011110
00111
10001
D2: Q2 / Q1Q000011110
00001
10111

Equations

D2=Q2Q0+Q1Q0‾D1=Q2‾Q0+Q1Q0‾D0=Q2Q1+Q2‾Q1‾=Q2⊕Q1‾\begin{aligned} D_2 &= Q_2Q_0 + Q_1\overline{Q_0} \\ D_1 &= \overline{Q_2}Q_0 + Q_1\overline{Q_0} \\ D_0 &= Q_2Q_1 + \overline{Q_2}\overline{Q_1} = \overline{Q_2 \oplus Q_1} \end{aligned}

Circuit

   +-----+       +-----+       +-----+
D0>|D   Q|-Q0 D1>|D   Q|-Q1 D2>|D   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
   |     |       |     |       |     |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
D2 = Q2.Q0 + Q1.Q0'
D1 = Q2'.Q0 + Q1.Q0'
D0 = XNOR(Q2, Q1)

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q1   ________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______
Cnt  000  001 011 010 110 111 101 100 000

Only one output changes per clock, as required by the Gray code.

  • 2074 Asoj · 6 marks

Draw the block diagram with decoders to show hour, minute and second.

Answer

A digital clock is a chain of counters driven by a 1 Hz signal. Each counter's BCD output goes to a BCD-to-7-segment decoder (e.g. 7447/7448) which drives a seven-segment display, so hours, minutes and seconds are shown as decimal digits.

Block diagram

 AC 50 Hz -> [Shaper] -> [÷10] -> [÷5] -> 1 Hz
                                          |
   +--------------------------------------+
   v            SECONDS (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/min
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            MINUTES (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/h
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            HOURS (01-12)
 [÷10 units] -----> [tens FF] <--- reset/load logic
   |                   |
 [7447 dec]        [decoder]
 [7-seg disp]      [7-seg disp]

Working of each block

  1. Time base: the 50 Hz mains (in Nepal) is stepped down and shaped into a square wave by a Schmitt trigger. Dividing by 10 and then by 5 gives exactly 1 pulse per second. (With 60 Hz mains the divider is ÷60; a 32.768 kHz crystal with a 15-stage ÷2 chain is also common.)
  2. Seconds section: a mod-10 counter (7490) counts seconds units 0–9. Each time it goes from 9 to 0, its Q3Q_3 output falls and clocks the mod-6 tens counter (0–5). When the tens counter reaches 6 (0110), it is reset to 0, and this reset produces one pulse per minute.
  3. Minutes section: identical to the seconds section (mod-10 then mod-6, 00–59), clocked by the 1 pulse/min signal. Its output gives 1 pulse per hour.
  4. Hours section: a mod-10 units counter and a single flip-flop for the tens digit (0 or 1). Gating logic makes the hours run 01 → 12 and then 01 (a 12-hour clock): when the count reaches 13, the units counter is loaded with 1 and the tens flip-flop is cleared. For a 24-hour clock, the tens counter is mod-3 and both counters are cleared at 24.
  5. Decoders and displays: each BCD counter output (4 lines) feeds a BCD-to-7-segment decoder/driver, which turns on the correct segments a–g of a common-anode (7447) or common-cathode (7448) display. The hours tens digit needs only "1" or blank, so a simple driver is enough.

Summary of counters

SectionUnits counterTens counterOutput pulse
Secondsmod-10mod-61 per minute
Minutesmod-10mod-61 per hour
Hoursmod-101 FF (mod-12 logic)1 per 12 h
  • 2073 Shrawan · 6 marks

Design a synchronous MOD-5 counter along with block diagram and timing diagrams. Also write the applications of counters and shift registers.

Answer

Synchronous MOD-5 counter

A MOD-5 counter has 5 states, 000 → 001 → 010 → 011 → 100 → 000. Three JK flip-flops (23=8≥52^3 = 8 \ge 5) share a common clock. States 101, 110, 111 are don't cares.

Excitation table (JK: 0→0: 0X, 0→1: 1X, 1→0: X1, 1→1: X0)

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
0000010X0X1X
0010100X1XX1
0100110XX01X
0111001XX1X1
100000X10X0X

K-maps

J0: Q2 / Q1Q000011110
01XX1
10XXX
J2: Q2 / Q1Q000011110
00010
1XXXX

The other maps give K0=1K_0 = 1, J1=K1=Q0J_1 = K_1 = Q_0 and K2=1K_2 = 1.

Equations

J2=Q1Q0,K2=1J1=Q0,K1=Q0J0=Q2‾,K0=1\begin{aligned} &J_2 = Q_1Q_0,\quad K_2 = 1 \\ &J_1 = Q_0,\quad K_1 = Q_0 \\ &J_0 = \overline{Q_2},\quad K_0 = 1 \end{aligned}

Block (circuit) diagram

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = Q2'   K0 = 1
J1 = Q0    K1 = Q0
J2 = Q1.Q0 K2 = 1

Unused states: 101 → 010, 110 → 010, 111 → 000, so the counter is self-starting.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|___________|‾‾‾
Q0   ____|‾‾‾|___|‾‾‾|_______|‾‾‾|___
Cnt  0    1   2   3   4   0   1   2

Q2Q_2 is high for one clock period out of five, so it divides the clock frequency by 5.

Applications of counters

  • Frequency division (divide-by-N), e.g. getting 1 Hz from 50 Hz in clocks.
  • Digital clocks, watches and timers.
  • Counting events or objects (production lines, people counters).
  • Frequency counters and digital meters.
  • Counter-type and successive-approximation ADCs.
  • Program counter and address generation in computers.
  • Generating control sequences and timing signals.

Applications of shift registers

  • Serial-to-parallel and parallel-to-serial data conversion (UART, serial communication).
  • Temporary data storage and time delay.
  • Ring and Johnson counters, sequence generators.
  • Multiplication and division by 2 (shift left / right).
  • Pseudo-random sequence generation (LFSR) and error checking (CRC).
  • Keyboard scanning and display multiplexing.
  • 2072 Chaitra · 6 marks

How does second section of a digital clock work? Explain its working principle using block diagram.

Answer

The seconds section of a digital clock counts 1 Hz pulses from 00 to 59 and sends one pulse per minute to the minutes section. It is a mod-60 counter made of a mod-10 (units) counter followed by a mod-6 (tens) counter, with decoders and displays.

Block diagram

 1 Hz pulses (from ÷50 divider of 50 Hz mains)
      |
      v
 +-----------+  Q3 (falls 9->0)  +-----------+
 | MOD-10    |------------------>| MOD-6     |--> 1 pulse
 | units     |                   | tens      |   per minute
 | (7490)    |                   | (reset at |   to minutes
 +-----------+                   |  0110)    |
   | | | |  BCD                  +-----------+
 +-----------+                     | | |
 | 7447      |                   +-----------+
 | decoder   |                   | 7447      |
 +-----------+                   +-----------+
   |a..g                           |a..g
 [7-seg units]                   [7-seg tens]

Working principle

  1. 1 Hz input: the 50 Hz mains is shaped into pulses and divided by 50 (÷10 then ÷5) to give 1 pulse per second.
  2. Units counter (mod-10): a decade counter such as 7490 counts 0, 1, …, 9 on successive seconds. On the 10th pulse it returns to 0; at this moment its MSB Q3Q_3 goes from 1 to 0.
  3. Tens counter (mod-6): the falling edge of the units Q3Q_3 clocks the tens counter, so it advances once every 10 seconds: 0, 1, …, 5. It is a 3-bit ripple counter reset at 6 (0110) by a NAND gate of Q2Q_2 and Q1Q_1 (or a 7492 wired as ÷6).
  4. Carry to minutes: when the display shows 59 and the next pulse arrives, units go 9 → 0 and tens go 5 → 6 → 0. The falling of the tens counter's Q2Q_2 at this reset gives one pulse per minute, which clocks the minutes units counter.
  5. Decoding and display: each counter's BCD outputs drive a BCD-to-7-segment decoder/driver (7447 for common-anode displays). The decoder lights segments a–g to show the digit, so the seconds read 00, 01, …, 59, 00.

Count sequence

PulsesTens (BCD)Units (BCD)Display
0000000000
9000100109
10001000010
59101100159
60000000000 (+1 minute)

The minutes section is built exactly the same way; only the hours section uses different (mod-12 or mod-24) logic.

  • 2070 Chaitra · 2+6 marks

Differentiate synchronous and asynchronous sequential circuits. Explain the operation of mod-12 synchronous counter with timing diagram.

Answer

Synchronous vs asynchronous sequential circuits

PointSynchronousAsynchronous
TimingState changes only at clock edgesState changes whenever inputs change
ClockCommon clock to all flip-flopsNo common clock
Memory elementsClocked flip-flopsUnclocked latches or gate delays (or FFs clocked by other FFs)
SpeedLimited by clock frequencyCan be faster
ProblemsClock skewRaces, hazards, false states
DesignEasier, systematicHarder
ExampleSynchronous counterRipple counter

Mod-12 synchronous counter

It counts 0000 to 1011 (0–11) and returns to 0000. Four JK flip-flops share a common clock; states 1100–1111 are don't cares.

Excitation table

Present Q3Q2Q1Q0Next Q3Q2Q1Q0J3K3J2K2J1K1J0K0
000000010X0X0X1X
000100100X0X1XX1
001000110X0XX01X
001101000X1XX1X1
010001010XX00X1X
010101100XX01XX1
011001110XX0X01X
011110001XX1X1X1
10001001X00X0X1X
10011010X00X1XX1
10101011X00XX01X
10110000X10XX1X1

Equations (from K-maps)

J3=Q2Q1Q0,K3=Q1Q0J2=Q3‾Q1Q0,K2=Q1Q0J1=Q0,K1=Q0J0=1,K0=1\begin{aligned} &J_3 = Q_2Q_1Q_0,\quad K_3 = Q_1Q_0 \\ &J_2 = \overline{Q_3}Q_1Q_0,\quad K_2 = Q_1Q_0 \\ &J_1 = Q_0,\quad K_1 = Q_0 \\ &J_0 = 1,\quad K_0 = 1 \end{aligned}

Circuit diagram

   +-----+       +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2 J3>|J   Q|-Q3
   | FF0 |       | FF1 |       | FF2 |       | FF3 |
K0>|K    |    K1>|K    |    K2>|K    |    K3>|K    |
   +--o--+       +--o--+       +--o--+       +--o--+
      |             |             |             |
CLK---+-------------+-------------+-------------+
J0 = K0 = 1            J1 = K1 = Q0
J2 = Q3'.Q1.Q0  K2 = Q1.Q0
J3 = Q2.Q1.Q0   K3 = Q1.Q0

Operation

  • Q0Q_0 toggles on every clock edge.
  • Q1Q_1 toggles whenever Q0=1Q_0 = 1.
  • Q2Q_2 sets when Q1Q0=1Q_1Q_0 = 1 and Q3=0Q_3 = 0 (at 3 → 4), and resets when Q1Q0=1Q_1Q_0 = 1 (at 7 → 8). At 11 (1011), Q3=1Q_3 = 1 blocks J2J_2, so Q2Q_2 stays 0.
  • Q3Q_3 sets at 7 → 8 (Q2Q1Q0=1Q_2Q_1Q_0 = 1) and resets at 11 → 0 (Q1Q0=1Q_1Q_0 = 1 with Q3=1Q_3 = 1).
  • So at the 12th clock, 1011 goes directly to 0000 with no false intermediate state.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   10  11  0

Q3Q_3 is high for counts 8–11, giving fclk/12f_{clk}/12. Unused states go 1100 → 1101 → 1110 → 1111 → 0000, so the counter is self-starting.

  • 2068 Chaitra · 1+7 marks

Define ripple counter. Explain the operation of mod-10 ripple counter with timing diagram.

Answer

Ripple counter

A ripple counter (asynchronous counter) is a counter in which only the first flip-flop receives the external clock, and the output of each flip-flop acts as the clock of the next one. The change of state ripples through the stages one after another.

Mod-10 ripple counter

Construction

  • 10 states (0–9) need 4 flip-flops, since 23<10≤242^3 < 10 \le 2^4.
  • Four negative-edge JK flip-flops with J=K=1J = K = 1 (toggle mode). CLK → FF0, Q0Q_0 → FF1, Q1Q_1 → FF2, Q2Q_2 → FF3.
  • At count 10 (1010), Q3Q_3 and Q1Q_1 are both 1 for the first time. A NAND gate of Q3Q_3 and Q1Q_1 drives the active-low CLEAR of all flip-flops, so the counter returns to 0000.
     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q1  ---|      |

Operation

  1. Clear all flip-flops: 0000.
  2. Each falling edge of CLK toggles FF0. FF1 toggles every time Q0Q_0 falls 1→0; FF2 every time Q1Q_1 falls; FF3 every time Q2Q_2 falls. The outputs therefore count up in binary.
  3. After the 9th pulse the count is 1001. The 10th pulse makes Q0Q_0 fall, which toggles Q1Q_1 to 1, giving 1010 for a moment. The NAND output becomes 0 and clears all flip-flops to 0000. The next cycle begins.
PulseQ3 Q2 Q1 Q0Count
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010 → 00000

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   0
  • Q0Q_0 changes at every falling clock edge (f/2f/2).
  • Q1Q_1, Q2Q_2, Q3Q_3 change at the falling edges of Q0Q_0, Q1Q_1, Q2Q_2.
  • Q3Q_3 is high during counts 8 and 9 and gives fclk/10f_{clk}/10.
  • In the real circuit each stage adds one propagation delay and a narrow spike appears on Q1Q_1 at the 10th pulse (state 1010 before reset).
  • 2068 Baisakh

What is a counter? Design a MOD-6 synchronous counter. Draw its timing diagram.

Answer

Counter

A counter is a sequential circuit made of flip-flops that goes through a fixed sequence of states when clock pulses are applied. The number of distinct states is its modulus (MOD-N). Counters are used to count pulses, divide frequency and generate timing signals. They are synchronous (common clock) or asynchronous (ripple).

Design of MOD-6 synchronous counter (T flip-flops)

Step 1: Sequence 000 → 001 → 010 → 011 → 100 → 101 → 000. 23=8≥62^3 = 8 \ge 6, so 3 T flip-flops with a common clock. States 110 and 111 are don't cares. For a T flip-flop, T=Q⊕Q+T = Q \oplus Q^+.

Step 2: Excitation table

Present Q2Q1Q0Next Q2Q1Q0T2T1T0
000001001
001010011
010011001
011100111
100101001
101000101

Step 3: K-maps

T1: Q2 / Q1Q000011110
00110
100XX
T2: Q2 / Q1Q000011110
00010
101XX

T0=1T_0 = 1 in every row.

Step 4: Equations

T2=Q2Q0+Q1Q0T1=Q2‾Q0T0=1\begin{aligned} &T_2 = Q_2Q_0 + Q_1Q_0 \\ &T_1 = \overline{Q_2}Q_0 \\ &T_0 = 1 \end{aligned}

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
T0>|T   Q|-Q0 T1>|T   Q|-Q1 T2>|T   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
   |     |       |     |       |     |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
T0 = 1
T1 = Q2'.Q0
T2 = Q2.Q0 + Q1.Q0

Unused states: 110 → 111 → 010, so the counter is self-starting.

Step 6: Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾|_______
Q1   ________|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   0   1

All flip-flops change together on the falling clock edge. Q2Q_2 is high for counts 4 and 5, so it divides the clock by 6.

  • 2081 Bhadra · 6 marks

Build the design of an asynchronous mod-12 up-counter with positive edge triggering clock and use JK flip-flops.

Answer

An asynchronous mod-12 up counter counts 0 to 11 and returns to 0 on the 12th clock pulse. Only FF0 is driven by the clock; the other flip-flops are driven by the previous stage.

Design steps

  1. Flip-flops: 24=16≥122^4 = 16 \ge 12, so 4 JK flip-flops, all with J=K=1J = K = 1 (toggle mode).
  2. Clocking for positive-edge flip-flops: in an up count a stage must toggle when the previous output falls 1→0. A falling QQ is a rising Q‾\overline{Q}, so with positive-edge triggering each stage is clocked from the Q‾\overline{Q} of the previous stage: CLK → FF0, Q0‾\overline{Q_0} → FF1, Q1‾\overline{Q_1} → FF2, Q2‾\overline{Q_2} → FF3.
  3. Reset logic: count 12 = 1100 must clear the counter. It is the first state with Q3=Q2=1Q_3 = Q_2 = 1, so
CLR‾=Q3 Q2‾\overline{CLR} = \overline{Q_3\,Q_2}

A 2-input NAND gate feeds the active-low CLEAR of all four flip-flops.

Circuit diagram

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-> FF0 |Q0'-> FF1 |Q1'-> FF2 |Q2'-> FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q2  ---|      |

(">" marks a positive-edge clock input; the count is read from Q3Q2Q1Q0Q_3Q_2Q_1Q_0.)

Count sequence

ClockQ3 Q2 Q1 Q0Count
000000
100011
401004
810008
11101111
121100 → 00000

Operation and timing

FF0 toggles at every rising clock edge. When Q0Q_0 falls, Q0‾\overline{Q_0} rises and toggles FF1, and so on, giving an up count. On the 12th rising edge the counter reaches 1100, the NAND output goes low and clears all flip-flops to 0000.

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ______________________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_____
Q2   ______________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_____________________
Q1   ______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_____
Q0   __|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|_____
Cnt  0  1   2   3   4   5   6   7   8   9   10  11  0

Q3Q_3 is high for counts 8–11, so it gives fclk/12f_{clk}/12.

  • 2081 Baisakh · 3+7 marks

Find out characteristic equation for SR flip-flop. Design a mod-5 synchronous counter using D flip-flops with negative edge triggering clock system.

Answer

Characteristic equation of SR flip-flop

The characteristic equation gives the next state Q+Q^+ in terms of the inputs and the present state QQ.

SRQQ+
0000
0011
0100
0110
1001
1011
110X (invalid)
111X (invalid)
Q+: S / RQ00011110
00100
111XX

Grouping the row S = 1 (with the X cells) gives SS; grouping cells 01 of both rows gives R‾Q\overline{R}Q:

Q+=S+R‾ Q,with the condition SR=0Q^+ = S + \overline{R}\,Q, \qquad \text{with the condition } SR = 0

Mod-5 synchronous counter using D flip-flops (negative-edge clock)

Step 1: States 000 → 001 → 010 → 011 → 100 → 000. 3 D flip-flops (Q2Q1Q0Q_2Q_1Q_0), all clocked by the falling edge. States 101, 110, 111 are don't cares. For a D flip-flop D=Q+D = Q^+.

Step 2: Excitation table

Present Q2Q1Q0Next Q2Q1Q0D2D1D0
000001001
001010010
010011011
011100100
100000000

Step 3: K-maps

D0: Q2 / Q1Q000011110
01001
10XXX
D1: Q2 / Q1Q000011110
00101
10XXX
D2: Q2 / Q1Q000011110
00010
10XXX

Step 4: Equations

D2=Q1Q0D1=Q1Q0‾+Q1‾Q0D0=Q2‾Q0‾\begin{aligned} &D_2 = Q_1Q_0 \\ &D_1 = Q_1\overline{Q_0} + \overline{Q_1}Q_0 \\ &D_0 = \overline{Q_2}\overline{Q_0} \end{aligned}

so D1=Q1⊕Q0D_1 = Q_1 \oplus Q_0.

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
D0>|D   Q|-Q0 D1>|D   Q|-Q1 D2>|D   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
   |     |       |     |       |     |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
D0 = Q2'.Q0'  (NOR of Q2 and Q0)
D1 = Q1 XOR Q0
D2 = Q1.Q0

Step 6: Unused states: 101 → 010, 110 → 010, 111 → 100, so the counter is self-starting.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|___________|‾‾‾
Q0   ____|‾‾‾|___|‾‾‾|_______|‾‾‾|___
Cnt  0    1   2   3   4   0   1   2
  • 2080 Bhadra · 2+6 marks

Compare synchronous and asynchronous counter. Design a 3 bit up synchronous counter using T flip flop.

Answer

Synchronous vs asynchronous counter

PointSynchronous counterAsynchronous (ripple) counter
ClockCommon clock to all flip-flopsOnly FF0 gets the clock; each next FF is clocked by the previous output
Change of stateAll flip-flops change togetherFlip-flops change one after another (ripple)
DelayOne FF delay + gate delayAdds up: n×tpdn \times t_{pd}
SpeedFast, high clock frequencySlow, frequency falls as nn grows
CircuitNeeds extra gating logicSimple, few or no extra gates
Decoding glitchesNone (no false states)Momentary false states give glitches
Example ICs74160/74163, 741907490, 7493

Design of 3-bit synchronous up counter (T flip-flops)

Step 1: Count 000 → 001 → … → 111 → 000. Three T flip-flops (Q2Q1Q0Q_2Q_1Q_0) share the clock. A T flip-flop toggles when T=1T = 1, so T=Q⊕Q+T = Q \oplus Q^+.

Step 2: Excitation table

Present Q2Q1Q0Next Q2Q1Q0T2T1T0
000001001
001010011
010011001
011100111
100101001
101110011
110111001
111000111

Step 3: K-maps

T1: Q2 / Q1Q000011110
00110
10110
T2: Q2 / Q1Q000011110
00010
10010

T0=1T_0 = 1 in every row.

Step 4: Equations

T2=Q1Q0T1=Q0T0=1\begin{aligned} &T_2 = Q_1Q_0 \\ &T_1 = Q_0 \\ &T_0 = 1 \end{aligned}

A stage toggles only when all lower bits are 1 (the carry condition).

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
T0>|T   Q|-Q0 T1>|T   Q|-Q1 T2>|T   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
   |     |       |     |       |     |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
T0 = 1    T1 = Q0    T2 = Q1.Q0 (one AND gate)

Step 6: Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   0

All outputs change together at the falling clock edge; Q0Q_0, Q1Q_1, Q2Q_2 have frequencies f/2f/2, f/4f/4, f/8f/8.

  • 2080 Bhadra · 1+6 marks

Differentiate between combinational and sequential circuits. Explain the operation of asynchronous decade counter with timing diagrams.

Answer

Combinational vs sequential circuits

PointCombinational circuitSequential circuit
Output depends onPresent inputs onlyPresent inputs and past state
MemoryNo memoryHas memory (flip-flops/latches)
FeedbackNo feedback pathFeedback from output to input
ClockNot neededUsually clocked
Analysis toolTruth tableState table / state diagram
ExamplesAdder, MUX, decoderFlip-flop, register, counter

Asynchronous decade counter

It counts 0000 to 1001 (0–9) and resets on the 10th pulse.

Circuit: four negative-edge JK flip-flops with J=K=1J = K = 1. CLK → FF0; Q0Q_0, Q1Q_1, Q2Q_2 clock FF1, FF2, FF3. A NAND of Q3Q_3 and Q1Q_1 drives the active-low CLEAR of all flip-flops.

     J=K=1       J=K=1       J=K=1       J=K=1
    +-----+     +-----+     +-----+     +-----+
CLK-o FF0 |Q0--o FF1 |Q1--o FF2 |Q2--o FF3 |Q3
    +--o--+     +--o--+     +--o--+     +--o--+
      CLR         CLR         CLR         CLR

Q3  ---|      |
       | NAND |o--> CLR of all FFs (active low)
Q1  ---|      |

Operation

  1. Start at 0000. FF0 toggles on every falling clock edge.
  2. FF1 toggles when Q0Q_0 goes 1→0, FF2 when Q1Q_1 goes 1→0, FF3 when Q2Q_2 goes 1→0, so the count rises by one per pulse: 0, 1, …, 9.
  3. On the 10th pulse the outputs try to become 1010. Since Q3=Q1=1Q_3 = Q_1 = 1, the NAND output goes low and clears all flip-flops to 0000. The 1010 state lasts only a few nanoseconds.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|___
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt  0    1   2   3   4   5   6   7   8   9   0

Q3Q_3 is high for counts 8 and 9 and gives fclk/10f_{clk}/10. Example IC: 7490.

  • 2080 Baisakh · 2+6 marks

Differentiate between combinational and sequential logic circuits. Explain the operation of a synchronous decade counter with timing diagrams.

Answer

Combinational vs sequential logic circuits

PointCombinational circuitSequential circuit
Output depends onPresent inputs onlyPresent inputs and past state
MemoryNo memoryHas memory (flip-flops/latches)
FeedbackNo feedback pathFeedback from output to input
ClockNot neededUsually clocked
Analysis toolTruth tableState table / state diagram
ExamplesAdder, MUX, decoderFlip-flop, register, counter

Synchronous decade counter

A synchronous decade counter counts 0000 to 1001 with all four flip-flops clocked together. Gates decide when each flip-flop toggles. From the excitation table of the 0–9 sequence (states 1010–1111 as don't cares), the JK equations are:

J3=Q2Q1Q0,K3=Q0J2=Q1Q0,K2=Q1Q0J1=Q3‾Q0,K1=Q0J0=1,K0=1\begin{aligned} &J_3 = Q_2Q_1Q_0,\quad K_3 = Q_0 \\ &J_2 = Q_1Q_0,\quad K_2 = Q_1Q_0 \\ &J_1 = \overline{Q_3}Q_0,\quad K_1 = Q_0 \\ &J_0 = 1,\quad K_0 = 1 \end{aligned}

Circuit diagram

   +-----+       +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2 J3>|J   Q|-Q3
   | FF0 |       | FF1 |       | FF2 |       | FF3 |
K0>|K    |    K1>|K    |    K2>|K    |    K3>|K    |
   +--o--+       +--o--+       +--o--+       +--o--+
      |             |             |             |
CLK---+-------------+-------------+-------------+
J0 = K0 = 1        J1 = Q3'.Q0   K1 = Q0
J2 = K2 = Q1.Q0    J3 = Q2.Q1.Q0  K3 = Q0

Operation

CountQ3 Q2 Q1 Q0Flip-flops that toggle at next clock
00000FF0
10001FF0, FF1
20010FF0
30011FF0, FF1, FF2
40100FF0
50101FF0, FF1
60110FF0
70111FF0, FF1, FF2, FF3 (set)
81000FF0
91001FF0, FF3 (reset); FF1 held by Q3‾=0\overline{Q_3} = 0
  • FF0 toggles on every clock (J0=K0=1J_0 = K_0 = 1).
  • FF1 toggles when Q0=1Q_0 = 1, but at count 9 J1=Q3‾Q0=0J_1 = \overline{Q_3}Q_0 = 0 keeps it at 0.
  • FF2 toggles when Q1Q0=1Q_1Q_0 = 1.
  • FF3 sets when Q2Q1Q0=1Q_2Q_1Q_0 = 1 (7 → 8) and resets when Q0=1Q_0 = 1 while Q3=1Q_3 = 1 (9 → 0).

So after count 9 (1001) the next clock gives 0000 directly, without any false state.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3   ________________________________|‾‾‾‾‾‾‾|_______
Q2   ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|_______________
Q1   ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   6   7   8   9   0   1

All outputs change at the same falling edge, so there is no ripple delay. Q3Q_3 gives fclk/10f_{clk}/10.

  • 2080 Baisakh · 6+2 marks

Design a synchronous mod-5 up-counter using SR flip-flops and draw its timing diagram.

Answer

A synchronous mod-5 up counter counts 000 → 001 → 010 → 011 → 100 → 000 with all flip-flops on one clock. Three SR flip-flops (Q2Q1Q0Q_2Q_1Q_0) are needed (23=8≥52^3 = 8 \ge 5); states 101, 110, 111 are don't cares.

Step 1: SR excitation

Q → Q+SR
0 → 00X
0 → 110
1 → 001
1 → 1X0

Step 2: Excitation table

Present Q2Q1Q0Next Q2Q1Q0S2R2S1R1S0R0
0000010X0X10
0010100X1001
0100110XX010
011100100101
100000010X0X

Step 3: K-maps

S0: Q2 / Q1Q000011110
01001
10XXX
R0: Q2 / Q1Q000011110
00110
1XXXX
S1: Q2 / Q1Q000011110
0010X
10XXX
R1: Q2 / Q1Q000011110
0X010
1XXXX
S2: Q2 / Q1Q000011110
00010
10XXX
R2: Q2 / Q1Q000011110
0XX0X
11XXX

For R2R_2, both Q1‾\overline{Q_1} and Q0‾\overline{Q_0} cover the 1-cell. With R2=Q1‾R_2 = \overline{Q_1} the unused state 110 would hold itself forever (lock-out), so R2=Q0‾R_2 = \overline{Q_0} is chosen.

Step 4: Equations

S2=Q1Q0,R2=Q0‾S1=Q1‾Q0,R1=Q1Q0S0=Q2‾Q0‾,R0=Q0\begin{aligned} &S_2 = Q_1Q_0,\quad R_2 = \overline{Q_0} \\ &S_1 = \overline{Q_1}Q_0,\quad R_1 = Q_1Q_0 \\ &S_0 = \overline{Q_2}\overline{Q_0},\quad R_0 = Q_0 \end{aligned}

S and R of each flip-flop are never 1 together in any state, so the forbidden input S = R = 1 never occurs.

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
S0>|S   Q|-Q0 S1>|S   Q|-Q1 S2>|S   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
R0>|R    |    R1>|R    |    R2>|R    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
S0 = Q2'.Q0'   R0 = Q0
S1 = Q1'.Q0    R1 = Q1.Q0
S2 = Q1.Q0     R2 = Q0'

Unused states: 101 → 110 → 010, 111 → 100, so the counter is self-starting.

Step 6: Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾|___________
Q1   ________|‾‾‾‾‾‾‾|___________|‾‾‾
Q0   ____|‾‾‾|___|‾‾‾|_______|‾‾‾|___
Cnt  0    1   2   3   4   0   1   2

Q2Q_2 is high for one clock period in every five (fclk/5f_{clk}/5).

  • 2079 Bhadra · 2+7 marks

Differentiate between synchronous and asynchronous counters. Design a mod-6 synchronous counter using JK flip-flops.

Answer

Synchronous vs asynchronous counters

PointSynchronous counterAsynchronous (ripple) counter
ClockCommon clock to all flip-flopsOnly FF0 gets the clock; each next FF is clocked by the previous output
Change of stateAll flip-flops change togetherFlip-flops change one after another (ripple)
DelayOne FF delay + gate delayAdds up: n×tpdn \times t_{pd}
SpeedFast, high clock frequencySlow, frequency falls as nn grows
CircuitNeeds extra gating logicSimple, few or no extra gates
Decoding glitchesNone (no false states)Momentary false states give glitches
Example ICs74160/74163, 741907490, 7493

Design of mod-6 synchronous counter (JK flip-flops)

Step 1: States. 000 → 001 → 010 → 011 → 100 → 101 → 000. Since 23=8≥62^3 = 8 \ge 6, three JK flip-flops (Q2Q1Q0Q_2Q_1Q_0) with a common clock are used. 110 and 111 are don't cares.

Step 2: Excitation table (JK: 0→0: 0X, 0→1: 1X, 1→0: X1, 1→1: X0)

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
0000010X0X1X
0010100X1XX1
0100110XX01X
0111001XX1X1
100101X00X1X
101000X10XX1

Step 3: K-maps

J1: Q2 / Q1Q000011110
001XX
100XX
K1: Q2 / Q1Q000011110
0XX10
1XXXX
J2: Q2 / Q1Q000011110
00010
1XXXX
K2: Q2 / Q1Q000011110
0XXXX
101XX

J0=K0=1J_0 = K_0 = 1 since Q0Q_0 toggles every clock.

Step 4: Equations

J2=Q1Q0,K2=Q0J1=Q2‾Q0,K1=Q0J0=1,K0=1\begin{aligned} &J_2 = Q_1Q_0,\quad K_2 = Q_0 \\ &J_1 = \overline{Q_2}Q_0,\quad K_1 = Q_0 \\ &J_0 = 1,\quad K_0 = 1 \end{aligned}

Step 5: Circuit diagram

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = K0 = 1
J1 = Q2'.Q0    K1 = Q0
J2 = Q1.Q0     K2 = Q0

Step 6: Unused states: 110 → 111 → 000, so the counter is self-starting.

Step 7: Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾|_______
Q1   ________|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   0   1
  • 2078 Bhadra · 5 marks

Design and describe 24 hr digital clock.

Answer

A 24-hour digital clock shows time from 00:00:00 to 23:59:59. It is a chain of counters fed by a 1 Hz time base, with BCD-to-7-segment decoders and displays.

Block diagram

 AC 50 Hz -> [Shaper] -> [÷50] -> 1 Hz
                                  |
   +------------------------------+
   v
 [SECONDS ÷60: ÷10 -> ÷6] --> 1 pulse/min
   |  (2 decoders + 2 displays)
   v
 [MINUTES ÷60: ÷10 -> ÷6] --> 1 pulse/h
   |  (2 decoders + 2 displays)
   v
 [HOURS units ÷10] ---Q3---> [HOURS tens 0-2]
   | U3 U2 U1 U0               | T1 T0
   |       U2 ------+    +---- T1
   |                v    v
   |               [ NAND ]--o CLR (both)
 [7447]+[disp]       [7447]+[disp]

Design of each section

  1. 1 Hz time base: the 50 Hz mains is stepped down and squared by a Schmitt trigger, then divided by 50 (÷10 then ÷5) to give 1 pulse per second.
  2. Seconds (÷60): mod-10 units counter (0–9) whose Q3Q_3 clocks a mod-6 tens counter (0–5, cleared at 0110 by NAND of Q2Q_2, Q1Q_1). The tens reset gives 1 pulse per minute.
  3. Minutes (÷60): identical to the seconds section; gives 1 pulse per hour.
  4. Hours (÷24): a mod-10 units counter (U) and a 2-bit tens counter (T: 0, 1, 2). The units Q3Q_3 falling at 9 → 0 clocks the tens counter.
    • The count must go 23 → 00. Count 24 = tens 10, units 0100.
    • Between 20 and 24, T1=1T_1 = 1 and U2=1U_2 = 1 occur together for the first time at 24. So a NAND gate of T1T_1 and U2U_2 drives the active-low CLEAR of both hour counters:
CLR‾=T1 U2‾\overline{CLR} = \overline{T_1\,U_2}
  • Thus the hours count 00, 01, …, 09, 10, …, 19, 20, 21, 22, 23, 00.
  1. Display: each BCD output drives a 7447 BCD-to-7-segment decoder and a common-anode display (six digits: HH:MM:SS).
SectionCountersReset condition
Seconds÷10, ÷6tens = 6 (0110)
Minutes÷10, ÷6tens = 6 (0110)
Hours÷10, ÷3hours = 24 (T1U2=1T_1U_2 = 1)
  • 2078 Kartik · 6 marks

Design the synchronous MOD-6 counter using -ve edge triggered JK flip flop.

Answer

A synchronous MOD-6 counter goes through 6 states, 000 → 001 → 010 → 011 → 100 → 101 → 000, with all flip-flops triggered by the falling edge of a common clock. Three JK flip-flops are needed (23=8≥62^3 = 8 \ge 6). States 110 and 111 are not used (don't cares).

Excitation table

JK excitation: 0→0: J=0, K=X; 0→1: J=1, K=X; 1→0: J=X, K=1; 1→1: J=X, K=0.

Present Q2Q1Q0Next Q2Q1Q0J2K2J1K1J0K0
0000010X0X1X
0010100X1XX1
0100110XX01X
0111001XX1X1
100101X00X1X
101000X10XX1

K-maps

J1: Q2 / Q1Q000011110
001XX
100XX
K1: Q2 / Q1Q000011110
0XX10
1XXXX
J2: Q2 / Q1Q000011110
00010
1XXXX
K2: Q2 / Q1Q000011110
0XXXX
101XX

J0=K0=1J_0 = K_0 = 1 (Q0 toggles on every clock).

Equations

J2=Q1Q0,K2=Q0J1=Q2‾Q0,K1=Q0J0=1,K0=1\begin{aligned} &J_2 = Q_1Q_0,\quad K_2 = Q_0 \\ &J_1 = \overline{Q_2}Q_0,\quad K_1 = Q_0 \\ &J_0 = 1,\quad K_0 = 1 \end{aligned}

Circuit (negative-edge triggered)

   +-----+       +-----+       +-----+
J0>|J   Q|-Q0 J1>|J   Q|-Q1 J2>|J   Q|-Q2
   | FF0 |       | FF1 |       | FF2 |
K0>|K    |    K1>|K    |    K2>|K    |
   +--o--+       +--o--+       +--o--+
      |             |             |
CLK---+-------------+-------------+
J0 = K0 = 1
J1 = Q2'.Q0    K1 = Q0
J2 = Q1.Q0     K2 = Q0

"o" at the clock input shows negative-edge triggering. Only two 2-input AND gates are needed.

Check

Unused states go 110 → 111 → 000, so the counter starts correctly from any power-on state.

Timing diagram

CLK  __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q2   ________________|‾‾‾‾‾‾‾|_______
Q1   ________|‾‾‾‾‾‾‾|_______________
Q0   ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾
Cnt  0    1   2   3   4   5   0   1

All outputs change at the falling clock edges; Q2Q_2 gives fclk/6f_{clk}/6.

  • 2078 Kartik · 5 marks

Explain the operation of digital clock with neat and clean diagram.

Answer

A digital clock displays hours, minutes and seconds in decimal digits. It works by counting a precise 1 Hz signal with a chain of mod-10 and mod-6 counters, decoding each counter's BCD output and showing it on seven-segment displays.

Block diagram

 AC 50 Hz -> [Shaper] -> [÷10] -> [÷5] -> 1 Hz
                                          |
   +--------------------------------------+
   v            SECONDS (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/min
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            MINUTES (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/h
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            HOURS (01-12)
 [÷10 units] -----> [tens FF] <--- reset/load logic
   |                   |
 [7447 dec]        [decoder]
 [7-seg disp]      [7-seg disp]

Operation

  1. Pulse shaping: the 50 Hz AC mains is stepped down by a transformer and converted to a clean square wave by a Schmitt trigger (wave-shaping circuit).
  2. Frequency divider: a ÷10 counter followed by a ÷5 counter divides 50 Hz down to 1 Hz (1 pulse per second). With 60 Hz mains a ÷60 is used; quartz clocks use a 32.768 kHz crystal and a 15-stage binary divider.
  3. Seconds counter: the units counter (mod-10) counts 0–9. Each 9 → 0 change clocks the tens counter (mod-6), which counts 0–5. At 59 → 00 the tens counter resets and sends 1 pulse per minute onward.
  4. Minutes counter: same as the seconds counter, giving 00–59 and 1 pulse per hour.
  5. Hours counter: a mod-10 units counter and a tens flip-flop with reset logic so that the hours go 01 → 12 → 01 (12-hour clock); a 24-hour clock clears at 24.
  6. Decoder/drivers: each BCD output drives a BCD-to-7-segment decoder (7447) that lights the right segments of each display.

The accuracy of the clock depends only on the accuracy of the 1 Hz time base.

  • 2076 Asoj

Design 12-Hr. digital clock.

Answer

A 12-hour digital clock shows time from 01:00:00 to 12:59:59 (often with an AM/PM indicator). The seconds and minutes sections are mod-60 counters; the special part is the hours counter, which must count 01 → 12 and then return to 01 (not 00).

Overall block diagram

 AC 50 Hz -> [Shaper] -> [÷10] -> [÷5] -> 1 Hz
                                          |
   +--------------------------------------+
   v            SECONDS (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/min
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            MINUTES (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/h
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            HOURS (01-12)
 [÷10 units] -----> [tens FF] <--- reset/load logic
   |                   |
 [7447 dec]        [decoder]
 [7-seg disp]      [7-seg disp]

Seconds and minutes (÷60 each)

  • A 1 Hz signal is obtained from 50 Hz mains by a Schmitt trigger and a ÷50 divider (÷10, ÷5).
  • Units: mod-10 counter (0–9). Its Q3Q_3 falling edge (9 → 0) clocks the tens counter.
  • Tens: mod-6 counter (0–5), cleared at 6 (0110) by a NAND of Q2Q_2, Q1Q_1. Its reset gives 1 pulse per minute (from seconds) or 1 pulse per hour (from minutes).

Hours counter (01 to 12)

  • Units: mod-10 counter with outputs U3U2U1U0U_3U_2U_1U_0.
  • Tens: a single JK flip-flop (J = K = 1) with output T, clocked by U3U_3 when units go 9 → 0. So 09 → 10.
  • Recycle logic: after 12 the next pulse gives 13 (T = 1, units 0011). With T = 1 the units only reach 0, 1, 2, 3, so 13 is the first state with T=U1=U0=1T = U_1 = U_0 = 1. A 3-input NAND gate detects it:
LOAD‾=T U1 U0‾\overline{LOAD} = \overline{T\,U_1\,U_0}

Its low output clears the tens flip-flop and units bits U3,U2,U1U_3, U_2, U_1, and presets U0U_0, so the display jumps from 13 straight to 01.

 1 pulse/h (from minutes section)
      |
      v
 +-----------+  U3 (9->0)  +---------+
 | Hours     |------------>| Tens FF |  T
 | units     |             | (J=K=1) |
 | MOD-10    |             +---------+
 +-----------+                  |
  U3 U2 U1 U0                   |
       |  |                     |
   U1--+  +--U0     T ----------+
       v  v         v
      [   NAND (T.U1.U0)  ]--o--> CLR tens FF,
                                  CLR U3 U2 U1,
                                  PRESET U0

Hours sequence

PulseTU (BCD)Display
start0000101
80100109
91000010
101000111
111001012
121 → 00011 → 000113 → 01

Display

Each BCD output feeds a BCD-to-7-segment decoder (7447) and display. The hours tens digit shows only "1" or blank, so segments b and c can be driven directly from T. An extra flip-flop toggled at 11 → 12 can drive an AM/PM indicator.

Questions from Old Question Collection (EX 502) (IOE EX 502 exam papers (BEL/BEX/BCT II/I) from 2068 to 2081) and Old Question Collection (BEI, EX 401) (IOE EX 401 exam papers (BEI I/I) from 2075 to 2082). Answers are written for this site; check them against your class notes.

Chapter titles and hours from the IOE syllabus ↗