Number system is the type of numerals used to define different quantities in a unique way. In general, we do use the decimal system where all the numbers are represented in base of 10. It does use numbers from 0 to 9. When it comes to digital computers there are different ways of representing a number, the primary one being the binary system. It has a base of 2 as there are only two digits, 0 and 1, to represent any quantity. |

Let us take an example of a binary data. We have a binary number 101.

The value of the rightmost digit is 1, for the digit next to it the value is 2 times the data entered there, for the next one it is 4 times the data entered there.

101 = 1.2

^{2}+ 0.2

^{1}+ 1.2

^{0}= 1.4 + 0.2 + 1.1 = 4 + 0 + 1 = 5.

Let us take a decimal number and understand how this works. We have a number 3102.

3102 = 3.10

^{3}+ 1.10

^{2}+ 0.10

^{1}+ 2.10

^{0}= 3000 + 100 + 0 + 2 = 3102.

Here, value at each position is 10 times the value at its right. Hence, the digit values increase in powers of 10.

Binary data has only two outcomes. It can be used in statistics and probability to show two outcomes, that is, True and False, or Yes and No.

In computers a one bit can have two values, 0 or 1. Eight bits make one byte and the binary encoding of computers are mostly done in bytes. For

*n*bits the number of possible codes can be 2

^{n}as for each bit the value can be 0 or 1, that is, two possible values. So, for n bits the values can be 2.2.2... up to

*n*times = 2

^{n}.

In digital systems we have two more important number systems called hexadecimal and octal systems. In hexadecimal system, the base is of 16, and the values 10, 11, 12, 13, 14, 15 are taken as A, B, C, D, E, F respectively. Values 0 to 9 are taken as such only.

If a value has to be changed from binary to hexadecimal, following steps are taken:

**1)**Take four bits at a time.

**2)**Change them to decimal.

**3)**If the values come more than 9 and up to 15, give them the hexadecimal values.

Let us see by an example. Take 11001111. Divide 4 bits in one part.

1111 = 15 = F

1100 = 12 = C

Hence, (11001111)

_{2}= (CF)

_{16}

There is one more number system used in digital world which is known as octal system. It has a base of 8. To change binary to octal following steps are taken.

1. Take three bits at a time.

2. Change them to decimal.

3. Write the decimal values together.

Take an example of 111011001 and change it to octal.

111 = 7

011 = 3

001 = 1

Hence, (111011001)

_{2}= (731)

_{8}.

To change octal and hexadecimal numbers into binary, take each digit and change it to binary data of 3 bits and 4 bits respectively. Take an example of (15)

_{16}and change it to binary. Binary value of 5 = 101. Changing it to 4 bits we get, 0101 as adding a zero to left will make no difference in the value. Similarly, 1 = 0001.

Hence, binary value will become (0001 0101)

_{2}.

_{}We need to convert binary data to decimal and decimal to binary. For converting decimal to binary we need to follow the given steps:

**Divide the number by 2 and note the remainder.**

__Step 1:__**Divide the quotient by 2 again and note the remainder.**

__Step 2:__**Keep repeating step 2 till the quotient becomes zero.**

__Step 3:__**Starting with the bottom remainder, write the sequence of remainders to get the binary value.As an example, change 23 into binary.**

__Step 4:__1. 23 ÷ 2 = 11, remainder = 1

2. 11 ÷ 2 = 5, remainder = 1

3. 5 ÷ 2 = 2, remainder = 1

4. 2 ÷ 2 = 1, remainder = 0

5. 0 ÷ 2 = 0, remainder = 1

Hence, binary form is 10111.

Now, we will see the conversion of binary to decimal. We take 10111 and change it to its decimal value.

10111 = 1.2

^{4}+ 0.2

^{3}+ 1.2

^{2}+ 1.2

^{1}+ 1.2

^{0}= 1.16 + 0.8 + 1.4 + 1.2 + 1.1 = 16 + 0 + 4 + 2 + 1 = 23.

**Example 1:**Change 35 into binary data.

**Solution:**Divide 35 by 2 and keep dividing the quotients by 2 till the quotients become zero.

35 ÷ 2 = 17, remainder = 1

17 ÷ 2 = 8, remainder = 1

8 ÷ 2 = 4, remainder = 0

4 ÷ 2 = 2, remainder = 0

2 ÷ 2 = 1, remainder = 0

1 ÷ 2 = 0, remainder = 1

Hence, binary = 100011.

**Example 2:**Change 11001 to decimal form.

**Solution:**Each digit's value will increase in powers of 2.

11001 = 1.2

^{4}+ 1.2

^{3}+ 0.2

^{2}+ 0.2

^{1}+ 1.2

^{0}= 1.16 + 1.8 + 0.4 + 0.2 + 1.1 = 16 + 8 + 0 + 0 + 1 = 25.

**Example 3:**Change the octal number (215)

_{8}into binary.

**Solution:**To change into binary we will take each digit and find its binary counterpart.

2 = 10 = 010

1 = 1 = 001

5 = 101

Hence, (215

^{)}

_{8}= (010001101)

_{2}.

**Example 4:**Change (11100100111)

_{2}into hexadecimal.

**Solution:**Take 4 bits each, 111 0010 0111

0111 = 7

0010 = 2

111 = 0111 = 7

Hence, hexadecimal value is (727)

_{16}.