Binary counter (source code)

= Binary counter

A counter stores a <binary representation> of a state, usually advancing by one increment or decrement modulo $2^n$ when it has $n$ <bits>.