# Base Conversion in Number System

Base Conversion in Number System: In previous topic, we have learnt about different number systems. In this topic, we will learn how to convert one number system into another, such as Binary number to Decimal, and this process is called Base conversion.

Need for Base Conversion

In the real world, let suppose there are two persons, one is proficient in the German language, and the other is proficient in the English language. If both the persons wish to communicate with each other, they require a translator to convert English to German and vice-versa. Similarly, in digital systems, most of the circuits use a binary number system. But some people understand the digital number system easily. So, there is a need for a translator to convert the data from one number system to another. Encoders and decoders are widely used for the conversion.

For example, calculators contain encoders and decoders to convert the data electronically from decimal to binary and vice-versa.

### Block diagram using encoder and decoder

Let’s see different base conversions with example:

### Binary to Decimal conversion

The conversion of binary to decimal can be performed simply by summing together, the integral and fractional parts are multiplied by ‘2i where the value of ‘i’ depends on the position.

### Decimal to Binary conversion

Divide the integral parts repeatedly by ‘2’ and write down the remainders after every division until ‘0’ is obtained as a quotient.

For the fractional part, multiply by the fraction part by ‘2’ until we obtain ‘1’ as a result.

### Binary to Octal conversion

Binary bits are grouped into groups of three, initiated from LSB for an integral part, and the fractional part grouping initiates from MSB.

### Octal to Binary conversion

Octal bits are split into groups of three initiated from LSB for an integral part, and the fractional part grouping initiates from MSB.

### Decimal to Octal conversion

Divide the integral parts repeatedly by ‘8’ and write down the remainders after every division until ‘0’ is obtained as a quotient.

For the fractional part, multiply by the fraction part by ‘8’ until we obtain ‘1’ as a result.

### Decimal to Hexadecimal conversion

Divide the integral parts repeatedly by ‘16’, and write down the remainders after every division until ‘0’ is obtained as a quotient.

For the fractional part, multiply by the fraction part by ‘16’ until you obtain ‘1’ as a result.

### Binary to Hexadecimal conversion

Binary bits are grouped into groups of four initiated from LSB for an integral part, and the fractional part grouping initiates from MSB.

### Hexadecimal to Binary conversion

Hexadecimal bits are split into groups of four initiated from LSB for an integral part, and the fractional part grouping initiates from MSB.