# Base 0 or 1 ?!

**URL:** <https://boards.straightdope.com/t/base-0-or-1/309825>\
**Category:** Factual Questions\
**Created:** [June 25, 2005, 7:59pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825 "2005-06-25T19:59:01Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Canadjun](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@Canadjun](https://boards.straightdope.com/u/Canadjun)\
**Post date:** [June 25, 2005, 7:59pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825/1 "2005-06-25T19:59:01Z")

</div>

I was going to tack this onto the thread about [pi](http://boards.straightdope.com/sdmb/showthread.php?t=322665) , but decided that would be a hijack. This site [base](http://mathworld.wolfram.com/Base.html) was cited. Now I know that is a good location to dig up arcane math info, so it wouldn’t surprise me if they’re right and I just don’t know something (quite the admission 🙂 ), but it says

_A real number x can be represented using **any** integer number b as a base (sometimes also called a radix or scale). The choice of a base yields to a representation of numbers known as a number system. In base b, the digits 0, 1, …, b-1 are used (where, by convention, for bases larger than 10, the symbols A, B, C, …are generally used as symbols representing the decimal numbers 10, 11, 12, …)._

(it does mention irrational and transcendental bases later - my question doesn’t relate to those). Well, 0 and 1 are certainly integers. How can you represent numbers using 0 or 1 as a base?!

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [June 25, 2005, 8:14pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825/2 "2005-06-25T20:14:34Z")

</div>

First guess–a numeric base needs to be greater than equal to two. At minimum, I would assume that a decimal system requires a minimum of a “nothing” character and a “something” one. Otherwise you have nothing to carry left when you overflow the limits of the digit range in your current slot. And with a zero-base numbering system, you wouldn’t have any digits to work with at all.

I can’t imagine that such things as using negative values or imaginary numbers can be used to get around this, as these are still derived from positive integers.

And remember everyone: There are only 10 kinds of people in the world!

---

<div class="post-metadata">

**Author:** ![Malodorous](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Malodorous](https://boards.straightdope.com/u/Malodorous)\
**Post date:** [June 25, 2005, 8:31pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825/3 "2005-06-25T20:31:55Z")

</div>

Base 1 would just be hatch marks, that is you’d represent a number by just writing a number of digits equal to the number:

1 = 1_1 = 1  
2= 1_1^2 + 1_1 = 11  
3= 1_1^3+1_1^2+1_1=111

8 = 11111111

and so on.

Agree that base zero would be meaningless, as multiplying things by zero to a power doesn’t allow you to write any number but zero.

Negative bases seem like they’d be possible, though working out the sign would be difficult for large numbers.

Fractional/imaginary/irrationals etc. could probably be made, but I can’t imaine they’d be useful for anything.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [June 25, 2005, 8:46pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825/4 "2005-06-25T20:46:55Z")

</div>

Congratulations, you’ve found an error on Mathworld. As was previously mentioned, base 0 is meaningless, and base 1 is so different from what we normally think of as a base that it’s hard to even call it the same thing. It’s really only useful for the positive integers.

Base -1 is probably equally meaningless, but there are some good reasons to consider using base -2 as the number system for computers. Unfortunately, I don’t think that anyone has figured out how to do division just yet, so don’t expect to see it any time soon.

Base sqrt(2) is easy–just write a number in binary and insert an extra 0 between every pair of digits. It’s odd to think that 1 + 1 = 100, but there you go.

Complex and imaginary bases will probably give you the most trouble because there’s no \< operator defined on **C** that behaves like you’d want it to.

---

<div class="post-metadata">

**Author:** ![TJdude825](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@TJdude825](https://boards.straightdope.com/u/TJdude825)\
**Post date:** [June 25, 2005, 9:43pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825/5 "2005-06-25T21:43:27Z")

</div>

> [@ultrafilter](#):
>
> … but there are some good reasons to consider using base -2 as the number system for computers.

Hm, I think I see how to do a base -2 system, but I can’t imagine why it would be useful. Can you explain?

I think it would work like this:  
[64] [-32] [16] [-8] [4] [-2] [1]  
0 = 0  
1 = 1  
2 = 110  
3 = 111  
4 = 100  
5 = 101  
6 = 11010  
7 = 11011  
8 = 11000  
9 = 11001  
10 = 11110  
11 = 11111  
12 = 11100  
13 = 11101  
14 = 10010  
15 = 10011  
16 = 10000  
17 = 10001  
18 = 10110  
19 = 10111  
20 = 10100  
21 = 10101  
22 = 1101010  
23 = 1101011  
24 = 1101000  
25 = 1101001  
26 = 1101110  
27 = 1101111  
28 = 1101100  
29 = 1101101  
30 = 1100010  
31 = 1100011  
32 = 1100000

---

<div class="post-metadata">

**Author:** ![Wendell\_Wagner](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@Wendell\_Wagner](https://boards.straightdope.com/u/Wendell_Wagner)\
**Post date:** [June 25, 2005, 11:41pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825/6 "2005-06-25T23:41:19Z")

</div>

Base -1 does indeed work. It may not be useful, but it works. The columns are -1, 1, -1, 1, -1, 1, -1. etc. going from right to left. So here are a few numbers:

0 = 11  
-1 = 1  
1 = 10  
-2 = 101  
2 = 1010

I recall seeing an article more than 35 years ago that worked out how one would do arithmetic in a negative base number system.

---

<div class="post-metadata">

**Author:** ![Hypnagogic\_Jerk](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hypnagogic_jerk/32/4252_2.png) [@Hypnagogic\_Jerk](https://boards.straightdope.com/u/Hypnagogic_Jerk)\
**Post date:** [June 26, 2005, 12:22am UTC](https://boards.straightdope.com/t/base-0-or-1/309825/7 "2005-06-26T00:22:46Z")

</div>

> [@Wendell Wagner](#):
>
> Base -1 does indeed work. It may not be useful, but it works. The columns are -1, 1, -1, 1, -1, 1, -1. etc. going from right to left. So here are a few numbers:
> 
> 0 = 11  
> -1 = 1  
> 1 = 10  
> -2 = 101  
> 2 = 1010

Not exactly. In a base -1 system:  
0 = 1\*(-1)^1 + 1\*(-1)^0 = 11  
-1 = 1\*(-1)^1 + 0\*(-1)^0 = 10  
1 = 1\*(-1)^0 = 1  
-2 = 1\*(-1)^3 + 0\*(-1)^2 + 1\*(-1)^1 + 0\*(-1)^0 = 1010  
2 = 1\*(-1)^2 + 0\*(-1)^1 + 1\*(-1)^0 = 101.

On the other hand, I’m not quite sure how many symbols we may use when working in a negative or noninteger basis. Usually, when you’re writing numbers in binary, you may use two symbols: {0,1}. In decimal, ten symbols: {0,1,2,…,9}. How many may you use in base Pi? How about in base -1? Here, we used two symbols, which I imagine is the smallest number that may be used in this case.

---

<div class="post-metadata">

**Author:** ![Hypnagogic\_Jerk](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hypnagogic_jerk/32/4252_2.png) [@Hypnagogic\_Jerk](https://boards.straightdope.com/u/Hypnagogic_Jerk)\
**Post date:** [June 26, 2005, 12:25am UTC](https://boards.straightdope.com/t/base-0-or-1/309825/8 "2005-06-26T00:25:06Z")

</div>

Also note that the representation of a number in base -1 is not unique. As a simple example, 1 = (1)[sub]-1[/sub] = (100)[sub]-1[/sub] = (10000)[sub]-1[/sub] = (0.01)[sub]-1[/sub], etc.

---

<div class="post-metadata">

**Author:** ![Hypnagogic\_Jerk](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hypnagogic_jerk/32/4252_2.png) [@Hypnagogic\_Jerk](https://boards.straightdope.com/u/Hypnagogic_Jerk)\
**Post date:** [June 26, 2005, 12:39am UTC](https://boards.straightdope.com/t/base-0-or-1/309825/9 "2005-06-26T00:39:26Z")

</div>

On the other hand, I think **TJdude825** ’s suggestion of a base -2 system earlier in this thread yields a unique representation for every integer, and probably every real too, using the digits {0,1}. I didn’t prove it, though. Yes, it could be used by computers to represent signed integers, although the standard method, two’s complement notation, also works well enough.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [June 26, 2005, 1:17am UTC](https://boards.straightdope.com/t/base-0-or-1/309825/10 "2005-06-26T01:17:14Z")

</div>

> [@TJdude825](#):
>
> Hm, I think I see how to do a base -2 system, but I can’t imagine why it would be useful. Can you explain?

Because you don’t need a sign bit to indicate whether your number is negative, you can represent roughly twice as many numbers with the same number of bits.

I remember seeing algorithms for addition, subtraction and multiplication, but I have not seen a division algorithm in base -2.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [June 26, 2005, 1:48am UTC](https://boards.straightdope.com/t/base-0-or-1/309825/11 "2005-06-26T01:48:54Z")

</div>

> [@ultrafilter](#):
>
> Because you don’t need a sign bit to indicate whether your number is negative, you can represent roughly twice as many numbers with the same number of bits.

We don’t use sign bits now except in floating-point numbers. Most computers use twos-complement arithmetic for integer math.

And in a larger sense, _n_ bits can only represent 2[sup]_n_[/sup] unique states. There isn’t any way to wring more out of the bit width: Every time you add range at one end you take away range at the other.

---

<div class="post-metadata">

**Author:** ![Canadjun](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@Canadjun](https://boards.straightdope.com/u/Canadjun)\
**Post date:** [June 26, 2005, 12:18pm UTC](https://boards.straightdope.com/t/base-0-or-1/309825/12 "2005-06-26T12:18:47Z")

</div>

> [@Derleth](#):
>
> We don’t use sign bits now except in floating-point numbers. Most computers use twos-complement arithmetic for integer math.

You’re correct that we use normally use two’s complement for integer math, but you still have a sign bit to decide whether you are talking about a positive or negative number; it’s just that you treat it exactly the same way as all the other bits when doing math rather than doing one thing if it is 0 and something different if it is 1.
