<s>
In	O
computer	O
architecture	O
,	O
word	B-General_Concept
addressing	I-General_Concept
means	O
that	O
addresses	O
of	O
memory	O
on	O
a	O
computer	O
uniquely	O
identify	O
words	O
of	O
memory	O
.	O
</s>
<s>
It	O
is	O
usually	O
used	O
in	O
contrast	O
with	O
byte	B-General_Concept
addressing	I-General_Concept
,	O
where	O
addresses	O
uniquely	O
identify	O
bytes	B-Application
.	O
</s>
<s>
Almost	O
all	O
modern	O
computer	O
architectures	O
use	O
byte	B-General_Concept
addressing	I-General_Concept
,	O
and	O
word	B-General_Concept
addressing	I-General_Concept
is	O
largely	O
only	O
of	O
historical	O
interest	O
.	O
</s>
<s>
A	O
computer	O
that	O
uses	O
word	B-General_Concept
addressing	I-General_Concept
is	O
sometimes	O
called	O
a	O
word	O
machine	O
.	O
</s>
<s>
If	O
that	O
memory	O
is	O
arranged	O
in	O
a	O
byte-addressable	B-General_Concept
flat	O
address	O
space	O
using	O
8-bit	O
bytes	B-Application
,	O
then	O
there	O
are	O
65,536	O
(	O
216	O
)	O
valid	O
addresses	O
,	O
from	O
0	O
to	O
65	O
,	O
535	O
,	O
each	O
denoting	O
an	O
independent	O
8	O
bits	O
of	O
memory	O
.	O
</s>
<s>
If	O
instead	O
it	O
is	O
arranged	O
in	O
a	O
word-addressable	B-General_Concept
flat	O
address	O
space	O
using	O
32-bit	O
words	O
,	O
then	O
there	O
are	O
16,384	O
(	O
214	O
)	O
valid	O
addresses	O
,	O
from	O
0	O
to	O
16	O
,	O
383	O
,	O
each	O
denoting	O
an	O
independent	O
32	O
bits	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
computer	O
might	O
use	O
32-bit	O
addresses	O
with	O
byte	B-General_Concept
addressing	I-General_Concept
in	O
its	O
instruction	B-General_Concept
set	I-General_Concept
,	O
but	O
the	O
CPU	O
's	O
cache	B-General_Concept
coherence	I-General_Concept
system	O
might	O
work	O
with	O
memory	O
only	O
at	O
a	O
granularity	O
of	O
64-byte	O
cache	B-General_Concept
lines	I-General_Concept
,	O
allowing	O
any	O
particular	O
cache	B-General_Concept
line	I-General_Concept
to	O
be	O
identified	O
with	O
only	O
a	O
26-bit	O
address	O
and	O
decreasing	O
the	O
overhead	O
of	O
the	O
cache	O
.	O
</s>
<s>
The	O
address	O
translation	O
done	O
by	O
virtual	B-Architecture
memory	I-Architecture
often	O
affects	O
the	O
structure	O
and	O
width	O
of	O
the	O
address	O
space	O
,	O
but	O
it	O
does	O
not	O
change	O
the	O
MAU	O
.	O
</s>
<s>
If	O
a	O
sign	O
is	O
stored	O
in	O
its	O
own	O
MAU	O
,	O
then	O
4	O
bits	O
will	O
be	O
wasted	O
with	O
byte	B-General_Concept
addressing	I-General_Concept
(	O
50%	O
efficiency	O
)	O
,	O
while	O
28	O
bits	O
will	O
be	O
wasted	O
with	O
32-bit	O
word	B-General_Concept
addressing	I-General_Concept
(	O
12.5	O
%	O
efficiency	O
)	O
.	O
</s>
<s>
Common	O
string	O
formats	O
such	O
as	O
UTF-8	O
and	O
ASCII	B-Protocol
store	O
strings	O
as	O
a	O
sequence	O
of	O
8-bit	O
code	O
points	O
.	O
</s>
<s>
With	O
byte	B-General_Concept
addressing	I-General_Concept
,	O
each	O
code	O
point	O
can	O
be	O
placed	O
in	O
its	O
own	O
independently-addressable	O
MAU	O
with	O
no	O
overhead	O
.	O
</s>
<s>
With	O
32-bit	O
word	B-General_Concept
addressing	I-General_Concept
,	O
placing	O
each	O
code	O
point	O
in	O
a	O
separate	O
MAU	O
would	O
increase	O
the	O
memory	O
usage	O
by	O
300%	O
,	O
which	O
is	O
not	O
viable	O
for	O
programs	O
that	O
work	O
with	O
large	O
amounts	O
of	O
text	O
.	O
</s>
<s>
If	O
the	O
web	O
browser	O
is	O
running	O
on	O
a	O
computer	O
with	O
32-bit	O
addresses	O
and	O
byte-addressable	B-General_Concept
memory	O
,	O
the	O
address	O
space	O
will	O
cover	O
4	O
Gigabytes	O
of	O
memory	O
,	O
which	O
is	O
insufficient	O
.	O
</s>
<s>
If	O
the	O
web	O
browser	O
is	O
running	O
on	O
a	O
computer	O
with	O
64-bit	O
addresses	O
and	O
byte-addressable	B-General_Concept
memory	O
,	O
it	O
will	O
require	O
substantially	O
more	O
memory	O
in	O
order	O
to	O
store	O
the	O
larger	O
addresses	O
.	O
</s>
<s>
If	O
the	O
web	O
browser	O
is	O
running	O
on	O
a	O
computer	O
with	O
32-bit	O
addresses	O
and	O
32-bit-word-addressable	O
memory	O
,	O
it	O
will	O
likely	O
require	O
extra	O
memory	O
because	O
of	O
suboptimal	O
packing	O
and	O
the	O
need	O
for	O
a	O
few	O
wide	O
addresses	O
.	O
</s>
<s>
More	O
importantly	O
,	O
16	O
Gigabytes	O
is	O
a	O
relatively	O
low	O
limit	O
,	O
and	O
if	O
the	O
web	O
page	O
grows	O
significantly	O
,	O
this	O
computer	O
will	O
exhaust	O
its	O
address	O
space	O
and	O
begin	O
to	O
have	O
some	O
of	O
the	O
same	O
difficulties	O
as	O
the	O
byte-addressed	O
computer	O
.	O
</s>
<s>
If	O
the	O
web	O
browser	O
is	O
running	O
on	O
a	O
computer	O
with	O
64-bit	O
addresses	O
and	O
32-bit-word-addressable	O
memory	O
,	O
it	O
will	O
suffer	O
from	O
both	O
of	O
the	O
above	O
runtime	O
overheads	O
:	O
it	O
require	O
substantially	O
more	O
memory	O
to	O
accommodate	O
the	O
larger	O
64-bit	O
addresses	O
,	O
hurting	O
locality	O
,	O
while	O
also	O
incurring	O
the	O
runtime	O
overhead	O
of	O
working	O
with	O
extensive	O
packing	O
of	O
text	O
and	O
image	O
data	O
.	O
</s>
<s>
Word	B-General_Concept
addressing	I-General_Concept
means	O
that	O
the	O
program	O
can	O
theoretically	O
address	O
up	O
to	O
64	O
Exabytes	O
of	O
memory	O
instead	O
of	O
only	O
16	O
Exabytes	O
,	O
but	O
since	O
the	O
program	O
is	O
nowhere	O
near	O
needing	O
this	O
much	O
memory	O
(	O
and	O
in	O
practice	O
no	O
real	O
computer	O
is	O
capable	O
of	O
providing	O
it	O
)	O
,	O
this	O
provides	O
no	O
benefit	O
.	O
</s>
<s>
Thus	O
,	O
word	B-General_Concept
addressing	I-General_Concept
allows	O
a	O
computer	O
to	O
address	O
substantially	O
more	O
memory	O
without	O
increasing	O
its	O
address	O
width	O
and	O
incurring	O
the	O
corresponding	O
large	O
increase	O
in	O
memory	O
usage	O
.	O
</s>
<s>
Programs	O
which	O
do	O
relatively	O
little	O
work	O
with	O
byte-oriented	O
data	O
like	O
images	O
,	O
text	O
,	O
files	O
,	O
and	O
network	O
traffic	O
may	O
be	O
able	O
to	O
benefit	O
most	O
.	O
</s>
<s>
A	O
program	O
running	O
on	O
a	O
computer	O
that	O
uses	O
word	B-General_Concept
addressing	I-General_Concept
can	O
still	O
work	O
with	O
smaller	O
units	O
of	O
memory	O
by	O
emulating	O
an	O
access	O
to	O
the	O
smaller	O
unit	O
.	O
</s>
<s>
(	O
If	O
the	O
memory	O
were	O
byte-addressable	B-General_Concept
,	O
this	O
would	O
be	O
a	O
little	O
endian	O
byte	B-Application
order	O
.	O
)	O
</s>
<s>
In	O
order	O
to	O
clearly	O
elucidate	O
the	O
code	O
necessary	O
for	O
sub-word	O
accesses	O
without	O
tying	O
the	O
example	O
too	O
closely	O
to	O
any	O
particular	O
word-addressed	O
architecture	O
,	O
the	O
following	O
examples	O
use	O
MIPS	B-Device
assembly	I-Device
.	O
</s>
<s>
In	O
reality	O
,	O
MIPS	B-Device
is	O
a	O
byte-addressed	O
architecture	O
with	O
direct	O
support	O
for	O
loading	O
and	O
storing	O
8-bit	O
and	O
16-bit	O
values	O
,	O
but	O
the	O
example	O
will	O
pretend	O
that	O
it	O
only	O
provides	O
32-bit	O
loads	O
and	O
stores	O
and	O
that	O
offsets	O
within	O
a	O
32-bit	O
word	O
must	O
be	O
stored	O
separately	O
from	O
an	O
address	O
.	O
</s>
<s>
MIPS	B-Device
has	O
been	O
chosen	O
because	O
it	O
is	O
a	O
simple	O
assembly	O
language	O
with	O
no	O
specialized	O
facilities	O
that	O
would	O
make	O
these	O
operations	O
more	O
convenient	O
.	O
</s>
<s>
In	O
the	O
absence	O
of	O
any	O
other	O
support	O
from	O
the	O
instruction	B-General_Concept
set	I-General_Concept
,	O
the	O
program	O
must	O
load	O
the	O
full	O
word	O
,	O
right-shift	O
by	O
16	O
to	O
drop	O
the	O
first	O
two	O
code	O
points	O
,	O
and	O
then	O
mask	O
off	O
the	O
fourth	O
code	O
point	O
:	O
</s>
<s>
In	O
the	O
absence	O
of	O
any	O
other	O
support	O
from	O
the	O
instruction	B-General_Concept
set	I-General_Concept
,	O
the	O
program	O
must	O
load	O
the	O
full	O
word	O
,	O
mask	O
off	O
the	O
old	O
value	O
of	O
that	O
code	O
point	O
,	O
shift	O
the	O
new	O
value	O
into	O
place	O
,	O
merge	O
the	O
values	O
,	O
and	O
store	O
the	O
full	O
word	O
back	O
:	O
</s>
<s>
This	O
code	O
sequence	O
assumes	O
that	O
another	O
thread	O
cannot	O
modify	O
other	O
bytes	B-Application
in	O
the	O
word	O
concurrently	O
.	O
</s>
<s>
A	O
pair	O
of	O
a	O
word	B-General_Concept
address	I-General_Concept
and	O
an	O
offset	O
within	O
the	O
word	O
is	O
called	O
a	O
wide	O
address	O
(	O
also	O
known	O
as	O
a	O
fat	O
address	O
or	O
fat	O
pointer	O
)	O
.	O
</s>
<s>
The	O
stored	O
offset	O
may	O
be	O
either	O
a	O
bit	O
offset	O
or	O
a	O
byte	B-Application
offset	O
.	O
</s>
<s>
The	O
code	O
sequences	O
above	O
benefit	O
from	O
the	O
offset	O
being	O
denominated	O
in	O
bits	O
because	O
they	O
use	O
it	O
as	O
a	O
shift	O
count	O
;	O
an	O
architecture	O
with	O
direct	O
support	O
for	O
selecting	O
bytes	B-Application
might	O
prefer	O
to	O
just	O
store	O
a	O
byte	B-Application
offset	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
Cray	B-Device
X1	I-Device
uses	O
64-bit	O
words	O
,	O
but	O
addresses	O
are	O
only	O
32	O
bits	O
;	O
when	O
an	O
address	O
is	O
stored	O
in	O
memory	O
,	O
it	O
is	O
stored	O
in	O
its	O
own	O
word	O
,	O
and	O
so	O
the	O
byte	B-Application
offset	O
can	O
be	O
placed	O
in	O
the	O
upper	O
32	O
bits	O
of	O
the	O
word	O
.	O
</s>
<s>
The	O
inefficiency	O
of	O
using	O
wide	O
addresses	O
on	O
that	O
system	O
is	O
just	O
all	O
the	O
extra	O
logic	O
to	O
manipulate	O
this	O
offset	O
and	O
extract	O
and	O
insert	O
bytes	B-Application
within	O
words	O
;	O
it	O
has	O
no	O
memory-use	O
impact	O
.	O
</s>
<s>
The	O
minimum	O
addressable	O
unit	O
of	O
a	O
computer	O
is	O
n't	O
necessarily	O
the	O
same	O
as	O
the	O
minimum	O
memory	O
access	O
size	O
of	O
the	O
computer	O
's	O
instruction	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
a	O
computer	O
might	O
use	O
byte	B-General_Concept
addressing	I-General_Concept
without	O
providing	O
any	O
instructions	O
to	O
directly	O
read	O
or	O
write	O
a	O
single	O
byte	B-Application
.	O
</s>
<s>
This	O
is	O
relatively	O
common	O
in	O
64-bit	O
computer	O
architectures	O
designed	O
as	O
successors	O
to	O
32-bit	O
supercomputers	O
or	O
minicomputers	O
,	O
such	O
the	O
DEC	B-Device
Alpha	I-Device
and	O
the	O
Cray	B-Device
X1	I-Device
.	O
</s>
<s>
The	O
C	B-Language
standard	I-Language
states	O
that	O
a	O
pointer	O
is	O
expected	O
to	O
have	O
the	O
usual	O
representation	O
of	O
an	O
address	O
.	O
</s>
<s>
C	B-Language
also	O
allows	O
a	O
pointer	O
to	O
be	O
formed	O
to	O
any	O
object	O
except	O
a	O
bit-field	O
;	O
this	O
includes	O
each	O
individual	O
element	O
of	O
an	O
array	O
of	O
bytes	B-Application
.	O
</s>
<s>
C	B-Language
compilers	O
for	O
computers	O
that	O
use	O
word	B-General_Concept
addressing	I-General_Concept
often	O
use	O
different	O
representations	O
for	O
pointers	O
to	O
different	O
types	O
depending	O
on	O
their	O
size	O
.	O
</s>
<s>
A	O
pointer	O
to	O
a	O
type	O
that	O
's	O
large	O
enough	O
to	O
fill	O
a	O
word	O
will	O
be	O
a	O
simple	O
address	O
,	O
while	O
a	O
pointer	O
such	O
as	O
char*	O
or	O
void*	O
will	O
be	O
a	O
wide	O
pointer	O
:	O
a	O
pair	O
of	O
the	O
address	O
of	O
a	O
word	O
and	O
the	O
offset	O
of	O
a	O
byte	B-Application
within	O
that	O
word	O
.	O
</s>
<s>
Because	O
the	O
size	O
of	O
a	O
C	B-Language
struct	O
is	O
not	O
always	O
known	O
when	O
deciding	O
the	O
representation	O
of	O
a	O
pointer	O
to	O
that	O
struct	O
,	O
it	O
is	O
not	O
possible	O
to	O
reliably	O
apply	O
the	O
rule	O
above	O
.	O
</s>
<s>
The	O
ERA	B-Device
1103	I-Device
uses	O
word	B-General_Concept
addressing	I-General_Concept
with	O
36-bit	O
words	O
.	O
</s>
<s>
The	O
PDP-10	B-Device
uses	O
word	B-General_Concept
addressing	I-General_Concept
with	O
36-bit	O
words	O
and	O
18-bit	O
addresses	O
.	O
</s>
<s>
Most	O
Cray	O
supercomputers	O
from	O
the	O
1980s	O
and	O
1990s	O
use	O
word	B-General_Concept
addressing	I-General_Concept
with	O
64-bit	O
words	O
.	O
</s>
<s>
The	O
Cray-1	B-Device
and	O
Cray	B-Device
X-MP	I-Device
use	O
24-bit	O
addresses	O
,	O
while	O
most	O
others	O
use	O
32-bit	O
addresses	O
.	O
</s>
<s>
The	O
Cray	B-Device
X1	I-Device
uses	O
byte	B-General_Concept
addressing	I-General_Concept
with	O
64-bit	O
addresses	O
.	O
</s>
<s>
The	O
C	B-Language
compiler	O
for	O
the	O
X1	O
was	O
the	O
first	O
Cray	O
compiler	O
to	O
support	O
emulating	O
16-bit	O
accesses	O
.	O
</s>
<s>
The	O
DEC	B-Device
Alpha	I-Device
uses	O
byte	B-General_Concept
addressing	I-General_Concept
with	O
64-bit	O
addresses	O
.	O
</s>
<s>
Early	O
Alpha	B-Device
processors	I-Device
do	O
not	O
provide	O
any	O
direct	O
support	O
for	O
8-bit	O
and	O
16-bit	O
memory	O
accesses	O
,	O
and	O
programs	O
are	O
required	O
to	O
e.g.	O
</s>
<s>
load	O
a	O
byte	B-Application
by	O
loading	O
the	O
containing	O
64-bit	O
word	O
and	O
then	O
separately	O
extracting	O
the	O
byte	B-Application
.	O
</s>
<s>
Because	O
the	O
Alpha	B-Device
uses	O
byte	B-General_Concept
addressing	I-General_Concept
,	O
this	O
offset	O
is	O
still	O
represented	O
in	O
the	O
least	O
significant	O
bits	O
of	O
the	O
address	O
(	O
rather	O
than	O
separately	O
as	O
a	O
wide	O
address	O
)	O
,	O
and	O
the	O
Alpha	B-Device
conveniently	O
provides	O
load	O
and	O
store	O
unaligned	O
instructions	O
(	O
ldq_u	O
and	O
stq_u	O
)	O
which	O
ignore	O
those	O
bits	O
and	O
simply	O
load	O
and	O
store	O
the	O
containing	O
aligned	O
word	O
.	O
</s>
<s>
The	O
later	O
byte-word	O
extensions	O
to	O
the	O
architecture	O
(	O
BWX	O
)	O
added	O
8-bit	O
and	O
16-bit	O
loads	O
and	O
stores	O
,	O
starting	O
with	O
the	O
Alpha	B-Device
21164a	O
.	O
</s>
<s>
Again	O
,	O
this	O
extension	O
was	O
possible	O
without	O
serious	O
software	O
incompatibilities	O
because	O
the	O
Alpha	B-Device
had	O
always	O
used	O
byte	B-General_Concept
addressing	I-General_Concept
.	O
</s>
