<s>
In	O
mathematical	O
logic	O
and	O
theoretical	O
computer	O
science	O
a	O
register	B-Application
machine	I-Application
is	O
a	O
generic	O
class	O
of	O
abstract	B-Application
machines	I-Application
used	O
in	O
a	O
manner	O
similar	O
to	O
a	O
Turing	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
All	O
the	O
models	O
are	O
Turing	B-Algorithm
equivalent	I-Algorithm
.	O
</s>
<s>
The	O
register	B-Application
machine	I-Application
gets	O
its	O
name	O
from	O
its	O
use	O
of	O
one	O
or	O
more	O
"	O
registers	B-General_Concept
"	O
.	O
</s>
<s>
In	O
contrast	O
to	O
the	O
tape	O
and	O
head	O
used	O
by	O
a	O
Turing	B-Architecture
machine	I-Architecture
,	O
the	O
model	O
uses	O
multiple	O
,	O
uniquely	O
addressed	O
registers	B-General_Concept
,	O
each	O
of	O
which	O
holds	O
a	O
single	O
positive	O
integer	O
.	O
</s>
<s>
Counter	B-Application
machine	I-Application
–	O
the	O
most	O
primitive	O
and	O
reduced	O
theoretical	O
model	O
of	O
a	O
computer	O
hardware	O
.	O
</s>
<s>
Instructions	O
are	O
in	O
the	O
finite	O
state	O
machine	O
in	O
the	O
manner	O
of	O
the	O
Harvard	B-Architecture
architecture	I-Architecture
.	O
</s>
<s>
Pointer	B-Application
machine	I-Application
–	O
a	O
blend	O
of	O
counter	B-Application
machine	I-Application
and	O
RAM	B-Application
models	I-Application
.	O
</s>
<s>
Instructions	O
are	O
in	O
the	O
finite	O
state	O
machine	O
in	O
the	O
manner	O
of	O
the	O
Harvard	B-Architecture
architecture	I-Architecture
.	O
</s>
<s>
Random-access	B-Application
machine	I-Application
(	O
RAM	O
)	O
–	O
a	O
counter	B-Application
machine	I-Application
with	O
indirect	O
addressing	O
and	O
,	O
usually	O
,	O
an	O
augmented	O
instruction	O
set	O
.	O
</s>
<s>
Instructions	O
are	O
in	O
the	O
finite	O
state	O
machine	O
in	O
the	O
manner	O
of	O
the	O
Harvard	B-Architecture
architecture	I-Architecture
.	O
</s>
<s>
Random-access	B-Application
stored-program	I-Application
machine	I-Application
model	O
(	O
RASP	O
)	O
–	O
a	O
RAM	O
with	O
instructions	O
in	O
its	O
registers	B-General_Concept
analogous	O
to	O
the	O
Universal	O
Turing	B-Architecture
machine	I-Architecture
;	O
thus	O
it	O
is	O
an	O
example	O
of	O
the	O
von	B-Architecture
Neumann	I-Architecture
architecture	I-Architecture
.	O
</s>
<s>
But	O
unlike	O
a	O
computer	O
,	O
the	O
model	O
is	O
idealized	O
with	O
effectively	O
infinite	O
registers	B-General_Concept
(	O
and	O
if	O
used	O
,	O
effectively	O
infinite	O
special	O
registers	B-General_Concept
such	O
as	O
an	O
accumulator	O
)	O
.	O
</s>
<s>
Any	O
properly	O
defined	O
register	B-Application
machine	I-Application
model	O
is	O
Turing	B-Algorithm
equivalent	I-Algorithm
.	O
</s>
<s>
In	O
practical	O
computer	O
science	O
,	O
a	O
similar	O
concept	O
known	O
as	O
a	O
virtual	B-Architecture
machine	I-Architecture
is	O
sometimes	O
used	O
to	O
minimise	O
dependencies	O
on	O
underlying	O
machine	O
architectures	O
.	O
</s>
<s>
The	O
term	O
"	O
register	B-Application
machine	I-Application
"	O
is	O
sometimes	O
used	O
to	O
refer	O
to	O
a	O
virtual	B-Architecture
machine	I-Architecture
in	O
textbooks	O
.	O
</s>
<s>
A	O
register	B-Application
machine	I-Application
consists	O
of	O
:	O
</s>
<s>
An	O
unbounded	O
number	O
of	O
labeled	O
,	O
discrete	O
,	O
unbounded	O
registers	B-General_Concept
unbounded	O
in	O
extent	O
(	O
capacity	O
)	O
:	O
a	O
finite	O
(	O
or	O
infinite	O
in	O
some	O
models	O
)	O
set	O
of	O
registers	B-General_Concept
each	O
considered	O
to	O
be	O
of	O
infinite	O
extent	O
and	O
each	O
of	O
which	O
holds	O
a	O
single	O
non-negative	O
integer	O
(	O
0	O
,	O
1	O
,	O
2	O
,	O
...	O
)	O
.	O
</s>
<s>
The	O
registers	B-General_Concept
may	O
do	O
their	O
own	O
arithmetic	O
,	O
or	O
there	O
may	O
be	O
one	O
or	O
more	O
special	O
registers	B-General_Concept
that	O
do	O
the	O
arithmetic	O
e.g.	O
</s>
<s>
an	O
"	O
accumulator	O
"	O
and/or	O
"	O
address	B-General_Concept
register	I-General_Concept
"	O
.	O
</s>
<s>
See	O
also	O
Random-access	B-Application
machine	I-Application
.	O
</s>
<s>
In	O
the	O
most-reduced	O
counter	B-Application
machine	I-Application
model	O
,	O
per	O
each	O
arithmetic	O
operation	O
only	O
one	O
object/mark	O
is	O
either	O
added	O
to	O
or	O
removed	O
from	O
its	O
location/tape	O
.	O
</s>
<s>
In	O
some	O
counter	B-Application
machine	I-Application
models	I-Application
(	O
e.g.	O
</s>
<s>
Melzak	O
(	O
1961	O
)	O
,	O
Minsky	O
(	O
1961	O
)	O
)	O
and	O
most	O
RAM	O
and	O
RASP	B-Application
models	I-Application
more	O
than	O
one	O
object/mark	O
can	O
be	O
added	O
or	O
removed	O
in	O
one	O
operation	O
with	O
"	O
addition	O
"	O
and	O
usually	O
"	O
subtraction	O
"	O
;	O
sometimes	O
with	O
"	O
multiplication	O
"	O
and/or	O
"	O
division	O
"	O
.	O
</s>
<s>
The	O
instructions	O
are	O
drawn	O
from	O
the	O
two	O
classes	O
to	O
form	O
"	O
instruction-sets	O
"	O
,	O
such	O
that	O
an	O
instruction	O
set	O
must	O
allow	O
the	O
model	O
to	O
be	O
Turing	B-Algorithm
equivalent	I-Algorithm
(	O
it	O
must	O
be	O
able	O
to	O
compute	O
any	O
partial	O
recursive	O
function	O
)	O
.	O
</s>
<s>
Arithmetic	O
:	O
arithmetic	O
instructions	O
may	O
operate	O
on	O
all	O
registers	B-General_Concept
or	O
on	O
just	O
a	O
special	O
register	O
(	O
e.g.	O
</s>
<s>
State	O
register	O
:	O
A	O
special	O
Instruction	O
Register	O
"	O
IR	O
"	O
,	O
finite	O
and	O
separate	O
from	O
the	O
registers	B-General_Concept
above	O
,	O
stores	O
the	O
current	O
instruction	O
to	O
be	O
executed	O
and	O
its	O
address	O
in	O
the	O
TABLE	O
of	O
instructions	O
;	O
this	O
register	O
and	O
its	O
TABLE	O
is	O
located	O
in	O
the	O
finite	O
state	O
machine	O
.	O
</s>
<s>
Thus	O
a	O
RASP	O
has	O
two	O
"	O
instruction/program	O
"	O
registers	B-General_Concept
—	O
( i	O
)	O
the	O
IR	O
(	O
finite	O
state	O
machine	O
's	O
Instruction	O
Register	O
)	O
,	O
and	O
(	O
ii	O
)	O
a	O
PC	O
(	O
Program	O
Counter	O
)	O
for	O
the	O
program	O
located	O
in	O
the	O
registers	B-General_Concept
.	O
</s>
<s>
In	O
the	O
case	O
of	O
the	O
counter	B-Application
machine	I-Application
,	O
random-access	B-Application
machine	I-Application
(	O
RAM	O
)	O
and	O
pointer	B-Application
machine	I-Application
the	O
instruction	O
store	O
is	O
in	O
the	O
"	O
TABLE	O
"	O
of	O
the	O
finite	O
state	O
machine	O
;	O
thus	O
these	O
models	O
are	O
example	O
of	O
the	O
Harvard	B-Architecture
architecture	I-Architecture
.	O
</s>
<s>
In	O
the	O
case	O
of	O
the	O
RASP	O
the	O
program	O
store	O
is	O
in	O
the	O
registers	B-General_Concept
;	O
thus	O
this	O
is	O
an	O
example	O
of	O
the	O
von	B-Architecture
Neumann	I-Architecture
architecture	I-Architecture
.	O
</s>
<s>
See	O
also	O
Random-access	B-Application
machine	I-Application
and	O
Random-access	O
stored-program	O
machine.Usually	O
,	O
like	O
computer	B-Application
programs	I-Application
,	O
the	O
instructions	O
are	O
listed	O
in	O
sequential	O
order	O
;	O
unless	O
a	O
jump	O
is	O
successful	O
the	O
default	O
sequence	O
continues	O
in	O
numerical	O
order	O
.	O
</s>
<s>
An	O
exception	O
to	O
this	O
is	O
the	O
abacus	O
(	O
Lambek	O
(	O
1961	O
)	O
,	O
Minsky	O
(	O
1961	O
)	O
)	O
counter	B-Application
machine	I-Application
models	I-Application
—	O
every	O
instruction	O
has	O
at	O
least	O
one	O
"	O
next	O
"	O
instruction	O
identifier	O
"	O
z	O
"	O
,	O
and	O
the	O
conditional	O
branch	O
has	O
two	O
.	O
</s>
<s>
Two	O
trends	O
appeared	O
in	O
the	O
early	O
1950s	O
—	O
the	O
first	O
to	O
characterize	O
the	O
computer	O
as	O
a	O
Turing	B-Architecture
machine	I-Architecture
,	O
the	O
second	O
to	O
define	O
computer-like	O
models	O
—	O
models	O
with	O
sequential	O
instruction	O
sequences	O
and	O
conditional	O
jumps	O
—	O
with	O
the	O
power	O
of	O
a	O
Turing	B-Architecture
machine	I-Architecture
,	O
i.e.	O
</s>
<s>
"	O
Register	B-Application
machines	I-Application
[	O
some	O
authors	O
use	O
"	O
register	B-Application
machine	I-Application
"	O
synonymous	O
with	O
"	O
counter-machine	O
"	O
]	O
are	O
particularly	O
suitable	O
for	O
constructing	O
Diophantine	O
equations	O
.	O
</s>
<s>
Wang	O
's	O
work	O
followed	O
from	O
Emil	O
Post	O
's	O
(	O
1936	O
)	O
paper	O
and	O
led	O
Wang	O
to	O
his	O
definition	O
of	O
his	O
Wang	O
B-machine	O
—	O
a	O
two-symbol	O
Post	B-Application
–	I-Application
Turing	I-Application
machine	I-Application
computation	O
model	O
with	O
only	O
four	O
atomic	O
instructions	O
:	O
</s>
<s>
Wang	O
expressed	O
hope	O
that	O
his	O
model	O
would	O
be	O
"	O
a	O
rapprochement	O
"	O
(	O
p.63	O
)	O
between	O
the	O
theory	O
of	O
Turing	B-Architecture
machines	I-Architecture
and	O
the	O
practical	O
world	O
of	O
the	O
computer	O
.	O
</s>
<s>
Martin	O
Davis	O
eventually	O
evolved	O
this	O
model	O
into	O
the	O
(	O
2-symbol	O
)	O
Post	B-Application
–	I-Application
Turing	I-Application
machine	I-Application
.	O
</s>
<s>
Except	O
there	O
was	O
a	O
problem	O
:	O
the	O
Wang	O
model	O
(	O
the	O
six	O
instructions	O
of	O
the	O
7-instruction	O
Post	B-Application
–	I-Application
Turing	I-Application
machine	I-Application
)	O
was	O
still	O
a	O
single-tape	O
Turing-like	O
device	O
,	O
however	O
nice	O
its	O
sequential	O
program	O
instruction-flow	O
might	O
be	O
.	O
</s>
<s>
"	O
a	O
...	O
Turing	B-Architecture
machine	I-Architecture
has	O
a	O
certain	O
opacity	O
...	O
a	O
Turing	B-Architecture
machine	I-Architecture
is	O
slow	O
in	O
(	O
hypothetical	O
)	O
operation	O
and	O
,	O
usually	O
,	O
complicated	O
.	O
</s>
<s>
"	O
although	O
...	O
not	O
difficult	O
...	O
proofs	O
are	O
complicated	O
and	O
tedious	O
to	O
follow	O
for	O
two	O
reasons	O
:	O
(	O
1	O
)	O
A	O
Turing	B-Architecture
machine	I-Architecture
has	O
only	O
head	O
so	O
that	O
one	O
is	O
obliged	O
to	O
break	O
down	O
the	O
computation	O
into	O
very	O
small	O
steps	O
of	O
operations	O
on	O
a	O
single	O
digit	O
.	O
</s>
<s>
Indeed	O
,	O
as	O
examples	O
at	O
Turing	B-Architecture
machine	I-Architecture
examples	O
,	O
Post	B-Application
–	I-Application
Turing	I-Application
machine	I-Application
and	O
partial	B-Algorithm
function	I-Algorithm
show	O
,	O
the	O
work	O
can	O
be	O
"	O
complicated	O
"	O
.	O
</s>
<s>
We	O
just	O
have	O
to	O
be	O
careful	O
to	O
write	O
our	O
instructions	O
so	O
that	O
a	O
test-for-zero	O
and	O
jump	O
occurs	O
before	O
we	O
decrement	O
otherwise	O
our	O
machine	O
will	O
"	O
fall	O
off	O
the	O
end	O
"	O
or	O
"	O
bump	O
against	O
the	O
end	O
"	O
—	O
we	O
will	O
have	O
an	O
instance	O
of	O
a	O
partial	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
Minsky	O
(	O
1961	O
)	O
and	O
Shepherdson	O
–	O
Sturgis	O
(	O
1963	O
)	O
prove	O
that	O
only	O
a	O
few	O
tapes	O
—	O
as	O
few	O
as	O
one	O
—	O
still	O
allow	O
the	O
machine	O
to	O
be	O
Turing	B-Algorithm
equivalent	I-Algorithm
IF	O
the	O
data	O
on	O
the	O
tape	O
is	O
represented	O
as	O
a	O
Gödel	O
number	O
(	O
or	O
some	O
other	O
uniquely	O
encodable-decodable	O
number	O
)	O
;	O
this	O
number	O
will	O
evolve	O
as	O
the	O
computation	O
proceeds	O
.	O
</s>
<s>
In	O
the	O
one	O
tape	O
version	O
with	O
Gödel	O
number	O
encoding	O
the	O
counter	B-Application
machine	I-Application
must	O
be	O
able	O
to	O
(	O
i	O
)	O
multiply	O
the	O
Gödel	O
number	O
by	O
a	O
constant	O
(	O
numbers	O
"	O
2	O
"	O
or	O
"	O
3	O
"	O
)	O
,	O
and	O
(	O
ii	O
)	O
divide	O
by	O
a	O
constant	O
(	O
numbers	O
"	O
2	O
"	O
or	O
"	O
3	O
"	O
)	O
and	O
jump	O
if	O
the	O
remainder	O
is	O
zero	O
.	O
</s>
<s>
A	O
similar	O
result	O
appears	O
in	O
Elgot	O
–	O
Robinson	O
(	O
1964	O
)	O
with	O
respect	O
to	O
their	O
RASP	B-Application
model	I-Application
.	O
</s>
<s>
He	O
defines	O
indirect	O
addressing	O
for	O
his	O
model	O
(	O
p.288	O
)	O
and	O
provides	O
two	O
examples	O
of	O
its	O
use	O
(	O
p.89	O
)	O
;	O
his	O
"	O
proof	O
"	O
(	O
p.290-292	O
)	O
that	O
his	O
model	O
is	O
Turing	B-Algorithm
equivalent	I-Algorithm
is	O
so	O
sketchy	O
that	O
the	O
reader	O
cannot	O
tell	O
whether	O
or	O
not	O
he	O
intended	O
the	O
indirect	O
addressing	O
to	O
be	O
a	O
requirement	O
for	O
the	O
proof	O
.	O
</s>
<s>
A	O
RASP	O
or	O
random-access	B-Application
stored-program	I-Application
machine	I-Application
begins	O
as	O
a	O
counter	B-Application
machine	I-Application
with	O
its	O
"	O
program	O
of	O
instruction	O
"	O
placed	O
in	O
its	O
"	O
registers	B-General_Concept
"	O
.	O
</s>
<s>
Analogous	O
to	O
,	O
but	O
independent	O
of	O
,	O
the	O
finite	O
state	O
machine	O
's	O
"	O
Instruction	O
Register	O
"	O
,	O
at	O
least	O
one	O
of	O
the	O
registers	B-General_Concept
(	O
nicknamed	O
the	O
"	O
program	O
counter	O
"	O
(	O
PC	O
)	O
)	O
and	O
one	O
or	O
more	O
"	O
temporary	O
"	O
registers	B-General_Concept
maintain	O
a	O
record	O
of	O
,	O
and	O
operate	O
on	O
,	O
the	O
current	O
instruction	O
's	O
number	O
.	O
</s>
<s>
Except	O
there	O
is	O
a	O
problem	O
:	O
If	O
based	O
on	O
the	O
counter	B-Application
machine	I-Application
chassis	O
this	O
computer-like	O
,	O
von	O
Neumann	O
machine	O
will	O
not	O
be	O
Turing	B-Algorithm
equivalent	I-Algorithm
.	O
</s>
<s>
The	O
counter	B-Application
machine	I-Application
based	O
RASP	O
can	O
compute	O
any	O
primitive	B-Architecture
recursive	I-Architecture
function	I-Architecture
(	O
e.g.	O
</s>
<s>
Elgot	O
–	O
Robinson	O
investigate	O
the	O
possibility	O
of	O
allowing	O
their	O
RASP	B-Application
model	I-Application
to	O
"	O
self	O
modify	O
"	O
its	O
program	O
instructions	O
.	O
</s>
<s>
Example	O
:	O
A	O
counter	B-Application
machine	I-Application
equipped	O
with	O
only	O
four	O
unbounded	O
registers	B-General_Concept
can	O
e.g.	O
</s>
<s>
multiply	O
any	O
two	O
numbers	O
(	O
m	O
,	O
n	O
)	O
together	O
to	O
yield	O
p	O
—	O
and	O
thus	O
be	O
a	O
primitive	B-Architecture
recursive	I-Architecture
function	I-Architecture
—	O
no	O
matter	O
how	O
large	O
the	O
numbers	O
m	O
and	O
n	O
;	O
moreover	O
,	O
less	O
than	O
20	O
instructions	O
are	O
required	O
to	O
do	O
this	O
!	O
</s>
<s>
However	O
,	O
with	O
only	O
4	O
registers	B-General_Concept
,	O
this	O
machine	O
has	O
not	O
nearly	O
big	O
enough	O
to	O
build	O
a	O
RASP	O
that	O
can	O
execute	O
the	O
multiply	O
algorithm	O
as	O
a	O
program	O
.	O
</s>
<s>
Minsky	O
(	O
1967	O
)	O
hints	O
at	O
the	O
issue	O
in	O
his	O
investigation	O
of	O
a	O
counter	B-Application
machine	I-Application
(	O
he	O
calls	O
them	O
"	O
program	O
computer	O
models	O
"	O
)	O
equipped	O
with	O
the	O
instructions	O
{	O
CLR	O
(	O
r	O
)	O
,	O
INC	O
(	O
r	O
)	O
,	O
and	O
RPT	O
(	O
"	O
a	O
"	O
times	O
the	O
instructions	O
m	O
to	O
n	O
)	O
}	O
.	O
</s>
<s>
RPT	O
operations	O
require	O
infinite	O
registers	B-General_Concept
of	O
their	O
own	O
,	O
in	O
general	O
,	O
and	O
they	O
must	O
be	O
treated	O
differently	O
from	O
the	O
other	O
kinds	O
of	O
operations	O
we	O
have	O
considered.	O
"	O
</s>
<s>
Their	O
P'0	O
model	O
addresses	O
the	O
registers	B-General_Concept
by	O
adding	O
the	O
contents	O
of	O
the	O
"	O
base	O
"	O
register	O
(	O
specified	O
in	O
the	O
instruction	O
)	O
to	O
the	O
"	O
index	O
"	O
specified	O
explicitly	O
in	O
the	O
instruction	O
(	O
or	O
vice	O
versa	O
,	O
swapping	O
"	O
base	O
"	O
and	O
"	O
index	O
"	O
)	O
.	O
</s>
<s>
By	O
1971	O
Hartmanis	O
has	O
simplified	O
the	O
indexing	O
to	O
indirection	O
for	O
use	O
in	O
his	O
RASP	B-Application
model	I-Application
.	O
</s>
<s>
If	O
the	O
pointer-register	O
is	O
unbounded	O
,	O
the	O
RAM	O
,	O
and	O
a	O
suitable	O
RASP	O
built	O
on	O
its	O
chassis	O
,	O
will	O
be	O
Turing	B-Algorithm
equivalent	I-Algorithm
.	O
</s>
<s>
Cook	O
and	O
Reckhow	O
(	O
1973	O
)	O
cite	O
Hartmanis	O
(	O
1971	O
)	O
and	O
simplify	O
his	O
model	O
to	O
what	O
they	O
call	O
a	O
random-access	B-Application
machine	I-Application
(	O
RAM	O
—	O
i.e.	O
</s>
<s>
a	O
machine	O
with	O
indirection	O
and	O
the	O
Harvard	B-Architecture
architecture	I-Architecture
)	O
.	O
</s>
