How do logic circuits store a state and generate timing, and how do counters and timers work?
Sequential logic with memory: flip-flops storing a bit, counters dividing and counting pulses, and astable and monostable timing circuits.
An SQA Advanced Higher Engineering Science answer on sequential logic, covering the flip-flop as a one-bit memory, counters that count and divide clock pulses, and astable and monostable timing circuits that generate pulses and delays.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this key area is asking
The SQA wants you to distinguish sequential logic, whose output depends on the sequence of past inputs as well as the present ones, from combinational logic. You must explain the flip-flop as a one-bit memory, how counters built from flip-flops count and divide pulses, and how astable and monostable timing circuits generate continuous pulse trains and single timed pulses.
Memory: the flip-flop
The key difference from combinational logic is state: a flip-flop remembers what it was last told, so the same inputs can give different outputs depending on history. This memory is what lets a circuit count, sequence operations, or latch the result of a momentary event such as a button press.
Counters and frequency division
A counter is a chain of flip-flops in which each stage toggles half as often as the one before. This has two uses at once. As a counter it steps through binary numbers on each clock pulse; as a frequency divider each bit halves the frequency, so the output of an -bit counter has a frequency of .
So a 4-bit counter has 16 states (counting 0 to 15) and divides the clock by 16; an 8-bit counter reaches 255 and divides by 256. Counters that count down, or that reset early to count to a value other than a power of two (a modulo- counter), are built by adding logic to detect the reset value.
Timing: astable and monostable
The timing of both is set by RC components, so the time constant ideas from analogue signal processing reappear here. An astable's frequency and a monostable's pulse length both depend on and , so choosing those values sets the clock rate or the delay.
Examples in context
A digital clock divides a crystal oscillator down to a one-second pulse with a counter chain, then counts seconds, minutes and hours in more counters. A washing-machine programmer steps through wash stages on each clock tick using a sequential controller. A switch debounce uses a monostable so that the contact bounce of a mechanical button produces just one clean pulse. A flashing indicator uses an astable to switch a lamp on and off at a set rate. These show memory and timing working together.
Try this
Q1. State how many states an -bit counter has. [1 mark]
- Cue. states.
Q2. A 6-bit counter is driven by a clock. Find the most significant bit output frequency. [2 marks]
- Cue. .
Q3. State the difference between an astable and a monostable circuit. [2 marks]
- Cue. An astable oscillates continuously (a clock); a monostable gives a single timed pulse when triggered.
Exam-style practice questions
Practice questions written in the style of SQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
SQA AH style3 marksA 4-bit binary counter is driven by a clock. State the maximum count it can reach and calculate the frequency of the most significant bit output.Show worked answer →
A 4-bit counter has states, counting to .
Maximum count: (the count then rolls over to zero).
Each bit halves the frequency of the one below it, so the most significant bit (the fourth) divides the clock by .
Frequency: .
Markers reward the maximum count of , recognising division by , and the output frequency of . Saying the count reaches is the usual slip; it counts to .
SQA AH style4 marksA monostable timer produces a single output pulse when triggered. Its timing components are a resistor and a capacitor, giving a pulse length of about . Calculate the pulse length and state one use of a monostable.Show worked answer →
The monostable pulse length is fixed by the RC timing components.
Relationship: .
Substitution: .
Use: a switch-debounce or a fixed time delay, for example keeping a light on for half a second after a button press.
Markers reward , the value of about with prefixes converted, and a valid use of a one-shot pulse.
Related dot points
- Combinational logic built from logic gates, described by truth tables and Boolean expressions, simplified using Boolean algebra and Karnaugh maps.
An SQA Advanced Higher Engineering Science answer on combinational logic, covering logic gates, truth tables and Boolean expressions, simplification with Boolean algebra and Karnaugh maps, and designing a logic circuit from a specification.
- Programmable control with a microcontroller: inputs and outputs, programs described by flowcharts and pseudocode, and the use of loops, decisions and sub-routines.
An SQA Advanced Higher Engineering Science answer on programmable control, covering the microcontroller and its inputs and outputs, programs described by flowcharts and pseudocode, and the program structures of sequence, selection, iteration and sub-routines.
- The capacitor charge and discharge through a resistor, the time constant, and passive RC filters selecting signals by frequency.
An SQA Advanced Higher Engineering Science answer on analogue signal processing, covering capacitor charge and discharge through a resistor, the RC time constant, and passive low-pass and high-pass RC filters that select signals by frequency.
- The operational amplifier as a high-gain difference amplifier, and the inverting, non-inverting, summing and difference configurations with their closed-loop gain relationships and saturation.
An SQA Advanced Higher Engineering Science answer on operational amplifier circuits, covering the ideal op-amp, open-loop gain and saturation, negative feedback, and the inverting, non-inverting, summing and difference amplifier configurations with their closed-loop gain relationships.
- Control systems described by the system model, the difference between open-loop and closed-loop control, and the role of feedback, the error signal and the components of a closed-loop system.
An SQA Advanced Higher Engineering Science answer on control systems, covering the system model, open-loop versus closed-loop control, negative feedback and the error signal, and the comparator, controller, actuator and sensor of a closed-loop system.