<s>
A	O
negative	B-Algorithm
base	I-Algorithm
(	O
or	O
negative	B-Algorithm
radix	I-Algorithm
)	O
may	O
be	O
used	O
to	O
construct	O
a	O
non-standard	O
positional	O
numeral	O
system	O
.	O
</s>
<s>
Negative-base	O
systems	O
can	O
accommodate	O
all	O
the	O
same	O
numbers	O
as	O
standard	O
place-value	O
systems	O
,	O
but	O
both	O
positive	O
and	O
negative	O
numbers	O
are	O
represented	O
without	O
the	O
use	O
of	O
a	O
minus	O
sign	O
(	O
or	O
,	O
in	O
computer	O
representation	O
,	O
a	O
sign	B-Algorithm
bit	I-Algorithm
)	O
;	O
this	O
advantage	O
is	O
countered	O
by	O
an	O
increased	O
complexity	O
of	O
arithmetic	O
operations	O
.	O
</s>
<s>
The	O
common	O
names	O
for	O
negative-base	O
positional	O
numeral	O
systems	O
are	O
formed	O
by	O
prefixing	O
nega	O
-	O
to	O
the	O
name	O
of	O
the	O
corresponding	O
positive-base	O
system	O
;	O
for	O
example	O
,	O
negadecimal	B-Algorithm
(	O
base	O
−10	O
)	O
corresponds	O
to	O
decimal	B-Application
(	O
base	O
10	O
)	O
,	O
negabinary	B-Algorithm
(	O
base	B-Algorithm
−2	I-Algorithm
)	O
to	O
binary	O
(	O
base	O
2	O
)	O
,	O
negaternary	B-Algorithm
(	O
base	O
−3	O
)	O
to	O
ternary	B-Algorithm
(	O
base	B-Algorithm
3	I-Algorithm
)	O
,	O
and	O
negaquaternary	O
(	O
base	O
−4	O
)	O
to	O
quaternary	O
(	O
base	O
4	O
)	O
.	O
</s>
<s>
Consider	O
what	O
is	O
meant	O
by	O
the	O
representation	O
in	O
the	O
negadecimal	B-Algorithm
system	O
,	O
whose	O
base	O
is	O
−10	O
:	O
</s>
<s>
The	O
representation	O
(	O
which	O
is	O
intended	O
to	O
be	O
negadecimal	B-Algorithm
notation	O
)	O
is	O
equivalent	O
to	O
in	O
decimal	B-Application
notation	O
,	O
because	O
10,000	O
+	O
( −	O
2,000	O
)	O
+	O
200	O
+	O
( −40	O
)	O
+	O
3	O
=	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
in	O
decimal	B-Application
would	O
be	O
written	O
in	O
negadecimal	B-Algorithm
.	O
</s>
<s>
Negative	B-Algorithm
bases	I-Algorithm
were	O
later	O
mentioned	O
in	O
passing	O
by	O
A	O
.	O
J	O
.	O
Kempner	O
in	O
1936	O
and	O
studied	O
in	O
more	O
detail	O
by	O
Zdzisław	O
Pawlak	O
and	O
A	O
.	O
Wakulicz	O
in	O
1957	O
.	O
</s>
<s>
Negabinary	B-Algorithm
was	O
implemented	O
in	O
the	O
early	O
Polish	O
computer	O
BINEG	O
(	O
and	O
UMC	B-Device
)	O
,	O
built	O
1957	O
–	O
59	O
,	O
based	O
on	O
ideas	O
by	O
Z	O
.	O
Pawlak	O
and	O
A	O
.	O
Lazarkiewicz	O
from	O
the	O
Mathematical	O
Institute	O
in	O
Warsaw	B-Application
.	O
</s>
<s>
Negative-base	O
systems	O
may	O
thus	O
be	O
compared	O
to	O
signed-digit	O
representations	O
,	O
such	O
as	O
balanced	B-Algorithm
ternary	I-Algorithm
,	O
where	O
the	O
radix	O
is	O
positive	O
but	O
the	O
digits	O
are	O
taken	O
from	O
a	O
partially	O
negative	O
range	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
numbers	O
from	O
100	O
to	O
109	O
have	O
the	O
same	O
representations	O
in	O
decimal	B-Application
and	O
negadecimal	B-Algorithm
.	O
</s>
<s>
and	O
is	O
represented	O
by	O
10001	O
in	O
binary	O
and	O
10001	O
in	O
negabinary	B-Algorithm
.	O
</s>
<s>
Some	O
numbers	O
with	O
their	O
expansions	O
in	O
a	O
number	O
of	O
positive	O
and	O
corresponding	O
negative	B-Algorithm
bases	I-Algorithm
are	O
:	O
</s>
<s>
Note	O
that	O
,	O
with	O
the	O
exception	O
of	O
nega	O
balanced	B-Algorithm
ternary	I-Algorithm
,	O
the	O
base	O
expansions	O
of	O
negative	O
integers	O
have	O
an	O
even	O
number	O
of	O
digits	O
,	O
while	O
the	O
base	O
expansions	O
of	O
the	O
non-negative	O
integers	O
have	O
an	O
odd	O
number	O
of	O
digits	O
.	O
</s>
<s>
For	O
example	O
,	O
to	O
convert	O
146	O
in	O
decimal	B-Application
to	O
negaternary	B-Algorithm
:	O
</s>
<s>
Reading	O
the	O
remainders	O
backward	O
we	O
obtain	O
the	O
negaternary	B-Algorithm
representation	O
of	O
14610	O
:	O
21102	O
–	O
3	O
.	O
</s>
<s>
The	O
conversion	O
from	O
integer	O
to	O
some	O
negative	B-Algorithm
base	I-Algorithm
:	O
</s>
<s>
the	O
input	O
is	O
available	O
in	O
bitstrings	B-Data_Structure
and	O
coded	O
in	O
(	O
base	O
+2	O
;	O
digits	O
in	O
)	O
(	O
as	O
in	O
most	O
of	O
today	O
's	O
digital	O
computers	O
)	O
,	O
</s>
<s>
there	O
are	O
add	O
( +	O
)	O
and	O
xor	O
( ^	O
)	O
operations	O
which	O
operate	O
on	O
such	O
bitstrings	B-Data_Structure
(	O
as	O
in	O
most	O
of	O
today	O
's	O
digital	O
computers	O
)	O
,	O
</s>
<s>
the	O
output	O
is	O
coded	O
in	O
the	O
same	O
bitstring	B-Data_Structure
format	O
,	O
but	O
the	O
meaning	O
of	O
the	O
places	O
is	O
another	O
one	O
.	O
</s>
<s>
The	O
following	O
describes	O
the	O
arithmetic	O
operations	O
for	O
negabinary	B-Algorithm
;	O
calculations	O
in	O
larger	O
bases	O
are	O
similar	O
.	O
</s>
<s>
Adding	O
negabinary	B-Algorithm
numbers	O
proceeds	O
bitwise	O
,	O
starting	O
from	O
the	O
least	O
significant	O
bits	O
;	O
the	O
bits	O
from	O
each	O
addend	O
are	O
summed	O
with	O
the	O
(	O
balanced	B-Algorithm
ternary	I-Algorithm
)	O
carry	O
from	O
the	O
previous	O
bit	O
(	O
0	O
at	O
the	O
LSB	O
)	O
.	O
</s>
<s>
While	O
adding	O
two	O
negabinary	B-Algorithm
numbers	O
,	O
every	O
time	O
a	O
carry	O
is	O
generated	O
an	O
extra	O
carry	O
should	O
be	O
propagated	O
to	O
next	O
bit	O
.	O
</s>
<s>
A	O
full	O
adder	O
circuit	O
can	O
be	O
designed	O
to	O
add	O
numbers	O
in	O
negabinary	B-Algorithm
.	O
</s>
<s>
Incrementing	O
a	O
negabinary	B-Algorithm
number	O
can	O
be	O
done	O
by	O
using	O
the	O
following	O
formula	O
:	O
</s>
<s>
To	O
multiply	O
,	O
multiply	O
like	O
normal	O
decimal	B-Application
or	O
binary	O
numbers	O
,	O
but	O
using	O
the	O
negabinary	B-Algorithm
rules	O
for	O
adding	O
the	O
carry	O
,	O
when	O
adding	O
the	O
numbers	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
compare	O
negabinary	B-Algorithm
numbers	O
by	O
slightly	O
adjusting	O
a	O
normal	O
unsigned	O
binary	O
comparator	O
.	O
</s>
<s>
Base	O
representation	O
may	O
of	O
course	O
be	O
carried	O
beyond	O
the	O
radix	B-Algorithm
point	I-Algorithm
,	O
allowing	O
the	O
representation	O
of	O
non-integer	O
numbers	O
.	O
</s>
<s>
Unlike	O
positive-base	O
systems	O
,	O
where	O
integers	O
and	O
terminating	O
fractions	O
have	O
non-unique	O
representations	O
(	O
for	O
example	O
,	O
in	O
decimal	B-Application
999	O
...	O
=	O
1	O
)	O
in	O
negative-base	O
systems	O
the	O
integers	O
have	O
only	O
a	O
single	O
representation	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
negaternary	B-Algorithm
,	O
i.e.	O
</s>
<s>
Just	O
as	O
using	O
a	O
negative	B-Algorithm
base	I-Algorithm
allows	O
the	O
representation	O
of	O
negative	O
numbers	O
without	O
an	O
explicit	O
negative	O
sign	O
,	O
using	O
an	O
imaginary	O
base	O
allows	O
the	O
representation	O
of	O
Gaussian	O
integers	O
.	O
</s>
