Menu

Theme

Component reference · Reference · CHECKED ON 5.0.0

The Logisim counter: count to any number, up or down

To count from 0 to 9 and back to 0, set the Counter's Data Bits to 4, Maximum Value to 0x9 and Action On Overflow to Wrap around. The counter advances by one on each rising clock edge. The Carry output is 1 while the value equals the maximum. In our test the Up Down input left unconnected counted up, and an unconnected count enable counted.
FOR
Students making mod-N and up/down counters
CHECKED
11 Nov 2026
Checked against Logisim-evolution 5.0.0 on 1 machines
On this page

Make a mod-N counter

Place a Counter from the Memory library. Set Data Bits to enough bits for N minus 1, Maximum Value to N minus 1 in hex, and Action On Overflow to Wrap around. Connect a clock and an output pin.

For N = 60: Data Bits 6, Maximum Value 0x3B.

circ-counter-mod-10 · mainscroll to see all
4CLKclkCounterclkq4bQqcyCcy
A mod-10 counter: Data Bits 4, Maximum Value 0x9. It counted 0 to 9 and wrapped for 12 clock cycles in 5.0.0, with Carry 1 at 9. CC BY 4.0 · SHA-256 1c4e74ae75b4
Describe this circuit

Components: Input pin CLK; Counter 1; Output pin Q; Output pin C.

  • Input pin CLK connects to Counter 1 (net CLK, clk).
  • Counter 1 connects to Output pin Q (net q, Q), 4 bits wide.
  • Counter 1 connects to Output pin C (net cy, C).

Download circ-counter-mod-10.circ.

What happens at the maximum: Action On Overflow

The four options on the same 12 ticks, as binary values of the 3-bit counter (lab runs).
#TickWrap aroundStay at valueContinue countingLoad next value
0000000000000
1001001001001
2010010010010
3011011011011
4100100100100
5101101101101
6000101110010
7001101111011
8010101000100
9011101001101
10100101010010
11101101011011
12000101100100

Counting down with Wrap around, the counter went 0 to 5 (F43). The Carry is 1 while the value is 0 when counting down.

The control pins

Counter ports (8 bits) with the tooltips 5.0.0 shows (F44).
OutputoutOutput: current value of counter
DatainData: value to load into counter
ClockinClock: value may update on trigger
ClearinClear: when 1, resets to 0 asynchronously
LoadinLoad: when 1, loads from data input
Up DowninUp Down: when 1, counter increments, when 0, counter decrements
EnableinEnable: when 1, counter increments or decrements
CarryoutCarry: is 1 when value reaches maximum (minimum if decrementing)

In our runs, an Up Down input left unconnected counted up and an unconnected count enable counted (the units counter in the cascade below has no enable wire). We did not test Load or Clear.

Up/down counting

circ-counter-up-down · mainscroll to see all
4CLKclkUDudCounterclkudq4bQq
Up Down driven by a pin. With the pin at 0 the mod-10 counter counted 9, 8, ... 0, 9. All 25 steps matched. CC BY 4.0 · SHA-256 3e60dd911294
Describe this circuit

Components: Input pin CLK; Input pin UD; Counter 1; Output pin Q.

  • Input pin CLK connects to Counter 1 (net CLK, clk).
  • Input pin UD connects to Counter 1 (net UD, ud).
  • Counter 1 connects to Output pin Q (net q, Q), 4 bits wide.

Download circ-counter-up-down.circ.

Cascading counters for more digits

Use two counters: units with maximum 9 and tens with maximum 5. Connect the units Carry to the tens count enable and give both the same clock. Do not feed the carry into the clock.

circ-counter-cascade-00-59 · mainscroll to see all
44CLKclkCounterunitsclkCountertensclkcucuut4bUu4bTt
Units and tens counters sharing a clock. 62 clock cycles matched 00 to 59 and the wrap back to 00 in 5.0.0. CC BY 4.0 · SHA-256 296f077e07f5
Describe this circuit

Components: Input pin CLK; Counter units; Counter tens; Output pin U; Output pin T.

  • Input pin CLK connects to Counter units, Counter tens (net CLK, clk).
  • Counter units connects to Output pin U (net u, U), 4 bits wide.
  • Counter units connects to Counter tens (net cu).
  • Counter tens connects to Output pin T (net t, T), 4 bits wide.

Download circ-counter-cascade-00-59.circ. For the full clock see Digital clock.

Why the counter adds 2, skips, or resets by itself

We have not reproduced these, so we only list what to check: that the clock reaches the counter once per step (not through a gate), that nothing feeds the carry back into the clock, that you press Ctrl+F9 for a full cycle (Clock and simulation), and that Clear is not wired to a floating or glitching signal.

Counters from flip-flops

For labs that require it, build a counter from flip-flops; we have not published a tested version yet. TTL counters are on TTL 7400 series.

Counter in older versions and course handouts

Feature2.7.15.0.0
Action On Overflow options2.7.1: untested5.0.0: yeswrap, stay, continue, load (F43)
Appearance2.7.1: untested5.0.0: yesa large block with labelled pins
Ports at 8 bits2.7.1: untested5.0.0: yes8 ports

Cells say untested where we did not run 2.7.1. See also all components.

Frequently asked questions

How do I make a mod-10 counter in Logisim?

Data Bits 4, Maximum Value 0x9, Action On Overflow Wrap around. Our circuit counted 0 to 9 and back to 0 for 12 cycles, with Carry 1 at 9.

What does Action On Overflow do?

It decides what happens after the maximum. In our 3-bit run with maximum 5: wrap went 0 to 5 then 0; stay stopped at 5; continue ran 0 to 7 then 0; load jumped to the Data input (F43).

How do I make the counter count down?

Drive the Up Down input with 0. Our mod-10 counter then counted 9, 8 and so on down to 0 and back to 9.

Why does my counter add 2 at a time?

Usually it sees two clock edges per step, for example a clock passed through a gate, or half-cycle ticks. We did not reproduce this ourselves.

How do I count 00 to 59?

Use two counters: units with maximum 9 and tens with maximum 5. Connect the units Carry to the tens count enable and give both the same clock. Our circuit counted 00 to 59 and wrapped.

Sources

  1. Counter tests on Logisim-evolution 5.0.0, logisim.dev lab data: test-data/lab2-2026-11-09-components/counter-modes/, src/content/circuits/circ-counter-*

Try: , , ,