# Math Related - From how many elements a number consists based on radix

Page 1 of 1

## 2 Replies - 794 Views - Last Post: 09 March 2017 - 07:29 PM

### #1 general656

• D.I.C Regular

Reputation: 12
• Posts: 288
• Joined: 25-March 15

# Math Related - From how many elements a number consists based on radix

Posted 09 March 2017 - 02:54 PM

I've got a little mathematical problem here. Didn't know where else to place it since there is no section about "Algorithms" at their own.

So to describe in short my problem, let's bring a quick example here ... :

Say we have the number 5420.
With a radix of 10 (Decimal System) this number is consisted of this sum:

5420 = (5*10^3) + (4*10^2) + (2*10^1) + (0*10^0)

Well, with a radix of 20 it's :

5420 = (13*20^2) + (11*20^1) + (0*20^0)

The point here is that while 10 goes up to the 3rd power, 20 goes up to the 2nd power.

It's pretty easy to find the maximum power of 10 for a number if it's based on the Decimal System (You just have to count how many digits there are) because our numerical system is constructed as such to be comfortable when working with powers of 10.
But what if we're working with a different radix?

This post has been edited by general656: 09 March 2017 - 02:55 PM

Is This A Good Question/Topic? 0

## Replies To: Math Related - From how many elements a number consists based on radix

### #2 general656

• D.I.C Regular

Reputation: 12
• Posts: 288
• Joined: 25-March 15

## Re: Math Related - From how many elements a number consists based on radix

Posted 09 March 2017 - 03:25 PM

I've found the solution. You can find this by doing the following calculation:

So you just log the number with a base of radix.

### #3 jon.kiparsky

• Chinga la migra

Reputation: 10820
• Posts: 18,475
• Joined: 19-March 11

## Re: Math Related - From how many elements a number consists based on radix

Posted 09 March 2017 - 07:29 PM

The properties of numbers under different bases can be interesting. For example, in grade school I learned to check multiplication by nine by summing the digits of the product - if a number is a multiple of 9, its digital sum is 9.
As it turns out, this is also true for any base b: if a number is a multiple of (b-1), then its representation in base b will have a digital sum of (b-1). You might enjoy searching for a proof for this.