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 , 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
| Q | Q+ | J | K |
|---|---|---|---|
| 0 | 0 | 0 | x |
| 0 | 1 | 1 | x |
| 1 | 0 | x | 1 |
| 1 | 1 | x | 0 |
Step 3: state table with flip-flop inputs
| State | Q2 | Q1 | Q0 | Q2+ | Q1+ | Q0+ | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | x | 0 | x | 1 | x |
| 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | x | 1 | x | x | 1 |
| 2 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | x | x | 0 | 1 | x |
| 3 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | x | x | 1 | x | 1 |
| 4 | 1 | 0 | 0 | 0 | 0 | 0 | x | 1 | 0 | x | 0 | x |
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
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 .
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 , 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 . So:
- FF0 is clocked by the external CLK.
- FF1 is clocked by , FF2 by , FF3 by .
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
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
| CLK | Q3 | Q2 | Q1 | Q0 | Count |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 2 | 0 | 0 | 1 | 0 | 2 |
| 3 | 0 | 0 | 1 | 1 | 3 |
| 4 | 0 | 1 | 0 | 0 | 4 |
| 5 | 0 | 1 | 0 | 1 | 5 |
| 6 | 0 | 1 | 1 | 0 | 6 |
| 7 | 0 | 1 | 1 | 1 | 7 |
| 8 | 1 | 0 | 0 | 0 | 8 |
| 9 | 1 | 0 | 0 | 1 | 9 |
| 10 | 1 | 0 | 1 | 0 | 10 |
| 11 | 1 | 0 | 1 | 1 | 11 |
| 12 | 0 | 0 | 0 | 0 | 0 |
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 . (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 , 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
| Q | Q+ | T |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Step 3: state table with flip-flop inputs
| State | Q2 | Q1 | Q0 | Q2+ | Q1+ | Q0+ | T2 | T1 | T0 |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 |
| 2 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 |
| 3 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 |
| 5 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
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
- : all used states are 1, so .
- : 1s at states 1 and 3; state 5 is 0, so .
- : 1s at states 3 and 5; with don't care 7: .
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 .
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 T flip-flops (, = LSB).
- Used states: 0000 to 1001. Unused states 1010 to 1111 are taken as don't cares (X).
- T flip-flop excitation: (T = 1 whenever the flip-flop must change).
Step 2: Excitation table
| Present Q3Q2Q1Q0 | Next Q3Q2Q1Q0 | T3 | T2 | T1 | T0 |
|---|---|---|---|---|---|
| 0000 | 0001 | 0 | 0 | 0 | 1 |
| 0001 | 0010 | 0 | 0 | 1 | 1 |
| 0010 | 0011 | 0 | 0 | 0 | 1 |
| 0011 | 0100 | 0 | 1 | 1 | 1 |
| 0100 | 0101 | 0 | 0 | 0 | 1 |
| 0101 | 0110 | 0 | 0 | 1 | 1 |
| 0110 | 0111 | 0 | 0 | 0 | 1 |
| 0111 | 1000 | 1 | 1 | 1 | 1 |
| 1000 | 1001 | 0 | 0 | 0 | 1 |
| 1001 | 0000 | 1 | 0 | 0 | 1 |
Step 3: K-maps (X = don't care)
for every state. The other inputs:
| T1: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 1 | 1 | 0 |
| 01 | 0 | 1 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | 0 | 0 | X | X |
| T2: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 1 | 0 |
| 01 | 0 | 0 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | 0 | 0 | X | X |
| T3: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 0 | 0 |
| 01 | 0 | 0 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | 0 | 1 | X | X |
Step 4: Simplified equations
So two 2-input AND gates ( and ), one 3-input AND (), one 2-input AND () and one OR gate for 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
toggles on every clock edge, toggles when (except at count 9), toggles when , and goes high at count 8 and returns low after count 9. The counter therefore divides the clock frequency by 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 (toggle mode):
- Up count: the next flip-flop must toggle when the previous output goes , so it is clocked from .
- Down count: the next flip-flop must toggle when the previous output goes , i.e. when goes , so it is clocked from .
A 2-input AND-OR (or MUX) between stages selects or :
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 (Q0 = LSB) give the count.
Operation
- M = 1 (up): FF0 toggles on every falling clock edge. When falls from 1 to 0, FF1 toggles; when falls, FF2 toggles. Sequence: 000, 001, 010, …, 111, 000.
- M = 0 (down): FF1 toggles when rises (its falls), and FF2 toggles when 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 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 () 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 Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 011 | 0 | X | 1 | X | X | 0 |
| 011 | 010 | 0 | X | X | 0 | X | 1 |
| 010 | 110 | 1 | X | X | 0 | 0 | X |
| 110 | 111 | X | 0 | X | 0 | 1 | X |
| 111 | 101 | X | 0 | X | 1 | X | 0 |
| 101 | 100 | X | 0 | 0 | X | X | 1 |
| 100 | 000 | X | 1 | 0 | X | 0 | X |
Step 3: K-maps
| J0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | X | X | 0 |
| 1 | 0 | X | X | 1 |
| K0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | 0 | 1 | X |
| 1 | X | 1 | 0 | X |
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | 0 | 0 | X | X |
| K1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 0 | 0 |
| 1 | X | X | 1 | 0 |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 1 | X | X | X | X |
| K2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | X | X |
| 1 | 1 | 0 | 0 | 0 |
Step 4: Equations
So (XNOR) and (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: JK flip-flops, negative-edge triggered, all with (toggle mode).
- The clock drives FF0 only; clocks FF1, clocks FF2, clocks FF3.
- The counter must reset when the count reaches 10 = 1010. In 1010, and ; this is the first count in which both are 1. So a 2-input NAND gate of and 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
| Clock | Q3 Q2 Q1 Q0 | Decimal |
|---|---|---|
| 0 | 0 0 0 0 | 0 |
| 1 | 0 0 0 1 | 1 |
| 2 | 0 0 1 0 | 2 |
| 3 | 0 0 1 1 | 3 |
| 4 | 0 1 0 0 | 4 |
| 5 | 0 1 0 1 | 5 |
| 6 | 0 1 1 0 | 6 |
| 7 | 0 1 1 1 | 7 |
| 8 | 1 0 0 0 | 8 |
| 9 | 1 0 0 1 | 9 |
| 10 | 1 0 1 0 → 0 0 0 0 | 0 (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 at the 10th edge, caused by the 1010 state, is ignored in the ideal diagram.) has a frequency of , 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 , 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. is the clock of FF1, of FF2 and 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 , so (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
- Initially all flip-flops are cleared: .
- Every falling clock edge toggles FF0. Whenever goes 1→0, FF1 toggles; whenever goes 1→0, FF2 toggles; whenever goes 1→0, FF3 toggles. The count rises 0, 1, 2, …, 9.
- 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 pulse | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Q3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
| Q2 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
| Q1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| Q0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
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. is high only for counts 8 and 9, and its frequency is . In a real circuit each stage adds a propagation delay , so the outputs ripple and a narrow spike appears on 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
| Point | Synchronous counter | Asynchronous (ripple) counter |
|---|---|---|
| Clock | Common clock to all flip-flops | Only FF0 gets the clock; each next FF is clocked by the previous output |
| Change of state | All flip-flops change together | Flip-flops change one after another (ripple) |
| Delay | One FF delay + gate delay | Adds up: |
| Speed | Fast, high clock frequency | Slow, frequency falls as grows |
| Circuit | Needs extra gating logic | Simple, few or no extra gates |
| Decoding glitches | None (no false states) | Momentary false states give glitches |
| Example ICs | 74160/74163, 74190 | 7490, 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 () share one clock.
Excitation table (JK: 0→0: 0X, 0→1: 1X, 1→0: X1, 1→1: X0)
| Present Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 111 | 110 | X | 0 | X | 0 | X | 1 |
| 110 | 101 | X | 0 | X | 1 | 1 | X |
| 101 | 100 | X | 0 | 0 | X | X | 1 |
| 100 | 011 | X | 1 | 1 | X | 1 | X |
| 011 | 010 | 0 | X | X | 0 | X | 1 |
| 010 | 001 | 0 | X | X | 1 | 1 | X |
| 001 | 000 | 0 | X | 0 | X | X | 1 |
| 000 | 111 | 1 | X | 1 | X | 1 | X |
K-maps
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | 0 | X | X |
| 1 | 1 | 0 | X | X |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 0 |
| 1 | X | X | X | X |
and are 1 in every row (Q0 toggles every clock), so . and have the same map, and so do and .
Equations
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
- Number of flip-flops: a mod-11 counter needs 11 states (0 to 10). , so 4 flip-flops are needed. JK flip-flops with (toggle) and negative-edge clocks are used.
- Clocking: CLK → FF0; → clock of FF1; → FF2; → FF3. With falling-edge triggering, using Q as the next clock gives an up count.
- 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, . In the states 0 to 10, these three bits are never all 1, so a 3-input NAND gate of drives the active-low CLEAR 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 ---| |
Q1 ---| NAND |o--> CLR of all FFs (active low)
Q0 ---| |
Count table
| Clock | Q3 Q2 Q1 Q0 | Count |
|---|---|---|
| 0 | 0000 | 0 |
| 1–7 | 0001 … 0111 | 1–7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | 10 |
| 11 | 1011 → 0000 | 0 (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
is high for counts 8, 9 and 10, so the output frequency at is .
- 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:
Step 1: Flip-flops and unused states
- 5 states need JK flip-flops (), 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 Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 011 | 0 | X | 1 | X | X | 0 |
| 011 | 010 | 0 | X | X | 0 | X | 1 |
| 010 | 110 | 1 | X | X | 0 | 0 | X |
| 110 | 000 | X | 1 | X | 1 | 0 | X |
Step 3: K-maps
| J0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | X | X | 0 |
| 1 | X | X | X | 0 |
| K0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | 0 | 1 | X |
| 1 | X | X | X | X |
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | X | X | X | X |
| K1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 0 | 0 |
| 1 | X | X | X | 1 |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 1 | X | X | X | X |
: Q2 = 1 only in state 110, where it must reset, and the other cells are X, so .
Step 4: Equations
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 ( and can be taken from the flip-flops' outputs, so in practice just one 2-input AND gate).
Step 6: Check of unused states
| Unused state | Next state |
|---|---|
| 100 | 001 |
| 101 | 011 |
| 111 | 000 |
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
| Point | Combinational circuit | Sequential circuit |
|---|---|---|
| Output depends on | Present inputs only | Present inputs and past state |
| Memory | No memory | Has memory (flip-flops/latches) |
| Feedback | No feedback path | Feedback from output to input |
| Clock | Not needed | Usually clocked |
| Analysis tool | Truth table | State table / state diagram |
| Examples | Adder, MUX, decoder | Flip-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 () are used with . CLK drives FF0, and , , clock FF1, FF2, FF3.
The counter must be cleared at 12 = 1100. It is the first count with , so a 2-input NAND of and 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
is high for counts 8 to 11, so .
- 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 (). 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 Q3Q2Q1Q0 | Next Q3Q2Q1Q0 | J3 | K3 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|---|---|
| 0000 | 0001 | 0 | X | 0 | X | 0 | X | 1 | X |
| 0001 | 0010 | 0 | X | 0 | X | 1 | X | X | 1 |
| 0010 | 0011 | 0 | X | 0 | X | X | 0 | 1 | X |
| 0011 | 0100 | 0 | X | 1 | X | X | 1 | X | 1 |
| 0100 | 0101 | 0 | X | X | 0 | 0 | X | 1 | X |
| 0101 | 0110 | 0 | X | X | 0 | 1 | X | X | 1 |
| 0110 | 0111 | 0 | X | X | 0 | X | 0 | 1 | X |
| 0111 | 1000 | 1 | X | X | 1 | X | 1 | X | 1 |
| 1000 | 1001 | X | 0 | 0 | X | 0 | X | 1 | X |
| 1001 | 0000 | X | 1 | 0 | X | 0 | X | X | 1 |
Step 3: K-maps (only the non-trivial ones)
| J1: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 1 | X | X |
| 01 | 0 | 1 | X | X |
| 11 | X | X | X | X |
| 10 | 0 | 0 | X | X |
| J3: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 0 | 0 |
| 01 | 0 | 0 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | X | X | X | X |
| K3: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | X | X | X | X |
| 01 | X | X | X | X |
| 11 | X | X | X | X |
| 10 | 0 | 1 | X | X |
and are read the same way.
Step 4: Equations
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. is high for counts 8 and 9, giving . 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 () 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 Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 011 | 0 | X | 1 | X | X | 0 |
| 011 | 111 | 1 | X | X | 0 | X | 0 |
| 111 | 110 | X | 0 | X | 0 | X | 1 |
| 110 | 100 | X | 0 | X | 1 | 0 | X |
| 100 | 000 | X | 1 | 0 | X | 0 | X |
Step 3: K-maps
| J0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | X | X | X |
| 1 | 0 | X | X | 0 |
| K0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | 0 | 0 | X |
| 1 | X | X | 1 | X |
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | 0 | X | X | X |
| K1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 0 | X |
| 1 | X | X | 0 | 1 |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | X |
| 1 | X | X | X | X |
| K2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | X | X |
| 1 | 1 | X | 0 | 0 |
Step 4: Equations
The minimum groups give , 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, , removes this problem at the cost of one AND gate:
Check of unused states (with )
| Unused state | Next state |
|---|---|
| 010 | 001 (in sequence) |
| 101 | 010 → 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 . CLK drives FF0; , , drive the clocks of FF1, FF2, FF3. A NAND gate of and 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
- All flip-flops are cleared first, so the count is 0000.
- FF0 toggles on each falling edge of CLK. FF1 toggles whenever goes 1→0, FF2 whenever goes 1→0, FF3 whenever goes 1→0. This produces the binary up count.
- On the 10th pulse the outputs reach 1010. This is the first state with , so the NAND output goes low and clears all flip-flops to 0000. The counter therefore has 10 stable states (0–9).
| Clock | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Q3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
| Q2 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
| Q1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| Q0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
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. gives one pulse for every 10 clock pulses (). Because the stages change one after another, the real outputs are delayed by 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. , so 3 JK flip-flops () 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 Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 010 | 0 | X | 1 | X | X | 1 |
| 010 | 011 | 0 | X | X | 0 | 1 | X |
| 011 | 100 | 1 | X | X | 1 | X | 1 |
| 100 | 101 | X | 0 | 0 | X | 1 | X |
| 101 | 000 | X | 1 | 0 | X | X | 1 |
Step 3: K-maps
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | 0 | 0 | X | X |
| K1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 1 | 0 |
| 1 | X | X | X | X |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | X | X | X | X |
| K2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | X | X |
| 1 | 0 | 1 | X | X |
since toggles on every clock.
Step 4: Equations
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 state | Next state |
|---|---|
| 110 | 111 |
| 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
All outputs change together at the falling clock edge; gives .
- 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
| Point | Combinational circuit | Sequential circuit |
|---|---|---|
| Output depends on | Present inputs only | Present inputs and past state |
| Memory | No memory | Has memory (flip-flops/latches) |
| Feedback | No feedback path | Feedback from output to input |
| Clock | Not needed | Usually clocked |
| Analysis tool | Truth table | State table / state diagram |
| Examples | Adder, MUX, decoder | Flip-flop, register, counter |
Mod-12 asynchronous down counter (negative-edge JK)
Design idea
- 12 states need 4 flip-flops (). JK flip-flops with toggle on each falling clock edge.
- Down counting with negative-edge clocks: a stage must toggle when the previous output goes , i.e. when its goes . So FF0 gets CLK, and , , drive the clocks of FF1, FF2, FF3.
- 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.
- Preset logic: 0011 is the only state reached in which (the ripple transients of the other steps never make both 0). An OR gate gives only then, and its output drives the active-low PRESET of all four flip-flops:
(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
| Clock | Q3 Q2 Q1 Q0 | State |
|---|---|---|
| 0 | 1111 | 15 |
| 1 | 1110 | 14 |
| 2 | 1101 | 13 |
| … | … | … |
| 10 | 0101 | 5 |
| 11 | 0100 | 4 |
| 12 | 0011 → 1111 | preset to 15 |
Operation: each falling clock edge toggles FF0. When rises (0→1), 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
completes one cycle every 12 clock pulses ().
- 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 and holds when , so .
Truth (excitation) table
4 flip-flops are needed (); states 1010–1111 are don't cares.
| Present Q3Q2Q1Q0 | Next Q3Q2Q1Q0 | T3 | T2 | T1 | T0 |
|---|---|---|---|---|---|
| 0000 | 0001 | 0 | 0 | 0 | 1 |
| 0001 | 0010 | 0 | 0 | 1 | 1 |
| 0010 | 0011 | 0 | 0 | 0 | 1 |
| 0011 | 0100 | 0 | 1 | 1 | 1 |
| 0100 | 0101 | 0 | 0 | 0 | 1 |
| 0101 | 0110 | 0 | 0 | 1 | 1 |
| 0110 | 0111 | 0 | 0 | 0 | 1 |
| 0111 | 1000 | 1 | 1 | 1 | 1 |
| 1000 | 1001 | 0 | 0 | 0 | 1 |
| 1001 | 0000 | 1 | 0 | 0 | 1 |
K-map simplification
| T1: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 1 | 1 | 0 |
| 01 | 0 | 1 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | 0 | 0 | X | X |
| T3: Q3Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 00 | 0 | 0 | 0 | 0 |
| 01 | 0 | 0 | 1 | 0 |
| 11 | X | X | X | X |
| 10 | 0 | 1 | X | X |
Similarly is 1 for states 0011 and 0111, giving , and .
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
- toggles on every falling edge ().
- toggles when , except at 9 where blocks it.
- toggles when (at 3 → 4 and 7 → 8).
- sets at 7 → 8 () and resets at 9 → 0 (); its frequency is .
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 is a 1→0 change of . So each stage is clocked from the of the previous stage.
Circuit
Four negative-edge JK flip-flops, all with (toggle mode). CLK → FF0; → FF1; → FF2; → FF3. The count is read from .
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
- Start with 0000. On the first falling edge FF0 toggles: goes 0→1, so falls and FF1 toggles; goes 0→1, so FF2 toggles; and then FF3 toggles. The count becomes 1111 (15).
- Next edge: goes 1→0, rises, so FF1 does not change: 1110 (14).
- Next edge: 0→1 toggles FF1 ( 1→0), which does not clock FF2: 1101 (13).
- The count keeps falling by one per pulse: 12, 11, …, 1, 0, and then 15 again.
| Clock | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| Q3Q2Q1Q0 | 0000 | 1111 | 1110 | 1101 | 1100 | 1011 | 1010 | 1001 | 1000 |
| Count | 0 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
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 changes when the of the stage before it goes high (its falls). In practice each stage adds a delay , so the change from 0000 to 1111 takes . The circuit also divides frequency: , , , .
- 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 (), .
- CLK → FF0; → clock of FF1; → FF2; → FF3.
- Count 12 = 1100 is the first state with . A NAND gate of and 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 edge; each later stage toggles when the previous Q falls 1→0, so the count rises 0, 1, 2, …, 11.
- On the 12th pulse the outputs go from 1011 towards 1100. As soon as , the NAND output goes low and clears all flip-flops to 0000. State 1100 lasts only a few nanoseconds.
| Clock | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Q3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 |
| Q2 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 |
| Q1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 |
| Q0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
Timing diagram
CLK __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3 ________________________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
Q2 ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________________
Q1 ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___
Q0 ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt 0 1 2 3 4 5 6 7 8 9 10 11 0
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, , so the next-state columns give the D inputs directly.
| Present Q2Q1Q0 | Next Q2Q1Q0 | D2 | D1 | D0 |
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 011 | 0 | 1 | 1 |
| 011 | 010 | 0 | 1 | 0 |
| 010 | 110 | 1 | 1 | 0 |
| 110 | 111 | 1 | 1 | 1 |
| 111 | 101 | 1 | 0 | 1 |
| 101 | 100 | 1 | 0 | 0 |
| 100 | 000 | 0 | 0 | 0 |
K-maps
| D0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| D1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 |
| D2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 |
Equations
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
- 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.)
- Seconds section: a mod-10 counter (7490) counts seconds units 0–9. Each time it goes from 9 to 0, its 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.
- 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.
- 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.
- 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
| Section | Units counter | Tens counter | Output pulse |
|---|---|---|---|
| Seconds | mod-10 | mod-6 | 1 per minute |
| Minutes | mod-10 | mod-6 | 1 per hour |
| Hours | mod-10 | 1 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 () 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 Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 010 | 0 | X | 1 | X | X | 1 |
| 010 | 011 | 0 | X | X | 0 | 1 | X |
| 011 | 100 | 1 | X | X | 1 | X | 1 |
| 100 | 000 | X | 1 | 0 | X | 0 | X |
K-maps
| J0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | X | X | 1 |
| 1 | 0 | X | X | X |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | X | X | X | X |
The other maps give , and .
Equations
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
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 Hz input: the 50 Hz mains is shaped into pulses and divided by 50 (÷10 then ÷5) to give 1 pulse per second.
- 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 goes from 1 to 0.
- Tens counter (mod-6): the falling edge of the units 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 and (or a 7492 wired as ÷6).
- 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 at this reset gives one pulse per minute, which clocks the minutes units counter.
- 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
| Pulses | Tens (BCD) | Units (BCD) | Display |
|---|---|---|---|
| 0 | 000 | 0000 | 00 |
| 9 | 000 | 1001 | 09 |
| 10 | 001 | 0000 | 10 |
| 59 | 101 | 1001 | 59 |
| 60 | 000 | 0000 | 00 (+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
| Point | Synchronous | Asynchronous |
|---|---|---|
| Timing | State changes only at clock edges | State changes whenever inputs change |
| Clock | Common clock to all flip-flops | No common clock |
| Memory elements | Clocked flip-flops | Unclocked latches or gate delays (or FFs clocked by other FFs) |
| Speed | Limited by clock frequency | Can be faster |
| Problems | Clock skew | Races, hazards, false states |
| Design | Easier, systematic | Harder |
| Example | Synchronous counter | Ripple 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 Q3Q2Q1Q0 | Next Q3Q2Q1Q0 | J3 | K3 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|---|---|
| 0000 | 0001 | 0 | X | 0 | X | 0 | X | 1 | X |
| 0001 | 0010 | 0 | X | 0 | X | 1 | X | X | 1 |
| 0010 | 0011 | 0 | X | 0 | X | X | 0 | 1 | X |
| 0011 | 0100 | 0 | X | 1 | X | X | 1 | X | 1 |
| 0100 | 0101 | 0 | X | X | 0 | 0 | X | 1 | X |
| 0101 | 0110 | 0 | X | X | 0 | 1 | X | X | 1 |
| 0110 | 0111 | 0 | X | X | 0 | X | 0 | 1 | X |
| 0111 | 1000 | 1 | X | X | 1 | X | 1 | X | 1 |
| 1000 | 1001 | X | 0 | 0 | X | 0 | X | 1 | X |
| 1001 | 1010 | X | 0 | 0 | X | 1 | X | X | 1 |
| 1010 | 1011 | X | 0 | 0 | X | X | 0 | 1 | X |
| 1011 | 0000 | X | 1 | 0 | X | X | 1 | X | 1 |
Equations (from K-maps)
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
- toggles on every clock edge.
- toggles whenever .
- sets when and (at 3 → 4), and resets when (at 7 → 8). At 11 (1011), blocks , so stays 0.
- sets at 7 → 8 () and resets at 11 → 0 ( with ).
- 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
is high for counts 8–11, giving . 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 .
- Four negative-edge JK flip-flops with (toggle mode). CLK → FF0, → FF1, → FF2, → FF3.
- At count 10 (1010), and are both 1 for the first time. A NAND gate of and 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
- Clear all flip-flops: 0000.
- Each falling edge of CLK toggles FF0. FF1 toggles every time falls 1→0; FF2 every time falls; FF3 every time falls. The outputs therefore count up in binary.
- After the 9th pulse the count is 1001. The 10th pulse makes fall, which toggles to 1, giving 1010 for a moment. The NAND output becomes 0 and clears all flip-flops to 0000. The next cycle begins.
| Pulse | Q3 Q2 Q1 Q0 | Count |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 → 0000 | 0 |
Timing diagram
CLK __|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾
Q3 ________________________________|‾‾‾‾‾‾‾|___
Q2 ________________|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___________
Q1 ________|‾‾‾‾‾‾‾|_______|‾‾‾‾‾‾‾|___________
Q0 ____|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___|‾‾‾|___
Cnt 0 1 2 3 4 5 6 7 8 9 0
- changes at every falling clock edge ().
- , , change at the falling edges of , , .
- is high during counts 8 and 9 and gives .
- In the real circuit each stage adds one propagation delay and a narrow spike appears on 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. , so 3 T flip-flops with a common clock. States 110 and 111 are don't cares. For a T flip-flop, .
Step 2: Excitation table
| Present Q2Q1Q0 | Next Q2Q1Q0 | T2 | T1 | T0 |
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 010 | 0 | 1 | 1 |
| 010 | 011 | 0 | 0 | 1 |
| 011 | 100 | 1 | 1 | 1 |
| 100 | 101 | 0 | 0 | 1 |
| 101 | 000 | 1 | 0 | 1 |
Step 3: K-maps
| T1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | X | X |
| T2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | X | X |
in every row.
Step 4: Equations
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. 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
- Flip-flops: , so 4 JK flip-flops, all with (toggle mode).
- Clocking for positive-edge flip-flops: in an up count a stage must toggle when the previous output falls 1→0. A falling is a rising , so with positive-edge triggering each stage is clocked from the of the previous stage: CLK → FF0, → FF1, → FF2, → FF3.
- Reset logic: count 12 = 1100 must clear the counter. It is the first state with , so
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 .)
Count sequence
| Clock | Q3 Q2 Q1 Q0 | Count |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 4 | 0100 | 4 |
| 8 | 1000 | 8 |
| 11 | 1011 | 11 |
| 12 | 1100 → 0000 | 0 |
Operation and timing
FF0 toggles at every rising clock edge. When falls, 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
is high for counts 8–11, so it gives .
- 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 in terms of the inputs and the present state .
| S | R | Q | Q+ |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | X (invalid) |
| 1 | 1 | 1 | X (invalid) |
| Q+: S / RQ | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | X | X |
Grouping the row S = 1 (with the X cells) gives ; grouping cells 01 of both rows gives :
Mod-5 synchronous counter using D flip-flops (negative-edge clock)
Step 1: States 000 → 001 → 010 → 011 → 100 → 000. 3 D flip-flops (), all clocked by the falling edge. States 101, 110, 111 are don't cares. For a D flip-flop .
Step 2: Excitation table
| Present Q2Q1Q0 | Next Q2Q1Q0 | D2 | D1 | D0 |
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 010 | 0 | 1 | 0 |
| 010 | 011 | 0 | 1 | 1 |
| 011 | 100 | 1 | 0 | 0 |
| 100 | 000 | 0 | 0 | 0 |
Step 3: K-maps
| D0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 1 |
| 1 | 0 | X | X | X |
| D1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 1 |
| 1 | 0 | X | X | X |
| D2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | X | X | X |
Step 4: Equations
so .
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
| Point | Synchronous counter | Asynchronous (ripple) counter |
|---|---|---|
| Clock | Common clock to all flip-flops | Only FF0 gets the clock; each next FF is clocked by the previous output |
| Change of state | All flip-flops change together | Flip-flops change one after another (ripple) |
| Delay | One FF delay + gate delay | Adds up: |
| Speed | Fast, high clock frequency | Slow, frequency falls as grows |
| Circuit | Needs extra gating logic | Simple, few or no extra gates |
| Decoding glitches | None (no false states) | Momentary false states give glitches |
| Example ICs | 74160/74163, 74190 | 7490, 7493 |
Design of 3-bit synchronous up counter (T flip-flops)
Step 1: Count 000 → 001 → … → 111 → 000. Three T flip-flops () share the clock. A T flip-flop toggles when , so .
Step 2: Excitation table
| Present Q2Q1Q0 | Next Q2Q1Q0 | T2 | T1 | T0 |
|---|---|---|---|---|
| 000 | 001 | 0 | 0 | 1 |
| 001 | 010 | 0 | 1 | 1 |
| 010 | 011 | 0 | 0 | 1 |
| 011 | 100 | 1 | 1 | 1 |
| 100 | 101 | 0 | 0 | 1 |
| 101 | 110 | 0 | 1 | 1 |
| 110 | 111 | 0 | 0 | 1 |
| 111 | 000 | 1 | 1 | 1 |
Step 3: K-maps
| T1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | 0 |
| T2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 |
in every row.
Step 4: Equations
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; , , have frequencies , , .
- 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
| Point | Combinational circuit | Sequential circuit |
|---|---|---|
| Output depends on | Present inputs only | Present inputs and past state |
| Memory | No memory | Has memory (flip-flops/latches) |
| Feedback | No feedback path | Feedback from output to input |
| Clock | Not needed | Usually clocked |
| Analysis tool | Truth table | State table / state diagram |
| Examples | Adder, MUX, decoder | Flip-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 . CLK → FF0; , , clock FF1, FF2, FF3. A NAND of and 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
- Start at 0000. FF0 toggles on every falling clock edge.
- FF1 toggles when goes 1→0, FF2 when goes 1→0, FF3 when goes 1→0, so the count rises by one per pulse: 0, 1, …, 9.
- On the 10th pulse the outputs try to become 1010. Since , 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
is high for counts 8 and 9 and gives . 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
| Point | Combinational circuit | Sequential circuit |
|---|---|---|
| Output depends on | Present inputs only | Present inputs and past state |
| Memory | No memory | Has memory (flip-flops/latches) |
| Feedback | No feedback path | Feedback from output to input |
| Clock | Not needed | Usually clocked |
| Analysis tool | Truth table | State table / state diagram |
| Examples | Adder, MUX, decoder | Flip-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:
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
| Count | Q3 Q2 Q1 Q0 | Flip-flops that toggle at next clock |
|---|---|---|
| 0 | 0000 | FF0 |
| 1 | 0001 | FF0, FF1 |
| 2 | 0010 | FF0 |
| 3 | 0011 | FF0, FF1, FF2 |
| 4 | 0100 | FF0 |
| 5 | 0101 | FF0, FF1 |
| 6 | 0110 | FF0 |
| 7 | 0111 | FF0, FF1, FF2, FF3 (set) |
| 8 | 1000 | FF0 |
| 9 | 1001 | FF0, FF3 (reset); FF1 held by |
- FF0 toggles on every clock ().
- FF1 toggles when , but at count 9 keeps it at 0.
- FF2 toggles when .
- FF3 sets when (7 → 8) and resets when while (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. gives .
- 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 () are needed (); states 101, 110, 111 are don't cares.
Step 1: SR excitation
| Q → Q+ | S | R |
|---|---|---|
| 0 → 0 | 0 | X |
| 0 → 1 | 1 | 0 |
| 1 → 0 | 0 | 1 |
| 1 → 1 | X | 0 |
Step 2: Excitation table
| Present Q2Q1Q0 | Next Q2Q1Q0 | S2 | R2 | S1 | R1 | S0 | R0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | 0 |
| 001 | 010 | 0 | X | 1 | 0 | 0 | 1 |
| 010 | 011 | 0 | X | X | 0 | 1 | 0 |
| 011 | 100 | 1 | 0 | 0 | 1 | 0 | 1 |
| 100 | 000 | 0 | 1 | 0 | X | 0 | X |
Step 3: K-maps
| S0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 1 | 0 | 0 | 1 |
| 1 | 0 | X | X | X |
| R0: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 1 | X | X | X | X |
| S1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 0 | X |
| 1 | 0 | X | X | X |
| R1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | 0 | 1 | 0 |
| 1 | X | X | X | X |
| S2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | X | X | X |
| R2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 0 | X |
| 1 | 1 | X | X | X |
For , both and cover the 1-cell. With the unused state 110 would hold itself forever (lock-out), so is chosen.
Step 4: Equations
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
is high for one clock period in every five ().
- 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
| Point | Synchronous counter | Asynchronous (ripple) counter |
|---|---|---|
| Clock | Common clock to all flip-flops | Only FF0 gets the clock; each next FF is clocked by the previous output |
| Change of state | All flip-flops change together | Flip-flops change one after another (ripple) |
| Delay | One FF delay + gate delay | Adds up: |
| Speed | Fast, high clock frequency | Slow, frequency falls as grows |
| Circuit | Needs extra gating logic | Simple, few or no extra gates |
| Decoding glitches | None (no false states) | Momentary false states give glitches |
| Example ICs | 74160/74163, 74190 | 7490, 7493 |
Design of mod-6 synchronous counter (JK flip-flops)
Step 1: States. 000 → 001 → 010 → 011 → 100 → 101 → 000. Since , three JK flip-flops () 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 Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 010 | 0 | X | 1 | X | X | 1 |
| 010 | 011 | 0 | X | X | 0 | 1 | X |
| 011 | 100 | 1 | X | X | 1 | X | 1 |
| 100 | 101 | X | 0 | 0 | X | 1 | X |
| 101 | 000 | X | 1 | 0 | X | X | 1 |
Step 3: K-maps
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | 0 | 0 | X | X |
| K1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 1 | 0 |
| 1 | X | X | X | X |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | X | X | X | X |
| K2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | X | X |
| 1 | 0 | 1 | X | X |
since toggles every clock.
Step 4: Equations
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 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.
- Seconds (÷60): mod-10 units counter (0–9) whose clocks a mod-6 tens counter (0–5, cleared at 0110 by NAND of , ). The tens reset gives 1 pulse per minute.
- Minutes (÷60): identical to the seconds section; gives 1 pulse per hour.
- Hours (÷24): a mod-10 units counter (U) and a 2-bit tens counter (T: 0, 1, 2). The units falling at 9 → 0 clocks the tens counter.
- The count must go 23 → 00. Count 24 = tens 10, units 0100.
- Between 20 and 24, and occur together for the first time at 24. So a NAND gate of and drives the active-low CLEAR of both hour counters:
- Thus the hours count 00, 01, …, 09, 10, …, 19, 20, 21, 22, 23, 00.
- Display: each BCD output drives a 7447 BCD-to-7-segment decoder and a common-anode display (six digits: HH:MM:SS).
| Section | Counters | Reset condition |
|---|---|---|
| Seconds | ÷10, ÷6 | tens = 6 (0110) |
| Minutes | ÷10, ÷6 | tens = 6 (0110) |
| Hours | ÷10, ÷3 | hours = 24 () |
- 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 (). 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 Q2Q1Q0 | Next Q2Q1Q0 | J2 | K2 | J1 | K1 | J0 | K0 |
|---|---|---|---|---|---|---|---|
| 000 | 001 | 0 | X | 0 | X | 1 | X |
| 001 | 010 | 0 | X | 1 | X | X | 1 |
| 010 | 011 | 0 | X | X | 0 | 1 | X |
| 011 | 100 | 1 | X | X | 1 | X | 1 |
| 100 | 101 | X | 0 | 0 | X | 1 | X |
| 101 | 000 | X | 1 | 0 | X | X | 1 |
K-maps
| J1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | X | X |
| 1 | 0 | 0 | X | X |
| K1: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 1 | 0 |
| 1 | X | X | X | X |
| J2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | X | X | X | X |
| K2: Q2 / Q1Q0 | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | X | X |
| 1 | 0 | 1 | X | X |
(Q0 toggles on every clock).
Equations
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; gives .
- 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
- 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).
- 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.
- 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.
- Minutes counter: same as the seconds counter, giving 00–59 and 1 pulse per hour.
- 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.
- 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 falling edge (9 → 0) clocks the tens counter.
- Tens: mod-6 counter (0–5), cleared at 6 (0110) by a NAND of , . 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 .
- Tens: a single JK flip-flop (J = K = 1) with output T, clocked by 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 . A 3-input NAND gate detects it:
Its low output clears the tens flip-flop and units bits , and presets , 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
| Pulse | T | U (BCD) | Display |
|---|---|---|---|
| start | 0 | 0001 | 01 |
| 8 | 0 | 1001 | 09 |
| 9 | 1 | 0000 | 10 |
| 10 | 1 | 0001 | 11 |
| 11 | 1 | 0010 | 12 |
| 12 | 1 → 0 | 0011 → 0001 | 13 → 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 ↗