deckle studioOpen in the editor

4-bit counter (Verilog)

Binary counter in Verilog, 4 LEDs.

  • Verilog
Open in the simulatorNo account needed: press Simulate and it runs.
Schematic of 4-bit counter (Verilog)
Schematic

How it works

Synchronous binary counter in real Verilog (Yosys → gates), 2 Hz clock: the LEDs count 0…15, the blue one shows the carry. On the first start the browser loads Yosys (~16 MB).

Wiring

Each line is one connection (net) and the pins it joins.

NetPins
GNDD1 KD2 KD3 KD4 KD5 KU1 GNDU1 RSTV1 −V2 −
VCCU1 VCCU1 ENV1 +
D1
LED
D2
LED
D3
LED
D4
LED
D5
LED

Parts

More examples: Logic and home-made CPUs