Sequential logic
AQA 7408 3.13.5.2 Sequential logic: binary, BCD and Johnson counters; clock, reset and up/down inputs; modulo-n counters made with reset logic
Key idea
In sequential logic the output depends on the present inputs and on the previous state: the circuit has memory. The most important sequential circuit here is the counter, a chain of flip-flops that steps through a sequence of states each time a clock pulse arrives. A binary counter counts 0, 1, 2, 3 … in binary; a BCD (binary-coded decimal) counter counts 0 to 9 and then returns to 0; a Johnson counter passes a pattern of 1s along a shift register, so an n-stage Johnson counter has 2n states and only one bit changes at each step.
A counter normally has a clock input (each pulse advances the count), a reset input (sets the count to 0) and sometimes an up/down control that chooses the direction. A modulo-n counter counts through n states and returns to 0. To make one from a binary counter, use reset logic: a gate (usually AND) detects the binary value of n and drives the reset, so the counter jumps to 0 as soon as it reaches n. For example, an AND gate on Q1 and Q2 of a 3-bit counter resets at 110 (6), giving a modulo-6 counter: 0, 1, 2, 3, 4, 5.

Figure 90. A 3-bit binary counter.
Read it: Q0 toggles on every clock pulse, Q1 toggles each time Q0 falls, and Q2 each time Q1 falls. Reading Q2 Q1 Q0 after each pulse gives 1, 2, 3, 4, 5, 6, 7, then back to 0.

Figure 91. Counting sequences compared.
Read it: The binary and BCD columns agree up to 9 (1001). After 9 the BCD counter returns to 0000. The Johnson column shows a 4-stage counter: 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001, then back to 0000.

Figure 92. A 4-stage Johnson counter.
Read it: Four D-type flip-flops share a clock. The inverted output of the last stage is fed back to the first stage, so the pattern fills with 1s and then empties again: 2 × 4 = 8 states.

Figure 93. The BCD counter as a ring of ten states.
Read it: The count goes 0, 1, 2 … 9 and, on the next clock pulse, returns to 0. Only the first ten binary numbers are used.
Modulo-n counters and counter inputs

Figure 94. A modulo-6 counter.
Read it: When the count reaches 6 (110) the AND gate sees Q1 = Q2 = 1 and its output resets the counter to 0, so it counts 0 to 5 and repeats.

Figure 95. Counter inputs.
Read it: The clock advances the count, the reset returns it to zero, and the up/down control selects whether each pulse adds or subtracts 1.

Figure 96. Designing a modulo-10 counter.
Read it: Find the binary number for 10 (1010), identify the bits that are 1, connect those to an AND gate, and connect the gate output to reset.
Equations: number of counter states
![]()
| Symbol | Meaning | Unit |
|---|---|---|
| N | number of states of an n-bit binary counter | — |
| n | number of flip-flops (stages) | — |
| NJohnson | number of states of an n-stage Johnson counter | — |
| M | modulus (number of different states counted) | — |
Worked example: a modulo-12 counter
A 4-bit binary counter (Q3 Q2 Q1 Q0) is to count 0 to 11 and then return to 0. State which outputs are connected to the reset gate and the highest number displayed.
Binary 12: 12 = 8 + 4 = 1100, so Q3 = 1 and Q2 = 1 and the others are 0.
Reset logic: An AND gate on Q3 and Q2 goes high when the count reaches 12. Its output is connected to the reset.
Sequence: The counter shows 0, 1, 2 … 11 and returns to 0: the highest number displayed is 11.
Worked example: a Johnson counter
A 5-stage Johnson counter starts at 00000. Write the first six states and state the number of states in its cycle.
States: 00000, 10000, 11000, 11100, 11110, 11111 (the 1s fill from the left), then 01111, 00111, 00011, 00001 and back to 00000
Count: Number of states = 2 × 5 = 10
Comment: Only one bit changes at each clock pulse, which avoids brief false outputs when decoding.

