# Concept: Base System

CONTENTS

- Introduction
- Converting Numbers from One System to Another
- Converting Any Other Base System to Decimal System
- Converting Decimal System to Any Other Base System
- Converting Binary System to Other Base System of the form 2
^{n} - Converting Other Base System of the form 2
^{n}to Binary System - Performing Arithmetic Operations
- Converting Decimals

**INTRODUCTION**

The number system we use in our day to day lives is decimal system i.e., we use 10 digits to represent numbers. Those ten digits are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Some of you might be aware that computers use a binary system to represent data i.e., they use only two digits 0 and 1. In general any base system 'n' uses n digits to represent numbers i.e., from 0 till (n-1).

Any number xyz in base n is written as (xyz)_{n}. If base is not mentioned we assume it to be decimal system

For base system greater than 10, digits are represented by letters to avoid confusion. A represents 10, B represents 11, C represents 12 and so on.

Questions in MBA entrance exams are based on two concpets:

1. Conversion of numbers from one base system to another.

2. Arithmetic Operations of numbers in any base system.

**CONVERTING NUMBERS FROM ONE BASE SYSTEM TO ANOTHER**

**CONVERTING ANY OTHER BASE SYSTEM TO DECIMAL SYSTEM**

To convert a number in base 'n' to decimal system we simply multiply each digit of the number starting with unit's digit with successive powers of the base, starting with power 0.

Converting (abcd)_{n} in base 10 = a × n^{3} + b × n^{2} + c × n^{1} + d × n^{0}

**Example**: Convert (2358)_{5} in decimal system

**Solution:**

(2358)_{5} = 2 × 5^{3} + 3 × 5^{2} + 5 × 5^{1} + 8 × 5^{0}

(2358)_{5} = 250 + 75 + 25 + 8

(2358)_{5} = 358

**Example**: Convert (12345)_{2} in decimal system

**Solution:**

(12345)_{2} = 1 × 2^{4} + 2 × 2^{3} + 3 × 2^{2} + 4 × 2^{1} + 5 × 2^{0}

(12345)_{2} = 16 + 16 + 12 + 8 + 5

(12345)_{2} = 57

**Example**: Convert (ABC)_{12} in decimal system

**Solution:**

(ABC)_{2} = A × 12^{2} + B × 12^{1} + C × 12^{0}

(ABC)_{2} = 10 × 12^{2} + 11 × 12^{1} + 12 × 12^{0}

(ABC)_{2} = 1440 + 132 + 12

(ABC)_{2} = 1584

**CONVERTING DECIMAL SYSTEM TO ANY OTHER BASE SYSTEM**

To convert a number from decimal to any other base say 'n', we divided the given number successively by 'n' and then write all the remainders in reverse order.

Let us convert 36 in base 2

We first divided 36 by 2. Quotient is 18 and remainder is 0.

Now, we divide 18 by 2. Quotient is 9 and remainder is 0.

Now, we divide 9 by 2. Quotient is 4 and remainder is 1.

Now, we divide 4 by 2. Quotient is 2 and remainder is 0.

Now, we divide 2 by 2. Quotient is 1 and remainder is 0.

Now, we divide 1 by 2. Quotient is 0 and remainder is 1.

Finally, we need to write all the remainders in reverse order.

∴ 36 in base 2 = (100100)_{2}

**Example**: Convert (5648) in decimal system to hexadecimal

**Solution:**

We first divided 5648 by 16. Quotient is 353 and remainder is 0.

Now, we divide 353 by 16. Quotient is 22 and remainder is 1.

Now, we divide 22 by 16. Quotient is 1 and remainder is 6.

Now, we divide 1 by 16. Quotient is 0 and remainder is 1.

∴ 5648 = (1610)_{16}

**Example**: Convert (87234) in decimal system to base 11

**Solution:**

87234 / 11 = 7930 with remainder 4

7930 / 11 = 720 with remainder 10 (A)

720 / 11 = 65 with remainder 5

65 / 11 = 5 with remainder 10 (A)

5 / 11 = 0 with remainder 5

∴ 87234 = (5A5A4)_{11}

**Example**: Convert (2763) in decimal system to base 6

**Solution:**

2763 / 6 = 460 with remainder 3

460 / 6 = 76 with remainder 4

76 / 6 = 12 with remainder 4

12 / 6 = 2 with remainder 0

2 / 6 = 0 with remainder 2

∴ 2763 = (20443)_{6}

