wire / wire-format / counter-types
Counters are sequential circuits that count pulses. Types: binary counter (counts 0 to 2^n-1, then wraps), BCD counter (counts 0-9, then resets), Johnson counter (shift register with feedback, 2n states), ring counter (shift register with one 1, n states), up/down counter (can increment or decrement).
aka: Counter circuits (binary, BCD, Johnson, ring)
spec: Digital logic design
Counters are sequential circuits that count pulses. Types: binary counter (counts 0 to 2^n-1, then wraps), BCD counter (counts 0-9, then resets), Johnson counter (shift register with feedback, 2n states), ring counter (shift register with one 1, n states), up/down counter (can increment or decrement).
| field | size | meaning |
|---|---|---|
| Binary counter | n flip-flops | Counts 0, 1, 2, ..., 2^n-1, 0. Uses T flip-flops with carry chain. |
| BCD counter | 4 flip-flops | Counts 0-9, then resets to 0. Detects 1010 and resets. |
| Johnson counter | n flip-flops | Shift register with inverted feedback. Counts 2n states: 000...0, 100...0, 110...0, ..., 111...1, 011...1, ..., 000...1. |
| Ring counter | n flip-flops | Shift register with one 1. Counts n states: 100...0, 010...0, ..., 000...1. |
| Up/down counter | n flip-flops | Counts up or down based on a direction input. Uses adder/subtractor logic. |
| Synchronous counter | n flip-flops | All flip-flops clocked simultaneously. Faster than ripple (asynchronous) counter. |
| Asynchronous (ripple) counter | n flip-flops | Each flip-flop clocks the next. Simpler but slower (carry ripples). |
example:
00 00 00 00
Counter types (placeholder)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/counter-types
or /wire-format/counter-types.json