On Sun, Nov 17, 2002 at 03:01:08PM +0200, Markus Laire wrote: > On 15 Nov 2002 at 12:02, Dave Whipp wrote: > > > A couple more corner cases: > > > > $a = 1:0; #error? or zero > > Shouldn't base-1 be: > > 1:0 == 10:0 > 1:1 == 10:1 > 1:11 == 10:2 > 1:111 == 10:3 > 1:1010111 == 10:5 > etc..
Nope. Remember, for any N, base N consists of the digits from 0 up to N-1. So, in base 2 (binary), you may only use the numbers 0 and 1. In base 10 (decimal), you may only use the digits from 0-9. And so on. Therefore, in base 1, you can only use the digit 0. (Actually, I think base 1 is a corner case--you only get one digit, but that digit is 1, so you can represent any number N by making N tally marks.) >Also 0:0 == 10:0 In base 0, you would get no digits at all, so you can't represent anything...which makes sense: after all, how many times must you multiply 0 by itself to represent the decimal number 10? --Dks