# What are Number systems? How to convert one number system into another?

Page Contents

## Introduction

The system of writing numbers is known as number system. In digital electronics number systems are used for operations.

In any number system the left most digit of a number that has the highest positional value is called as most significant digit (MSD) and the right most digit of that number that has the lowest positional value is called as least significant digit (LSD).

Here we are going to discuss four major number systems used in digital systems.

• Decimal number system
• Binary number system
• Octal number system

Difference between analog and digital systems

What is IGBT?

Introduction to Pneumatic systems

Clipper circuit using diode

### Decimal number system:

We have already studied this number system. We started studying number by decimal number system. In our day to day calculations we use decimal number system. This number system has ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. We can represent any kind of number using these symbols. As this number system has ten symbols, the base or radix of this system is ten.

This system has both integer and fractional parts and divided by a decimal point.

The value of a decimal number depends on the positional weight of that number as shown below.

Consider a mixed decimal number 8579.564, the value of this number according to position weight can be-

8579.564 =

=

= 8000 + 500 + 70 + 9 + 0.5 + 0.06 + 0.004

= 8579.564

#### 9’s complement and 10’s complement:

In decimal number system 9’s complement and 10’s complement method is used for subtraction. 9’s complement of a number can be acquired by subtracting each digits of that number from 9. 10’s complement of a number can be acquired by adding a 1 to the 9’s complement of that number.

#### 9’s complement method of subtraction:

In this method the 9’s complement of subtrahend is obtained and added to the minuend. If a carry arrives in the result, the answer is positive. That carry is added to the LSB of the result to get final result. If no carry arrives in the result, the answer is negative. Take 9’s complement of the result to get the final result.

#### 10’s complement method of subtraction:

In this method the 10’s complement of the subtrahend is obtained and added to the minuend. If a carry arrives in the result, the answer is positive. That carry is ignored. The obtained result is the final result.  If no carry arrives in the result, the answer is negative. Take 10’s complement of the result to get the final result.

### Binary Number System:

Binary means two, so this system has two symbols- 0 and 1. The base or radix of this system is two. The digits used in a binary number are called bits.

Binary number system used in digital computers, because digital computers use switching circuits that have only two possible states. These two states can be represented by the two binary symbols – 0 and 1.

This system has both integer and fractional parts and separated by a binary point.

The rules for binary addition are-

0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 10

Example: 10110+11010= 110000

#### Binary subtraction:

The rules for binary subtraction are –

0 – 0 = 0, 0 – 1 = 1, 1 – 0 = 1, 1 – 1 = 0

Example: 1110011 – 111001 = 111010

#### Binary multiplication:

The rules for binary multiplication are-

0 x 0 = 0, 0 x 1 = 0, 1 x 0 = 0, 1 x 1 = 1

Example: 1101 x 101 =1000001

#### Binary division:

Binary division has the same rules and procedure that used in decimal number system.

Example: 101101 / 110 = 111.1

#### 1’s complement and 2’s complement:

In binary number system 1’s complement and 2’s complement is used for subtraction. 1’s complement of a number can be obtained by complementing all digits of that number, which is changing all 0s to 1s and all 1s to 0s. 2’s complement of a number can be obtained by adding a 1 to the 1’s complement of that number.

###### Example 1:

Get 1’s complement of 18.

Solution:-

Given decimal number – 18

Convert it to binary –

18 = 00010010

Now complement each bit of the binary number –

00010010

11101101

Therefore 1’s complement of 18 is 11101101

#### 1’s complement method of subtraction:

In this method of subtraction the 1’s complement of the subtrahend is obtained and added to the minuend. The MSB of the result defines the sign of the result. If the MSB is 0, the result is positive and that is the final result. If the MSB is 1, the result is negative and 1’s complement of the result is obtained and that is the final result. If a carry arrives in result, add that carry to the LSB of the result. This carry is called end around carry.

#### 2’s complement method of subtraction:

In this method of subtraction the 2’s complement of the subtrahend is obtained and added to the minuend. The MSB of the result define the sign of the result. If the MSB is 0, the result is positive and that is the final result. If the MSB is 1, the result is negative and 2’s complement of the result is obtained and that is the final result.    If a carry arrives in result, that carry is ignored.

### Octal number system:

Octal means 8. So the base or radix of this system is eight and has eight symbols – 0, 1, 2, 3, 4, 5, 6 and 7. As the base of this system is 8=2^3, we can represent every 3 digits of a binary number by an octal digit. The large binary numbers are represented in octal for easy understanding.

