MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › How a binary counter works and how to read its state table
HomeModels
Table of contents

On this page

Electrical & Electronic Basics (600 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

How a binary counter works and how to read its state table

A binary counter is flip-flops chained into a 2^n state cycle. This page explains how states advance, how carries propagate and how to read the state table that proves the circuit.

1. How it works

An n-bit binary up counter is n toggle flip-flops. The lowest bit toggles on every clock; a higher bit toggles only when the bit below it falls from 1 to 0, that is, a stage advances when all lower bits are 1 and a clock arrives. The ripple build clocks each stage from the Qbar of the one below; the synchronous build forms each toggle condition with AND gates on the lower bits.

2. Numbers and practice

Reading the state table: for 3 bits the states run 000 to 111, eight states, incrementing once per clock, and after 111 the next clock rolls over to 000 with an overflow. The table lists present state, clock and next state, and it is the reference that proves the wiring. Note that bit k flips exactly when the count passes 2^k minus 1 to 2^k, which marks the divide points.

3. Pitfalls and fixes

Overflow and expansion: n bits count to 2^n minus 1, and one more clock rolls over to 0 while producing a carry pulse for the next counter. In a ripple chain the overflow edge, the fall of the top Qbar, clocks the next chip, which is how multi-chip counters are stitched. The synchronous version passes an inter-chip carry with every chip on the same clock for speed.

4. 3-bit binary counter state table excerpt

Present Q2Q1Q0ClockNext state
000↑001
001↑010
010↑011
011↑100
100↑101
111↑000

5. Notes

The state table is the gold standard for verifying a counter; after soldering, capture a few beats with a logic analyzer and compare. Feed the overflow edge to the next stage for cascading.

6. References

The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Binary coding in counters per GB/T 4728 and IEC 60617 symbols. Always check the device datasheet and the product design file for ratings and derating.

7. Cautions

⚠️ Three common pitfalls:
① Carry edge wired on the wrong transition:high bits toggle at the wrong moment and the count misplaces
② Trusting the wiring without checking the state table:one stage never toggles and codes go missing
③ Overflow left unhandled:the counter sticks at full scale instead of rolling to zero

Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL