 # Base 0 or 1 ?!

I was going to tack this onto the thread about pi , but decided that would be a hijack. This site base 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?!

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!

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 = 11 = 1
2= 1
1^2 + 11 = 11
3= 1
1^3+11^2+11=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.

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.

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:
 [-32]  [-8]  [-2] 
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

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.

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.

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.

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.

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.

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.

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.