Binary numbers are good for computers but difficult for humans. So for human interpretation hexadecimal number system developed. This number system became popular, because this system allows direct communication between human and computer. In fact it is most commonly used number system in computer languages.

Hexadecimal system has 16 symbols- 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. So the base or radix of this system is 16. We can represent every 4 digits of a binary number by one hexadecimal symbol, as the base 16=2^4. In computer the words are 8 bits, 16 bits, 32 bits and so on. Therefore using hexadecimal system these can easily represented.

### Decimal to binary conversion:

To convert a decimal number to binary we need to continuous divide integer part of that number by 2 and multiply the fractional part of that number by 2 continuously. This method of conversion is called double-dabble method.

### Binary to decimal conversion:

To convert a binary number to decimal we need to multiply each digit of that number with its position weight and add products to get the decimal number.

###### Example 1:

Convert the binary number $\left(1100000{\right)}_{2}$ to decimal.

Solution:-

Given binary number – 1100000

Multiply the digits of the binary number with their position weights to get the decimal number –

1100000 =

= 64 + 32 + 0 + 0 + 0 + 0 + 0

= 96

Therefore

###### Example 2:

Convert the binary number $\left(10110010.01{\right)}_{2}$ to decimal.

Solution:-

Given the binary number – 10110010.01

Multiply the digits of the binary number with their position weights to get the decimal number –

10110010.01 =

= 128 + 0 + 32 + 16 + 0 + 0 + 2 + 0 + 0 + 0.25

= 178.25

Therefore

### Decimal to octal conversion:

To convert a decimal number to octal we need to divide the integer part by 8 continuously and multiply the fractional part of that number by 8 continuously.

### Octal to decimal conversion:

To convert an octal number to decimal, multiply each digit of that number with its position weight and add the products to get the decimal number.

###### Example 1:

Convert the octal number $\left(262.2{\right)}_{8}$ to decimal.

Solution:-

Given octal number – 262.2

Multiply the digits of the octal number with their position weights to get the decimal number –

262.2 =

= 128 + 48 + 2 + $\left(2×0.125\right)$

= 178 + 0.25

= 178.25

Therefore

###### Example 2:

Convert the octal number $\left(140{\right)}_{8}$ to decimal.

Solution:-

Given octal number – 140

Multiply the digits of the octal number with their position weights to get the decimal number –

140 =

= 64 + 32 + 0

= 96

Therefore

To convert a decimal number to hexadecimal we need to divide the integer part by 16 continuously and multiply the fractional part of that number by 16 continuously.

###### Example 2:

To convert a hexadecimal number to decimal, multiply each digit of that number with its position weight and add the products to get the decimal number.

###### Example 1:

Convert the hexadecimal number $\left(60{\right)}_{16}$ to decimal.

Solution:-

Multiply the digits of hexadecimal number with their position weights to get the decimal number –

60 =

= 96 + 0

= 96

Therefore

###### Example 2:

Convert the hexadecimal number $\left(B2.4{\right)}_{16}$  to decimal.

Solution:-

Multiply the digits of the hexadecimal number with their position weights to get the decimal number –

B2.4 =

= 176 + 2 + $\left(4×0.0625\right)$

= 178 + 0.25

= 178.25

Therefore

To convert a binary number to hexadecimal make groups of every 4 bits starting from the left side and replace each group by its equivalent hexadecimal digit.

###### Example 1

Convert the binary number $\left(1100000{\right)}_{2}$ to hexadecimal.

Solution:-

Given the binary number – 1100000

Arrange the bits of the number in to group of four bits –

0110    0000

Now write the equivalent hexadecimal digits for each group –

0110  0000

6        0

Therefore $\left(1100000{\right)}_{2}$  = $\left(60{\right)}_{16}$

###### Example 2

Convert the binary number $\left(10110010.01{\right)}_{2}$ to hexadecimal.

Solution :-

Given binary number -10110010.01

Arrange the bits of the binary number in groups of four bits –

1011       0010  .    0100

Now write the equivalent hexadecimal digits for each group.

1011       0010  .  0100

B               2     .     4

Therefore $\left(10110010.01{\right)}_{2}$$\left(B2.4{\right)}_{16}$

To convert a hexadecimal number to binary replace each digit of that number with 4 binary digits.

###### Example 1:

Convert the hexadecimal number $\left(60{\right)}_{16}$ to binary.

