Skip to content
BetterDL

Maximum count

Also called: largest count, highest count, max count

The largest value a counter reaches before wrapping. An n-bit binary counter's maximum count is 2ⁿ − 1, one less than its modulus.

The maximum count is the highest number a counter shows. For a counter that starts at 0 it's always one less than the modulus, because 0 takes up one of the states.

The question often runs the other way: how many flip-flops to count up to M? There are M + 1 states (0 to M), so you need the smallest n with 2ⁿ ≥ M + 1 (see flip flops needed).

The terminal count output marks the maximum count in an up counter, because that's the state just before it wraps.

Worked examples

Example

From flip-flops to maximum count

What is the maximum count of a 6-bit binary up counter?

  1. 1.

    2⁶ = 64 states.

  2. 2.

    They run 0 to 63.

  3. 3.

    Maximum count = 63 = 111111.

Example

From maximum count to flip-flops

A counter must count from 0 up to 200. How many flip-flops?

  1. 1.

    0 to 200 inclusive is 201 states.

  2. 2.

    2⁷ = 128 is too few; 2⁸ = 256 is enough.

  3. 3.

    So 8 flip-flops, with 255 − 200 = 55 codes unused.

Common mistakes

  • Using the maximum count as the number of states. Counting to 200 needs 201 states.

  • Saying an n-bit counter counts to 2ⁿ. It counts to 2ⁿ − 1.

Practice Maximum count

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Maximum count is taught in Counters.