UNIHIVE

Study Hub UNIPORT IFT 211

IFT 211 · Digital Logic Design

Registers and counters

Storing words in registers, shift registers, ripple and synchronous counters, and designing a counter.

Our notes

2 min read

Registers

A register is a group of D flip-flops sharing one clock, storing one word (8, 16, 32 or 64 bits). Processors hold operands, addresses and instructions in registers.

Shift registers

Each flip-flop passes its bit to the next on every clock edge.

  • SISO (serial in, serial out): a delay line.
  • SIPO (serial in, parallel out): turns serial data into a word, as in a UART receiver.
  • PISO (parallel in, serial out): the reverse, for sending.
  • PIPO: load and read all bits at once.

Shifting left multiplies by 2; shifting right divides by 2.

Worked example

A 4-bit SIPO register starts at 0000. The serial input bits 1, 0, 1, 1 arrive on four clocks, each entering on the left. After each clock: 1000, 0100, 1010, 1101.

Ripple (asynchronous) counters

T flip-flops (or JK with J = K = 1) where each flip-flop's output clocks the next. A 4-bit ripple counter counts 0 to 15. Cheap, but each stage adds delay, so outputs settle at different times.

Synchronous counters

All flip-flops share the clock; gates decide which ones toggle. In a binary up counter, a bit toggles when all lower bits are 1: T0 = 1, T1 = Q0, T2 = Q0Q1, T3 = Q0Q1Q2. Faster and free of ripple glitches.

MOD-n counters

A counter with n states. A MOD-10 (decade) counter goes 0 to 9 and resets, used in clocks and frequency counters (74LS90). n flip-flops give up to 2ⁿ states; a MOD-6 needs 3 flip-flops.

Worked example: frequency division

Each flip-flop stage halves the frequency. A 1 MHz clock into a 4-bit ripple counter gives 62.5 kHz at the last output (1,000,000 ÷ 16).

Designing a synchronous counter

  1. Draw the state diagram (for example 0 → 2 → 5 → 7 → 0).
  2. Choose the flip-flop type and write the state table.
  3. Use the excitation table to find each flip-flop's inputs.
  4. Minimise with K-maps (unused states as don't cares) and draw.

Other counters

  • Up/down counters with a direction input.
  • Ring counter: a single 1 circulates (n states from n flip-flops).
  • Johnson counter: the inverted last output feeds the first (2n states).

Exams usually ask

  • Show the contents of a shift register clock by clock.
  • Compare ripple and synchronous counters; design a MOD-n counter.

Common mistake

Giving a MOD-10 counter 10 flip-flops: it needs only 4 (2⁴ = 16 ≥ 10).

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

Practise

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All IFT 211 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.