<s>
An	O
XOR	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
is	O
a	O
type	O
of	O
data	B-General_Concept
structure	I-General_Concept
used	O
in	O
computer	B-General_Concept
programming	I-General_Concept
.	O
</s>
<s>
It	O
takes	O
advantage	O
of	O
the	O
bitwise	O
XOR	O
operation	O
to	O
decrease	O
storage	O
requirements	O
for	O
doubly	B-Data_Structure
linked	I-Data_Structure
lists	I-Data_Structure
.	O
</s>
<s>
An	O
ordinary	O
doubly	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
stores	O
addresses	O
of	O
the	O
previous	O
and	O
next	O
list	O
items	O
in	O
each	O
list	O
node	O
,	O
requiring	O
two	O
address	O
fields	O
:	O
</s>
<s>
An	O
XOR	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
compresses	O
the	O
same	O
information	O
into	O
one	O
address	O
field	O
by	O
storing	O
the	O
bitwise	O
XOR	O
(	O
here	O
denoted	O
by	O
⊕	O
)	O
of	O
the	O
address	O
for	O
previous	O
and	O
the	O
address	O
for	O
next	O
in	O
one	O
field	O
:	O
</s>
<s>
Consider	O
a	O
list	O
with	O
items	O
{	O
…	O
B	O
C	O
D	O
…	O
}	O
and	O
with	O
R1	O
and	O
R2	O
being	O
registers	B-General_Concept
containing	O
,	O
respectively	O
,	O
the	O
address	O
of	O
the	O
current	O
(	O
say	O
C	O
)	O
list	O
item	O
and	O
a	O
work	O
register	O
containing	O
the	O
XOR	O
of	O
the	O
current	O
address	O
with	O
the	O
previous	O
address	O
(	O
say	O
C⊕D	O
)	O
.	O
</s>
<s>
Cast	O
as	O
System/360	B-Application
instructions	O
:	O
</s>
<s>
Most	O
garbage	B-General_Concept
collection	I-General_Concept
schemes	O
do	O
not	O
work	O
with	O
data	B-General_Concept
structures	I-General_Concept
that	O
do	O
not	O
contain	O
literal	O
pointers	O
;	O
</s>
<s>
While	O
traversing	O
the	O
list	O
the	O
address	O
of	O
the	O
previously	O
accessed	O
node	O
is	O
needed	O
to	O
calculate	O
the	O
next	O
node	O
's	O
address	O
and	O
the	O
pointers	O
will	O
be	O
unreadable	O
if	O
one	O
is	O
n't	O
traversing	O
the	O
listfor	O
example	O
,	O
if	O
the	O
pointer	O
to	O
a	O
list	O
item	O
was	O
contained	O
in	O
another	O
data	B-General_Concept
structure	I-General_Concept
;	O
</s>
<s>
XOR	B-Data_Structure
linked	I-Data_Structure
lists	I-Data_Structure
do	O
not	O
provide	O
some	O
of	O
the	O
important	O
advantages	O
of	O
doubly	B-Data_Structure
linked	I-Data_Structure
lists	I-Data_Structure
,	O
such	O
as	O
the	O
ability	O
to	O
delete	O
a	O
node	O
from	O
the	O
list	O
knowing	O
only	O
its	O
address	O
or	O
the	O
ability	O
to	O
insert	O
a	O
new	O
node	O
before	O
or	O
after	O
an	O
existing	O
node	O
when	O
knowing	O
only	O
the	O
address	O
of	O
the	O
existing	O
node	O
.	O
</s>
<s>
Computer	O
systems	O
have	O
increasingly	O
cheap	O
and	O
plentiful	O
memory	O
,	O
therefore	O
storage	O
overhead	O
is	O
not	O
generally	O
an	O
overriding	O
issue	O
outside	O
specialized	O
embedded	B-Architecture
systems	I-Architecture
.	O
</s>
<s>
Where	O
it	O
is	O
still	O
desirable	O
to	O
reduce	O
the	O
overhead	O
of	O
a	O
linked	O
list	O
,	O
unrolling	B-Data_Structure
provides	O
a	O
more	O
practical	O
approach	O
(	O
as	O
well	O
as	O
other	O
advantages	O
,	O
such	O
as	O
increasing	O
cache	O
performance	O
and	O
speeding	O
random	B-General_Concept
access	I-General_Concept
)	O
.	O
</s>
<s>
The	O
underlying	O
principle	O
of	O
the	O
XOR	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
can	O
be	O
applied	O
to	O
any	O
reversible	O
binary	O
operation	O
.	O
</s>
<s>
This	O
kind	O
of	O
list	O
has	O
exactly	O
the	O
same	O
properties	O
as	O
the	O
XOR	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
,	O
except	O
that	O
a	O
zero	O
link	O
field	O
is	O
not	O
a	O
"	O
mirror	O
"	O
.	O
</s>
<s>
This	O
kind	O
of	O
list	O
differs	O
from	O
the	O
standard	O
"	O
traditional	O
"	O
XOR	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
in	O
that	O
the	O
instruction	O
sequences	O
needed	O
to	O
traverse	O
the	O
list	O
forwards	O
is	O
different	O
from	O
the	O
sequence	O
needed	O
to	O
traverse	O
the	O
list	O
in	O
reverse	O
.	O
</s>
<s>
The	O
subtraction	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
is	O
also	O
special	O
in	O
that	O
the	O
entire	O
list	O
can	O
be	O
relocated	O
in	O
memory	O
without	O
needing	O
any	O
patching	O
of	O
pointer	O
values	O
,	O
since	O
adding	O
a	O
constant	O
offset	O
to	O
each	O
address	O
in	O
the	O
list	O
will	O
not	O
require	O
any	O
changes	O
to	O
the	O
values	O
stored	O
in	O
the	O
link	O
fields	O
.	O
</s>
<s>
(	O
See	O
also	O
serialization	B-Application
.	O
)	O
</s>
<s>
This	O
is	O
an	O
advantage	O
over	O
both	O
XOR	B-Data_Structure
linked	I-Data_Structure
lists	I-Data_Structure
and	O
traditional	O
linked	O
lists	O
.	O
</s>
<s>
The	O
XOR	B-Data_Structure
linked	I-Data_Structure
list	I-Data_Structure
concept	O
can	O
be	O
generalized	O
to	O
XOR	O
binary	B-Language
search	I-Language
trees	I-Language
.	O
</s>
