CS Atlas GATE 2027
Digital Logic course
0 / 57 complete

Digital Logic/Phase 6 · Sequential Circuits

Lesson 6.2.1 · Item 45 of 57

Registers, shift registers, ring and Johnson counters

Read at your own pace. Try the questions before opening the answers.

On this page

0 · Recall Warm-up

Answer from memory first. Answers are in the Answer Vault at the bottom.

1 · The Hook

🎣

A row of D flip-flops sharing one clock can hold a whole number: a register. Connect each flip-flop's input to its neighbour's output and the bits march one place per clock: a shift register, used to turn serial data into parallel and back. Feed the last bit back to the first and the pattern circulates for ever: ring and Johnson counters, which GATE asks about by their state sequences.

2 · Predict First

🤔

A 4-bit shift register (shifting right) holds 1011. A 0 is fed in at the left and the clock ticks once. What does it hold now?

Make a guess in your head. The answer opens Section 3.

3 · Core Concept

💡

Predict First — the answer

0101: every bit moves one place right, the rightmost bit falls out, the new bit enters on the left.

🗣️

In plain words

A register is several flip-flops clocked together. In a shift register, each flip-flop copies its neighbour at each clock edge, so the stored pattern slides along by one place per clock. Closing the loop turns it into a counter that cycles through a fixed set of patterns.

1. Registers and shift registers

  • Register: n D flip-flops with a common clock; loads n bits at once (parallel in, parallel out: PIPO).
  • Shift register: D of each flip-flop = Q of its neighbour. Kinds by how data enters/leaves: SISO, SIPO, PISO, PIPO.
  • An n-bit serial-in register needs n clock pulses to load n bits; with SISO the first bit reaches the serial output after n pulses.
  • Shifting right divides an unsigned value by 2; shifting left multiplies by 2 (Lesson 0.1.3).

2. Ring counter

Output of the last flip-flop fed back to the first. Start with a single 1: 1000 → 0100 → 0010 → 0001 → 1000.

  • n flip-flops → n states (mod-n). Needs to be initialised (all-0 would stay all-0).
  • Each state has one 1: decoding needs no gates.

3. Johnson (twisted-ring) counter

The complement of the last output is fed back. Start at 000: 000 → 100 → 110 → 111 → 011 → 001 → 000 (3 flip-flops).

  • n flip-flops → 2n states. 4 flip-flops: 0000, 1000, 1100, 1110, 1111, 0111, 0011, 0001.
  • Unused states (2ⁿ − 2n) can form a separate cycle (lock-out) unless extra logic corrects them.

4 · Visual

Diagram: Q (ring) or Q' (Johnson) · D Q · FF1 · D Q · FF2 · D Q · FF3 · D Q · FF4

A 4-bit shift register closed into a loop: feed back Q4 for a ring counter (4 states) or Q4' for a Johnson counter (8 states).

5 · Worked Examples

Example 1 Easy

How many states does a 5-flip-flop ring counter have?

Solution

5.

Example 2 Medium

How many states does a 5-flip-flop Johnson counter have?

Solution

2 × 5 = 10.

Example 3 GATE

A 3-bit Johnson counter starts at 000. What is its state after 4 clock pulses?

Solution

000 → 100 → 110 → 111 → 011.

6 · GATE Traps

⚠️

  • Ring: n states; Johnson: 2n states; plain binary: 2ⁿ.
  • A ring counter must start with exactly one 1 (or one 0); all-zeros never changes.
  • Johnson feeds back the complement of the last stage.
  • Serial loading of n bits takes n clocks.

7 · Memory Hook

🧠

"Ring: one 1 goes round, n states. Johnson: twist the feedback, 2n states."

8 · Connect the Dots

Ring and Johnson counters waste most of their 2ⁿ states. The next lesson builds counters that use all 2ⁿ states, the simplest way first: ripple counters, where each flip-flop clocks the next.

9 · Self-Test

GATE format. Try every question before opening the vault.

Q1NAT1 markRing

How many states does a 6-flip-flop ring counter cycle through?

Numerical answer: ________

Q2NAT1 markJohnson

How many states does a 4-flip-flop Johnson counter cycle through?

Numerical answer: ________

Q3MCQ1 markJohnson sequence

A 4-bit Johnson counter starts at 0000. Its state after 5 clock pulses is:

  • (A) 1110
  • (B) 1111
  • (C) 0111
  • (D) 0011

Q4NAT2 marksUnused states

How many of the 16 possible states does a 4-bit Johnson counter never use (in its main cycle)?

Numerical answer: ________

Q5MCQ1 markShift register

A 4-bit right-shift register holds 1011; the serial input is 1 for one clock. New contents?

  • (A) 1101
  • (B) 0110
  • (C) 0101
  • (D) 1011

10 · Rule Card

  • Register: n D flip-flops, common clock. Shift register: D = neighbour's Q; SISO, SIPO, PISO, PIPO; n clocks to load n bits serially.
  • Ring counter: feed back Q of the last stage; n states; must be initialised.
  • Johnson counter: feed back Q' of the last stage; 2n states; 2ⁿ − 2n unused.

11 · Concept Ledger

Unlocked in this lesson. From here on, these terms may be used.

registershift registerSISO, SIPO, PISO and PIPOserial loadingring counterJohnson (twisted-ring) counternumber of states of ring and Johnson countersunused states and lock-out

12 · Answer Vault

Answer Vault

Try the questions first. Open when you are ready to check.

Recall Warm-up

  • t_pd + t_comb + t_su.
  • Q⁺ = D.
  • Neighbours differ in one bit.

Self-Test

Q1 Answer: 61 mark

One per position of the 1.

Re-read: Lesson 6.2.1 — Registers, shift registers, ring and Johnson counters

Q2 Answer: 81 mark

2n.

Re-read: Lesson 6.2.1 — Registers, shift registers, ring and Johnson counters

Q3 Answer: (C)1 mark

0000, 1000, 1100, 1110, 1111, 0111.

  • (A) is wrong: After 3.
  • (B) is wrong: After 4.
  • (D) is wrong: After 6.

Re-read: Lesson 6.2.1 — Registers, shift registers, ring and Johnson counters

Q4 Answer: 82 marks

16 − 8.

Re-read: Lesson 6.2.1 — Registers, shift registers, ring and Johnson counters

Q5 Answer: (A)1 mark

1 enters on the left, everything moves right.

  • (B) is wrong: That is a left shift with 0.
  • (C) is wrong: That is with a 0 entering.
  • (D) is wrong: Unchanged.

Re-read: Lesson 6.2.1 — Registers, shift registers, ring and Johnson counters

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.