<s>
A	O
ring	O
counter	O
is	O
a	O
type	O
of	O
counter	O
composed	O
of	O
flip-flops	B-General_Concept
connected	O
into	O
a	O
shift	B-General_Concept
register	I-General_Concept
,	O
with	O
the	O
output	O
of	O
the	O
last	O
flip-flop	B-General_Concept
fed	O
to	O
the	O
input	O
of	O
the	O
first	O
,	O
making	O
a	O
"	O
circular	O
"	O
or	O
"	O
ring	O
"	O
structure	O
.	O
</s>
<s>
A	O
straight	O
ring	O
counter	O
,	O
also	O
known	O
as	O
a	O
one-hot	O
counter	O
,	O
connects	O
the	O
output	O
of	O
the	O
last	O
shift	B-General_Concept
register	I-General_Concept
to	O
the	O
first	O
shift	B-General_Concept
register	I-General_Concept
input	O
and	O
circulates	O
a	O
single	O
one	O
(	O
or	O
zero	O
)	O
bit	O
around	O
the	O
ring	O
.	O
</s>
<s>
A	O
twisted	O
ring	O
counter	O
,	O
also	O
called	O
switch-tail	O
ring	O
counter	O
,	O
walking	B-General_Concept
ring	I-General_Concept
counter	I-General_Concept
,	O
Johnson	O
counter	O
,	O
or	O
Möbius	O
counter	O
,	O
connects	O
the	O
complement	O
of	O
the	O
output	O
of	O
the	O
last	O
shift	B-General_Concept
register	I-General_Concept
to	O
the	O
input	O
of	O
the	O
first	O
register	O
and	O
circulates	O
a	O
stream	O
of	O
ones	O
followed	O
by	O
zeros	O
around	O
the	O
ring	O
.	O
</s>
<s>
ASIC	O
and	O
FPGA	B-Architecture
design	O
)	O
to	O
create	O
finite-state	B-Architecture
machines	I-Architecture
.	O
</s>
<s>
A	O
general	O
disadvantage	O
of	O
ring	O
counters	O
is	O
that	O
they	O
are	O
lower	O
density	O
codes	O
than	O
normal	O
binary	B-Algorithm
encodings	I-Algorithm
of	O
state	O
numbers	O
.	O
</s>
<s>
Johnson	O
counters	O
are	O
sometimes	O
favored	O
,	O
because	O
they	O
offer	O
twice	O
as	O
many	O
count	O
states	O
from	O
the	O
same	O
number	O
of	O
shift	B-General_Concept
registers	I-General_Concept
,	O
and	O
because	O
they	O
are	O
able	O
to	O
self-initialize	O
from	O
the	O
all-zeros	O
state	O
,	O
without	O
requiring	O
the	O
first	O
count	O
bit	O
to	O
be	O
injected	O
externally	O
at	O
start-up	O
.	O
</s>
<s>
The	O
Johnson	O
counter	O
generates	O
a	O
code	O
in	O
which	O
adjacent	O
states	O
differ	O
by	O
only	O
one	O
bit	O
(	O
that	O
is	O
,	O
have	O
a	O
Hamming	O
distance	O
of	O
1	O
)	O
,	O
as	O
in	O
a	O
Gray	B-Device
code	I-Device
,	O
which	O
can	O
be	O
useful	O
if	O
the	O
bit	O
pattern	O
is	O
going	O
to	O
be	O
asynchronously	O
sampled	O
.	O
</s>
<s>
Sometimes	O
bidirectional	O
shift	B-General_Concept
registers	I-General_Concept
are	O
used	O
(	O
using	O
multiplexors	O
to	O
take	O
the	O
input	O
for	O
each	O
flip-flop	B-General_Concept
from	O
its	O
left	O
or	O
right	O
neighbor	O
)	O
,	O
so	O
that	O
bidirectional	O
or	O
up	O
–	O
down	O
ring	O
counters	O
can	O
be	O
made	O
.	O
</s>
<s>
Note	O
the	O
small	O
bubble	O
indicating	O
inversion	O
of	O
the	O
Q	O
signal	O
from	O
the	O
last	O
shift	B-General_Concept
register	I-General_Concept
before	O
feeding	O
back	O
to	O
the	O
first	O
D	O
input	O
,	O
making	O
this	O
a	O
Johnson	O
counter	O
.	O
</s>
<s>
Early	O
ring	O
counters	O
used	O
only	O
one	O
active	O
element	O
(	O
vacuum	O
tube	O
,	O
valve	O
,	O
or	O
transistor	O
)	O
per	O
stage	O
,	O
relying	O
on	O
global	O
feedback	O
rather	O
than	O
local	O
bistable	B-General_Concept
flip-flops	I-General_Concept
,	O
to	O
suppress	O
states	O
other	O
than	O
the	O
one-hot	O
states	O
,	O
for	O
example	O
in	O
the	O
1941	O
patent	O
filing	O
of	O
Robert	O
E	O
.	O
Mumma	O
of	O
the	O
National	O
Cash	O
Registor	O
Company	O
.	O
</s>
<s>
The	O
ENIAC	B-Device
used	O
decimal	O
arithmetic	O
based	O
on	O
10-state	O
one-hot	O
ring	O
counters	O
.	O
</s>
<s>
The	O
works	O
of	O
Mumma	O
at	O
NCR	O
and	O
Overbeck	O
at	O
MIT	O
were	O
among	O
the	O
prior	O
art	O
works	O
examined	O
by	O
the	O
patent	O
office	O
in	O
invalidated	O
the	O
patents	O
of	O
J	O
.	O
Presper	O
Eckert	O
and	O
John	O
Mauchly	O
for	O
the	O
ENIAC	B-Device
technology	O
.	O
</s>
<s>
By	O
the	O
1950s	O
,	O
ring	O
counters	O
with	O
a	O
two-tube	O
or	O
twin-triode	O
flip-flop	B-General_Concept
per	O
stage	O
were	O
appearing	O
.	O
</s>
<s>
Robert	O
Royce	O
Johnson	O
developed	O
a	O
number	O
of	O
different	O
shift-register-based	O
counters	O
with	O
the	O
aim	O
of	O
making	O
different	O
numbers	O
of	O
states	O
with	O
the	O
simplest	O
possible	O
feedback	O
logic	O
,	O
and	O
filed	O
for	O
a	O
patent	O
in	O
1953	O
.	O
</s>
<s>
in	O
the	O
Heath	O
Robinson	O
codebreaking	O
machine	O
and	O
the	O
Colossus	B-Device
computer	I-Device
)	O
,	O
and	O
as	O
accumulator	O
counter	O
elements	O
for	O
decimal	O
arithmetic	O
in	O
computers	O
and	O
calculators	O
,	O
using	O
either	O
bi-quinary	B-Algorithm
(	O
as	O
in	O
the	O
Colossus	B-Device
)	O
or	O
ten-state	O
one-hot	O
(	O
as	O
in	O
the	O
ENIAC	B-Device
)	O
representations	O
.	O
</s>
<s>
Besides	O
being	O
an	O
efficient	O
alternative	O
way	O
to	O
generate	O
one-hot	O
codes	O
and	O
frequency	O
pre-scalers	O
,	O
a	O
Johnson	O
counter	O
is	O
also	O
a	O
simple	O
way	O
to	O
encode	O
a	O
cycle	O
of	O
an	O
even	O
number	O
of	O
states	O
that	O
can	O
be	O
asynchronously	O
sampled	O
without	O
glitching	O
,	O
since	O
only	O
one	O
bit	O
changes	O
at	O
a	O
time	O
,	O
as	O
in	O
a	O
Gray	B-Device
code	I-Device
.	O
</s>
<s>
Early	O
computer	B-Device
mice	I-Device
used	O
up	O
–	O
down	O
(	O
bidirectional	O
)	O
2-bit	O
Johnson	O
or	O
Gray	O
encodings	O
to	O
indicate	O
motion	O
in	O
each	O
of	O
the	O
two	O
dimensions	O
,	O
though	O
in	O
mice	O
those	O
codes	O
were	O
not	O
usually	O
generated	O
by	O
rings	O
of	O
flip-flops	B-General_Concept
(	O
but	O
instead	O
by	O
electro-mechanical	O
or	O
optical	O
quadrature	O
encoders	O
)	O
.	O
</s>
<s>
A	O
2-bit	O
Johnson	O
code	O
and	O
a	O
2-bit	O
Gray	B-Device
code	I-Device
are	O
identical	O
,	O
while	O
for	O
3	O
or	O
more	O
bits	O
Gray	O
and	O
Johnson	O
codes	O
are	O
different	O
.	O
</s>
<s>
A	O
walking	B-General_Concept
ring	I-General_Concept
counter	I-General_Concept
,	O
also	O
called	O
a	O
Johnson	O
counter	O
,	O
and	O
a	O
few	O
resistors	O
can	O
produce	O
a	O
glitch-free	O
approximation	O
of	O
a	O
sine	O
wave	O
.	O
</s>
<s>
used	O
in	O
dual-tone	O
multi-frequency	O
signaling	O
and	O
early	O
modem	B-Application
tones	O
.	O
</s>
