Finding the least significant bits in different bases

42 Views Asked by At

I have this number 1547882635 and I want to find the least significant bits of it in different bases. I know I can find it like for base4 I can turn the 2635 to base4 and take the 3 right most digits and it is the same digits as my main number. But why? why do we take the last 4 decimals ? is there any rule or explanation? I'm not that good at math so any help is appreciated. Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

This only works for your particular number because the next two digits are $8$ and that's a multiple of $4$. In general, only the last two digits in base $4$ are unchanged if you change (or remove) decimal digits from the fifth digit upward.

The last two are invariant because each factor of $10$ contains a factor of $2$, so $10000$ contains $4$ factors of $2$, and thus $2$ factors of $4$, so it has zeros in the last two digits in base $4$. Thus you can add (or subtract) any multiple of $10000$ without changing the last two digits in base $4$.

This only works in bases with prime factors $2$ and/or $5$.