**Example**: Convert (3210) in decimal system to base 3

**Solution:**

∴ 3210 = (11101220)_{3}

**CONVERTING BINARY SYSTEM TO OTHER BASE SYSTEM OF THE FORM 2**

^{n}To convert a number in binary system to another base system of te form 2^{n}, we just need to club 'n' digits of binary number
starting from unit digit and write the decimal equivalent of each group.

**Example**: Convert (10011001)_{2} in octal system

**Solution:**

Since 8 = 2^{3} we need to club 3 digits of the binary number starting from unit digit and write the decimal equivalent of each group.

(10 011 001)_{2} = (2 3 1)_{8} = (231)_{8}

**Example**: Convert (11100110011001)_{2} in hexadecimal system

**Solution:**

Since 8 = 2^{4} we need to club 4 digits of the binary number starting from unit digit and write the decimal equivalent of each group.

(11 1001 1001 1001)_{2} = (3 9 9 9)_{16} = (3999)_{16}

**Example**: Convert (11100110011001)_{2} in base 4

**Solution:**

Since 8 = 2^{2} we need to club 2 digits of the binary number starting from unit digit and write the decimal equivalent of each group.

(11 10 01 10 01 10 01)_{2} = (3 2 1 2 1 2 1 )_{4} = (3212121)_{4}

**CONVERTING OTHER BASE SYSTEM OF THE FORM 2**

^{n}TO BINARY SYSTEMHere, we need to express every digit of the given number into its binary form comprising of 'n' digits.

**Example**: Convert (1234)_{8} in binary

**Solution:**

8 = 2^{3}, hence we need to express every digit of the given number into its binary form comprising of '3' digits.

(1 2 3 4)_{8} = (001 010 011 100)_{2} = (1010011100)_{2}

**Example**: Convert (1A2B3C)_{16} in binary

**Solution:**

16 = 2^{4}, hence we need to express every digit of the given number into its binary form comprising of '4' digits.

Given (1 A 2 B 3 C)_{16}

(1 10 2 11 3 12)_{16} = (1 1010 0010 1011 0011 1100)_{2} = (110100010101100111100)_{2}

**PERFORMING ARITHMETIC OPERATIONS**

**ADDITION**

For adding numbers in any base system add them as we normally do for decimal numbers and while writing, write each number in the given base system

Example: Add (3)_{4} + (2)_{4}

Here we add 3 and 2 as we normally do in decimal system, i.e., 3 + 2 = 5

Now, while writing we will write 5 in base 4, i.e., (11)_{4}

∴ (3)_{4} + (2)_{4} = (11)_{4}

**Example**: Add (32)_{4} + (12)_{4}

**Solution:**

Given, (32)_{4} + (12)_{4}

**Unit's Digit**: We first add the unit digit of both numbers i.e., 2 + 2 = 4 and write it in base 4, i.e., (10)_{4}

Now, 0 will be the unit's digit of the final answer whle 1 is carried forward.

**Ten's Digit**: Now we add the ten's digit of both the numbers and any carry forward, i.e., 3 + 1 + 1 = 5 and write it in base 4, i.e., (11)_{4}

Now, 11 will be the left most digits of the answer.

∴ (32)_{4} + (12)_{4} = (110)_{4}

**Example**: Add (167)_{8} + (452)_{8}

**Solution:**

Given, (167)_{8} + (452)_{8}

**Unit's Digit**: We first add the unit digit of both numbers i.e., 7 + 2 = 9 and write it in base 8, i.e., (11)_{8}

Now, 1 will be the unit's digit of the final answer whle 1 is carried forward.

**Ten's Digit**: Now we add the ten's digit of both the numbers and any carry forward, i.e., 6 + 5 + 1 = 12 and write it in base 8, i.e., (14)_{8}

Now, 4 will be the ten's digit of the final answer whle 1 is carried forward.

**Hundred's Digit**: Now we add the hundred's digit of both the numbers and any carry forward, i.e., 1 + 4 + 1 = 6 and write it in base 8, i.e., (6)_{8}

Now, 6 will be the left most digit of the answer.

∴ (167)_{8} + (452)_{8} = (641)_{8}

**SUBTRACTION**

For subtracting numbers in any base system subtract them as we normally do for decimal numbers and while writing, write each number in the given base system

**Note**: While borrowing in base 'n', n will be added in the previous place digit.

Example: Calculate (52)_{6} - (13)_{6}