Solution:-

Write the equivalent binary bits for each digit of the hexadecimal number.

6                     0

0110                0000

Therefore $\left(60{\right)}_{16}$$\left(01100000{\right)}_{2}$

###### Example 2:

Convert the hexadecimal number $\left(B2.4{\right)}_{16}$ to binary.

Solution:-

Write the equivalent binary bits for each digit of the hexadecimal number.

B              2  .      4

1011      0010 .  0100

Therefore $\left(B2.4{\right)}_{16}$$\left(10110010.0100{\right)}_{2}$

### Binary to octal conversion:

To convert a binary number to octal make groups of every 3 bits starting from the left side and replace each group by its equivalent octal digit.

###### Example 1:

Convert the binary number $\left(10110010.01{\right)}_{2}$ to octal.

Solution:-

Given binary number -10110010.01

Arrange the number to group of three bits –

010   110  010  . 010

Now write the equivalent octal digits for each group  –

010     110   010  . 010

2         6         2    .   2

Therefore $\left(10110010.01{\right)}_{2}$$\left(262.2{\right)}_{8}$

###### Example 2:

Convert the binary number $\left(1100000{\right)}_{2}$ to octal.

Solution:-

Given binary number – 1100000

Arrange the number to group of three bits –

001    100   000

Now write the equivalent octal digits for each group –

001    100   000

1         4       0

Therefore $\left(1100000{\right)}_{2}$$\left(140{\right)}_{8}$

### Octal to binary conversion:

To convert an octal number to binary replace each digit of that number with 3 binary digits.

###### Example 1:

Convert the octal number $\left(262.2{\right)}_{8}$ to binary.

Solution:-

Given octal number – 262.2

Convert each digit of the octal number to group of three binary digits –

2         6        2   .   2

010      110   010 .  010

Therefore $\left(262.2{\right)}_{8}$$\left(10110010.01{\right)}_{2}$

###### Example 2:

Convert the octal number $\left(140{\right)}_{8}$ to binary.

Solution:-

Given octal number – 140

Convert each digit of the octal number to group of three binary bits –

1        4          0

001    100      000

Therefore $\left(140{\right)}_{8}$  = $\left(1100000{\right)}_{2}$

To convert an octal number to hexadecimal, first convert the octal number to binary then convert that binary number to hexadecimal number.

###### Example 1:

Convert the octal number $\left(262.2{\right)}_{8}$ to hexadecimal.

Solution:-

Given octal number – 262.2

Convert each digit of the octal number in group of three binary bits –

2           6            2.      2

010       110        010.   010

Now arrange the bits in group of four binary bits –

010     110     010 .   010

1011     0010  .    0100

Now write the equivalent hexadecimal digits for each group –

1011       0010  .     0100

B            2  .          4

Therefore $\left(262.2{\right)}_{8}$  = $\left(B2.4{\right)}_{16}$

###### Example 2:

Convert the octal number $\left(140{\right)}_{8}$ to hexadecimal.

Solution:-

Given octal number – 140

Convert each digit of the octal number in group of three binary bits –

1            4              0

001         100          000

Now arrange the binary bits in group of four bits –

001          100      000

0110    0000

Now write the equivalent hexadecimal digits for each group –

0110       0000

6              0

Therefore ${\left(140\right)}_{8}$$\left(60{\right)}_{16}$

To convert a hexadecimal number to octal, first convert the hexadecimal number to binary then convert that binary number to octal number.

###### Example 1:

Convert the hexadecimal number $\left(B2.4{\right)}_{16}$ to octal.

Solution:-

Convert each digit of the hexadecimal number in group of four binary bits-

B                   2   .       4

1011              0010.   0100

Now arrange the bits in group of three bits –

1011       0010   .    0100

010   110    010  .  010

Now write the equivalent octal digits for each group.

010    110   010  .  010

2        6       2   .      2

Therefore $\left(B2.4{\right)}_{16}$$\left(262.2{\right)}_{8}$

###### Example 2:

Convert the hexadecimal number $\left(60{\right)}_{16}$ to octal.

Solution:-

Convert each digit of the hexadecimal number in group of four binary bits –

6            0

0110       0000

Now arrange the bits in group of three bits –

0110    0000

001    100    000

Now write the equivalent octal digits for each group.

001       100     000

1             4         0

Therefore $\left(60{\right)}_{16}$$\left(140{\right)}_{8}$

Please write in the comment box below if you have any doubts.