Figure 97. Summary: sequential logic.
Read it: Memory, the three counter types, clock, reset and up/down inputs, and modulo-n counters using reset logic.
Practice question Spec 3.13.5.2 · A modulo-n counter 7 marks
The diagram shows a 3-bit binary counter with outputs Q0, Q1 and Q2 (Q0 is the least significant bit). An AND gate has inputs Q2 and Q0, and its output is connected to the reset input of the counter.

(a) State the sequence of decimal numbers counted by the circuit. [1 mark]
(b) State the modulus of the counter. [1 mark]
(c) State the binary value of Q2 Q1 Q0 at which the counter resets. [1 mark]
(d) Explain how the AND gate makes the counter reset. [2 marks]
(e) State the change to the circuit that would give a modulo-6 counter. [1 mark]
(f) State the smallest number of flip-flops needed to count to a modulus of 6. [1 mark]
Show Mark SchemeHide Mark Scheme
| Part | Answer | Extra information (allow / ignore) | Marks |
|---|---|---|---|
| (a) | 0, 1, 2, 3, 4 (and then back to 0) | allow 0 to 4 | 1 |
| (b) | 5 | 1 | |
| (c) | 101 | allow 5 in decimal if the binary is not given | 1 |
| (d) | the AND output is 1 only when Q2 = 1 and Q0 = 1 (the count is 101) | 1 | |
| this 1 is applied to the reset, which sets all the outputs back to 0 | 1 | ||
| (e) | connect the AND gate to Q2 and Q1 (binary 110) instead of Q2 and Q0 | allow ‘detect 110 (6)’ | 1 |
| (f) | 3 (flip-flops) | 1 |
Examiner’s note
Why the marks: In (a) the counter reaches 5 only for an instant, so 5 is not displayed. In (d) say what the AND gate detects and what its output does.
Key words: binary 101, modulo-5, 0 to 4, AND gate, reset, 110, 3 flip-flops.
Where marks go: (a) 1. (b) 1. (c) 1. (d) detects 1, resets 1. (e) 1. (f) 1.
Practice question Spec 3.13.5.2 · Johnson and BCD counters 7 marks
The table shows the first four states of a 4-stage Johnson counter that starts at 0000. The counter receives a clock pulse for each row.

(a) Write down the next four states. [2 marks]
(b) State the number of different states in one complete cycle. [1 mark]
(c) State one advantage of a Johnson counter compared with a binary counter. [1 mark]
(d) A BCD counter is at 1001. State the state after the next clock pulse. [1 mark]
(e) State the purpose of the clock input and of the reset input of a counter. [2 marks]
Show Mark SchemeHide Mark Scheme
| Part | Answer | Extra information (allow / ignore) | Marks |
|---|---|---|---|
| (a) | 1111, 0111, 0011, 0001 | all four correct 2 marks; two or three correct 1 mark | 2 |
| (b) | 8 | 1 | |
| (c) | only one bit changes at each clock pulse (so decoding is simple and avoids false outputs) | allow ‘easy to decode’ | 1 |
| (d) | 0000 | 1 | |
| (e) | clock: each pulse advances the count by one step | 1 | |
| reset: sets the count back to zero | 1 |
Examiner’s note
Why the marks: In (a) the 1s fill from the left and then empty from the left. In (b) the number of states is 2 × the number of stages. In (e) give a separate statement for each input.
Key words: Johnson, 2n states, one bit changes, BCD resets to 0000, clock, reset.
Where marks go: (a) 2 marks as the scheme. (b) 1. (c) 1. (d) 1. (e) clock 1, reset 1.
Quick-fire
| Topic | Question | Model answer |
|---|---|---|
| Sequential | What is sequential logic? | Logic with memory: output depends on previous state as well. |
| Clock | What does the clock input do? | Each pulse advances the count. |
| Reset | What does reset do? | Sets the count to 0. |
| Up/down | What does the up/down input do? | Selects counting up or counting down. |
| BCD | What does a BCD counter count? | 0 to 9, then back to 0. |
| Johnson | How many states has an n-stage Johnson counter? | 2n. |
| Binary | How many states has an n-bit binary counter? | 2n. |
| Modulo-n | How is a modulo-n counter made? | Reset logic detects n in binary and resets the counter. |