PhysicsScore

Registers, counters, comparators

  • CSIR NET
  • GATE
  • UP Assistant Professor
  • UP GDC Mains

4 minute read · Updated 2026-11-15

Picking up from

In Combinational and sequential circuits, flip-flops, timers, we saw that combinational circuits depend on current inputs, while sequential circuits add stored state and timing-dependent transitions. How can several stored bits implement words, sequences and comparisons?

In one line

Registers store bit groups, counters generate state sequences, and comparators test relations without necessarily retaining state.

The idea, explained

A register groups storage elements so a word can be loaded, shifted or held under control. A counter is a sequential network whose states follow a specified count sequence. A binary counter need not visit every possible state if it is designed modulo a smaller number. Reset and recovery from unused states are therefore part of its behavior.

Ripple counters let one stage’s output clock another, producing cumulative delay and temporary intermediate states. Synchronous counters update storage from one common clock, reducing some timing hazards but still requiring combinational logic and valid setup or hold timing. A digital magnitude comparator is instead a combinational function comparing coded words, while an analog voltage comparator switches according to an input difference. Their shared name should not hide different input representations or the possibility of noise-induced chatter near an analog threshold.

Core ideas

  • A shift register’s direction and bit order are conventions. A left shift is not automatically a signed arithmetic operation unless fill and overflow behavior are specified.
  • The minimum number of binary storage bits for a modulo count does not by itself define reset logic or transitions out of unused states.
  • Ripple-counter outputs are not simultaneous during a transition. Decoding them without timing control can create spurious pulses.
  • A synchronous counter avoids stage-to-stage clock ripple but still has propagation delay and finite fan-out limits.
  • An analog comparator may use hysteresis to establish separate switching thresholds. An ideal zero-threshold difference test does not model noisy high-frequency switching completely.

Key formulas

Storage width for modulo counting

n=⌈log⁡2M⌉n=\lceil\log_2M\rceil

The counter requires at least nn binary storage bits for MM distinct states, with transition logic still to be specified.

Unsigned word comparison

A>B⟺the first differing most-significant bit is (1,0)A>B\quad\Longleftrightarrow\quad\text{the first differing most-significant bit is }(1,0)

The rule assumes equal-width unsigned binary words; signed code comparisons need their own convention.

Draw the stored-word format and specify loading, shifting and reset events. For a counter, list the complete intended state sequence and all unused states before minimizing next-state logic. Check whether decoded outputs are required during or only after transitions. For comparators, identify analog versus digital input and signed versus unsigned coding. Do not infer glitch-free outputs from a correct static truth table; propagation and clocking determine when the coded state is valid to observe.

Quick worked example

A modulo-ten counter needs four bits because three bits represent only eight states. The remaining six four-bit patterns are unused by the intended cycle. The design must still state how reset and invalid-state recovery handle those patterns.

Where this leads

Continue to A/D and D/A converters, because converters connect those discrete words to continuous physical signals.

Related: Combinational and sequential circuits, flip-flops, timers — prerequisite definitions used in this model.

Practice this topic

Practice this topic

16 questions in Assistant Professor · Physics · Physics. Sign in and practice access may be required.

Other exam sections