Computer Science I / Flip-Flops and Registers
Practice question · Put in order

A two-bit counter holds 00 and increments on every clock edge, wrapping after its largest value. Order the values it holds after the next four edges.

Hints
  1. Add one in binary each time, and remember the register is only two bits wide.
  2. After the largest two-bit value the next increment cannot grow, so it must wrap.
Show the answer
  1. 01
  2. 10
  3. 11
  4. 00
Why

00 becomes 01, then 10, then 11, then wraps to 00 after four edges, a two-bit counter has a period of four. Expecting 100 after 11 is the fixed-width slip; the carry out of the top bit has nowhere to go and is discarded.

Read the lesson: Flip-Flops and Registers →

Practise Flip-Flops and Registers

The app has 7 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Flip-Flops and Registers