Here, we first subtract unit's digits, i.e., 2 - 3. Since 2 is less than 3 we will have to borrow 1 from 5. When we borrow 1 from 5, 6 (base) will be added in 2.

∴ we have (2 + 6) - 3 = 5. Now we need to write 5 in base 6. Hence, 5 is the unit's digit of the answer

Now, we subtract the ten's digits, since 1 was borrowed from 5 we have (5 - 1) - 1 = 3 and we write it in base 6. Hence, 3 is the ten's digit of the answer.

∴ (52)_{6} - (13)_{6} = (35)_{6}

**Example**: Calculate (452)_{8} - (167)_{8}

**Solution:**

Given, (452)_{8} - (167)_{8}

**Unit's Digit**: We first subtract the unit digit of both numbers i.e., 2 - 7. For this we will have to borrow 1 from 5 and add 8 in 2.

Hence we get, (2 + 8) - 7 = 3.

Now, 3 will be the unit's digit of the final answer.

**Ten's Digit**: Now we subtract the ten's digit of both the numbers. Since we borrowed 1 from 5 we have, (5 - 1) - 6. Here again we will have to borrow 1 from 4 and add 8 in (5 - 1).

Hence, we have (5 - 1 + 8) - 6 = 6.

Now, 6 will be the ten's digit of the final answer.

**Hundred's Digit**: Now we subtract the hundred's digit of both the numbers. Since we borrowed 1 from 4 we have, (4 - 1) - 1 = 2

Now, 2 will be the left most digit of the answer.

∴ (452)_{8} - (167)_{8} = (263)_{8}

**MULTIPLICATION**

For multiplying numbers in any base system, multiply them as we normally do for decimal numbers and while writing, write each number in the given base system

**Example**: Calculate (52)_{8} × (6)_{8}

**Solution:**

Given, (52)_{8} × (6)_{8}

We first multiply 6 with 2 i.e., 2 × 6 = 12 and write it in base 8 = (14)_{8}.

Now, 4 will be the unit's digit of the final answer and 1 will be carried forward.

Now we multiply 6 with 5 and add any carry forward i.e., 5 × 6 + 1 = 31 and write it in base 8 = (37)_{6}

Now, 37 will be the left most digits of the final answer.

∴ (52)_{8} × (6)_{8} = (374)_{8}

**DIVISION**

**DIVISION OF A NUMBER IN BASE n BY (n - 1)**

(x)_{n} is divisible by (n - 1) if the sum of all the digits of (x)_{n} is divisible by (n - 1)

**DIVISION OF A NUMBER IN BASE n BY (n + 1)**

(x)_{n} is divisible by (n + 1) if the difference of the sums of alternate digits of (x)_{n} is either 0 or divisible by (n + 1)

**NUMBER OF ZEROS AT THE END OF A NUMBER IN BASE n**

For a number in base n, if there are k zeroes in the end then it is divisible by n^{k}. Also, k is the highest power of n in the number.

**CONVERTING DECIMALS**

**CONVERTING DECIMALS FROM OTHER BASE TO BASE 10**

(0.abc...)_{n} = a × n^{-1} + b × n^{-2} + c × n^{-3} + ...

**Example**: Convert (0.112)_{5} to base 10

**Solution:**

(0.112)_{5} = 1 × 5^{-1} + 1 × 5^{-2} + 2 × 5^{-3}

⇒ (0.112)_{5} = 0.2 + 0.04 + 0.016

⇒ (0.112)_{5} = (0.256)_{10}

**CONVERTING DECIMALS FROM BASE 10 TO OTHER BASE**

**Step 1**: Multiply the decimal with the base n

**Step 2**: Remove the whole number part after the multiplication. This is the first digit after decimal in base n.

**Step 3**: Repeat step 2 till all the numbers after decimal get exhausted. The whole number after 2^{nd} multiplication is the ten’s place digit,
and after third multiplication, the whole number part is hundredth digits and so on.

**Example**: Convert (0.256)_{10} to base 5

**Solution:**

We first multiply the whole decimal with 5 i.e., 0.256 × 5 = 1.28

Now, 1 will be the first digit after decimal of the answer.

We now multiply 0.28 with 5 i.e., 0.28 × 5 = 1.4

Now, 1 will be the second digit after decimal of the answer.

We now multiply 0.4 with 5 i.e., 0.4 × 5 = 2

Now, 2 will be the third digit after decimal of the answer.

Since no decimal is left now, we will stop the process now.

∴ (0.256)_{10} = (0.112)_{5}