Converting a decimal system in to any base system:

Suppose for example, We have to convert (134)10(134)10 to base 7. Then the following process is to be employed.

So (134)10(134)10 = (251)7(251)7

We can easily convert a number in any base other than 10 to base system 10.

(251)7(251)7 = 2×72+5×7+12×72+5×7+1 = (134)10(134)10

**Find the following table in various base systems:**

**Solved Examples**

**Solved Example 1:**

In base 7, a number is written only using the digits 0, 1, 2, …..6. The number 135 in base 7 is 1 x 7272 + 3 x 7 + 5 = 75 in base 10. What is the sum of the base 7 numbers 1234 and 6543 in base 7.

**Sol:**

In base 7 there is no 7. So to write 7 we use 10. for 8 we use 11…… for 13 we use 16, for 14 we use 20 and so on.

So from the column d, 4 + 3 = 7 = 10, we write 0 and 1 carried over. now 1 + 3 + 4 = 8 = 11, then we write 1 and 1 carried over. again 1 + 2 + 5 = 8 = 11 and so on

**Solved Example 2:**

If in a certain number system the difference of 5333 and 555 is 4445 then the sum of the numbers 5333 and 555 is

**Sol:**

We want to substract 89 from 225 in decimal system.

As 9 is bigger than 5, we borrow 1 from the immediate left digit so 5 becomes 15.

In base system 7 we borrow 1 means, we are borrowing 7. So 10 – 5 = 5. So this substraction has done in base 7.

If we want to add, we follow the same procedure. But in decimal system 3 + 5 = 8, but (8)10=(11)7(8)10=(11)7. We write 1 and take 1 as carry over. Now 1 + 3 + 5 = 9 but (9)10=(12)7(9)10=(12)7, so we write 2 and take 1 carry over. the final solution looks as below

**Solved Example 3:**

53 x 22 = 1276 then (4221)n=()10?(4221)n=()10?

**Sol:**

As we don’t know the base system here we take the base as n. So 53 in base n can be written as 5n+3, and 22 as 2n+2 and 1276 as n3+2n2+7n+6n3+2n2+7n+6

⇒⇒ (5n + 3)(2n + 2) = n3+2n2+7n+6n3+2n2+7n+6

⇒⇒ 10n2+16n+6=n3+2n2+7n+610n2+16n+6=n3+2n2+7n+6

⇒⇒ n3−8n2−9n=0n3−8n2−9n=0

⇒⇒ n(n2−8n−9)=0n(n2−8n−9)=0

⇒⇒ (n + 1)(n – 9) = 0

So n = 9

(4221)9=4×93+2×92+2×9+1(4221)9=4×93+2×92+2×9+1

= 3716 + 162 + 18 + 1 = 3897

**Solved Example 4:**

On planet Jupiter the people use a certain number system to the base ‘n’ (n > 2), Jerk, a resident of the planet, one day received twice his daily wage because the digits of this wage, which was a 2 digit number, were reversed. If the value of ‘n’ is the least possible value there the decimal representation of the difference between Jerk’s correct wage for the day is

**Sol:**

Let the base of the number system be n and the two digit number be ab

given 2(ab)n = (ba)n

⇒⇒ nb + a = 2na + 2b

⇒⇒ a(2n – 1) = b(n – 2)

⇒ab=n−22n−1⇒ab=n−22n−1

Now the maximum possible value of a or b is (n – 1) (base n) for n = 3 we get

ab=15ab=15 = which is not possible as in base 3, 5 won’t exist.

Similarly, for n = 4

but for n = 5

We get ab=39i.e.13ab=39i.e.13

a = 1, b = 3 is the only number possible when n is the least possible.

The correct wage = (13)5=(8)10(13)5=(8)10

The actual wage paid = (31)5=(16)10(31)5=(16)10

So difference = 8

**Solved Example 5:**

I take a four-digit number and subtract from it the sum of its digits. In the result I strike off one of the digits and the remaining three digits of the result are 2, 4 and 6 (not necessarily in that order). Find the digit struck off by me.

**Sol:**

Let us assume the four digit number as wxyz. Then in base system 10 it can written as 1000w + 100x + 10y + z. Now given that,

wxyz = 1000w + 100x + 10y + z – (w + x + y + z) = 999w + 99x + 9y which is a multiple of 9

Hence the sum of digits must be a multiple of 9.

Hence 2 + 4 + 6 + x is equal to either 9, 18, 27 …

But if the sum is equal to 9 then x is negative number. Therefore x = 6.

**Solved Example 6:**

Once upon a time in ancient times there was a king who was very found of wines. He had a huge cellar, which had 1000 different varieties of wine all in different caskets (1000 caskets in all). In the adjoining kingdom there was a queen who was envious of the king’s huge wine collection. After some time when she could not bear it any more show conspired to kill her by poisoning all his wine caskets. So she sent one sentry to poison all the caskets, but no sooner had the sentry poisoned only one wine casket, he was caught and killed by the Royal guards. Now the king had a major problem in his hand so as to identify the poisonous casket, which he gave to the Minister. But the situation had two peculiarities.

I: Any one who takes even one drop from the poisonous casket will die.

II: He will die only after one month.

The king also handed over few prisoners to the Minister as “taster” of those caskets, as their lives was of little value.

If the Minister is allowed only 1 month to find out the poisonous casket, what is the minimum number of prisoners he should use as “tasters”?

**Sol:**

Study the following table carefully. Each of the prisoners drinks wine from whichever casket has a 1 in his place. If he does not drink there is a 0. Suppose there are 8 caskets only, then the testing pattern by the prisoners P1,P2,P3P1,P2,P3 can be represented as

So if no one dies, Casket 1 is poisoned.

If P1 dies, casket 2 is poisoned.

If P1 and P3 die ⇒⇒ casket 6 is poisoned and so on.

So, if there are 3 prisoners, we can differentiate upto 2323 =8 caskets.

So for 1000 caskets [even 1024 caskets], we need only 10 prisoners as 210210 = 1024

**Solved Example 7:**

A three digit non-zero number ‘abc’ in base 5, when converted to base 7, becomes ‘cba’. Which of the following is necessarily true?

1. a must be 2

2. c must be 2

3. b must be 0

4. None

**Sol:**

Given (abc)5=(cba)7(abc)5=(cba)7

or 25a + 5b + c = 49c + 7b + a

or 24a = 2b + 48c

or 12a = b + 24c

as abc is a 3 digit number in base 5, the possible values for a, b and c are 0, 1, 2, 3, 4 only

The possible solutions of the above equation are:

(a, b, c) = (2, 0, 1) and (4, 0, 2) only

a can take value = 2 or 4

b can take value = 0 only

c can take value = 1 or 2 only.

So correct option 3.