Jump to content

Bases... what are the limits?


RyanJ

Recommended Posts

Hi everyone!

 

This has been annoying me for a while now, you can have things like base 8, base 6, base 2, base 10 but how about something like base 2.5 for example, would that be valid? (Probably useless but there we go!)

 

Also, would a negative base be valid and would an irrational base be valid too, such as base Pi for example?

 

Cheers,

 

Ryan Jones

Link to comment
Share on other sites

Hi everyone!

 

This has been annoying me for a while now' date=' you can have things like base 8, base 6, base 2, base 10 but how about something like base 2.5 for example, would that be valid? (Probably useless but there we go!)

 

Also, would a negative base be valid and would an irrational base be valid too, such as base Pi for example?

 

Cheers,

 

Ryan Jones[/quote']

 

You could definte a way for your base system to work. Base systems are just ways of representing numbers as multiples of powers of other numbers. The problem in your scenario will rise, however, from describing how digits will work. Using Natual numbers > 1 for bases lets us use the digits we are used to. However a system with base pi would need figure out how to use digits. I wonder if this could be helped with linear algebra...

Link to comment
Share on other sites

You could theoretically use this idea, but it is practically useless. The main thing to remember is that computers only ever use rational numbers for (non-symbolic) calcuation since we can only store a finite amount of bit data. For integer bases, there is no real difference between any choice since we can easily transform between any two systems. There would be now way to translate between a transcendatal base, like pi, and ordinary base 10, say. What is 2 in base pi? it is an infinitely long pi-imal string. That is not a good thing. Better altogether is simply to use symbolic manipulation: [math]\pi[/math] is pi.

Link to comment
Share on other sites

there is no Technical limit for a base, but things do get a little awkward after base 36, higher than that and you have to start using symbols other than our typical alpha-numerics.

but if a convention was established and agreed upon using these arbitrary symbols, then there really is no limit :)

Link to comment
Share on other sites

Right, thanks all - so there are no limits but they are all but useless inmost cases!

 

What about negative bases them? Would they be premitted?

 

Quantum computers are going to be a big thing when they come put, much fastr and far more powerful. Can't wait!

 

Cheers,

 

Ryan Jones

Link to comment
Share on other sites

slap a (-) sign in front of any base and it`ll behave the same way (providing you stick to the same rules as with any - number), it makes no difference :)

 

Great! Thanks for the information - again it has no real use its just out of pure interest :)

 

Cheers,

 

Ryan Jones

Link to comment
Share on other sites

there is no Technical limit for a base' date=' but things do get a little awkward after base 36, higher than that and you have to start using symbols other than our typical alpha-numerics.

but if a convention was established and agreed upon using these arbitrary symbols, then there really is no limit :)[/quote']

 

I would consider after base 62 more awkward since you can use 0-9, A-Z, a-z.

 

Interesting trivia, the babylonians used base 60.

Link to comment
Share on other sites

there is no Technical limit for a base' date=' but things do get a little awkward after base 36, higher than that and you have to start using symbols other than our typical alpha-numerics.

but if a convention was established and agreed upon using these arbitrary symbols, then there really is no limit :)[/quote']

In fact, I have used bases, larger than 36, in software, which I developed for customers. A nice example is code for multiprecision arithmetic. The base is an unsigned integer or unsigned long integer of the underlying processor hardware and multiprecision numbers are stored as arrays of such integers. Each integer in such a representation is a 'digit' in that base.

 

E.g. suppose we have a 32-bit architecture, then the base is 2^32. Each number can be represented as

 

a0 + a1*2^32 + a2*2^64 + a3*2^96 + ....

 

Here the numbers a0, a1, a2, a3, .... are 32-bit numbers. Each of them is a 'digit', with a0 being the last digit of a number, a1 being one digit in front of that, etc.

 

Using such a representation of numbers, one can nicely develop high-speed multi-precision arithmetic code.

 

These representations are not awkward for the simple reason that they do not have to be presented directly in a human-readable form. With such a number-packages, functions need to be provided for conversion from/to base-10, base-16 or whatever convenient base you want. The large number base only exists in computer-memory and only is relevant for the arithmetic routines.

 

So, very high base numbers can be really useful. With the 64-bit processors speed can be doubled again for addition and subtraction and made almost 4 times as fast for multiplication, compared to 32-bit bases and assuming that a single operation runs in the same number of clock cycles.

Link to comment
Share on other sites

It is possible to define a non-integer positive base B > 1 as follows:

 

Given a base B, then digits 0 ... dmax can be defined with dmax the largest integer value less than B. For B equals 4, the digits 0, 1, 2, 3 are allowed. For B equal to pi, also digits 0, 1, 2, 3 are allowed.

 

Any number can be written as a (possibly infinite) series of powers of B, with the terms multiplied by digits.

 

In base pi, the number 0 is written as 0, the number 1 is written as 1, the number pi is written as 10, the number pi^2 is written as 100.

 

This definition is compatible with integer bases and is a reasonable extension.

 

This definition, however, has a very peculiar property. If you approach a power of pi from below, then the digits do not all go to 3333.... after the period, but they make a jump.

 

For base 4, if you go towards 16 from below, then you'll see the following in base 4:

 

33.3333.........

 

When the number 16 (decimal) is reached, then in base 4 you get 100.0000...

 

For base pi the behavior is quite different:

 

When pi*pi is reached from below, you get 30.1102111002022113... and many more irregular digits at the .... and then suddenly the digits jump to 100.00000..... when pi*pi is reached. This is a consequence of the base not being integer.

 

Just for fun, I made a small C++-program, which converts numbers in base 10 to numbers in base pi.

 

Here follows the source. It is not a robust well-designed program (e.g. the input could be much better), but it nicely demonstrates the base pi numbers.

 

Input must be given in decimal notation, e.g. 10 or 3.1415 etc. Wrong input causes the program go astray, as i said, input handling could be much better :D .

 

The source and executable program are attached to this post as zip file. Have fun with your PI-base. It can easily be modified to create any base.

pi.zip

Link to comment
Share on other sites

I wish I could recall where I saw this - but I believe non-integer number base computation is used in some sophisticated data compression algorithms. Normally I don't post stuff I have no reference for but how often will this subject show up?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.