## Converting to Decimal from another Base

In order to convert from another number system(Binary, octal, and hexadecimal) to decimal number system, you should follow these steps.

__Steps:__

Step 1: determine the positional value of each digit from the right most digits.

Step 2: Multiply the positional value by the digits in the corresponding columns.

Step 3: Sum the products obtained in step 2. The total is the equivalent value in decimal.

### Binary to Decimal

Example 1: 11002 =? 10

Digit | Positional value (step 1) | Step 2 |

0 (right most digit) | 20 | 0*2^{0} |

0 | 21 | 0*2^{1} |

1 | 22 | 1*2^{2} |

1 | 23 | 1*2^{3} |

Total (Step 3) | 4+8=12 |

Therefore (1100)2 = (12)10

Example 2: 1010_{2}=? _{10}

= 0*2^{0 }+ 1*2^{1 }+ 0*2^{2 }+ 1*2^{3}

^{ }= 0 + 2 + 0 + 8

= (10)_{10}

### Octal to Decimal

Example 1: (4706)8 =? 10

= 6*8^{0 }+ 0*8^{1 }+ 7*8^{2 }+ 4*8^{3}

= (2502)10

Example 2: (123)_{8} = ? _{10}

= 3*8^{0 }+ 2*8^{1 }+ 1*8^{2}

= 3 + 16 + 64

= (83) _{10}

### Hexadecimal to Decimal

Example 1: (1AC) 16 = ? 10

=C*16^{0 }+ A*16^{1 }+ 1*16^{2}

=12*1 + 10*16 + 256

= (428) 10

Example 2: (123)16 = ? 10

= 3*16^{0} + 2*16^{1} + 1*16^{2}

= 3 + 32 + 256

= (291) _{10}

## Converting from Decimal to a New Base

In order to convert Decimal number system to another number system(Binary, octal, and hexadecimal), you should follow these steps.

__Steps:__

Step 1: Divide the decimal number to be converted by the value of the **new base**.

Step 2: Record the remainder from step 1 as the rightmost digit (least significant digit) of the new base number.

Step 3: Divide the quotient of the previous divide by the new base.

Step 4: Record the remainder from step 3 as the next digit (to the left) of the new base number.

Repeat steps 3 and 4 recording remainders from right to left, until the quotient becomes zero in step 3. Note that the last remainder thus obtained will be the most significant digit (MSD) of the new base number.

# Decimal to Binary

Divisor | Dividend | Remainder |

2 | 25 | 1 |

2 | 12 | 0 |

2 | 6 | 0 |

2 | 3 | 1 |

2 | 1 | 1 |

0 |

Example 1: (25)10 =? 2

In the above example, we are converting the given decimal number to a binary number. Therefore, 25 is the given decimal number, and the new base is 2. In the above table, we divided 25 by 2, and we got a remainder of 1 and a quotient of 12. We should keep dividing the quotient until the quotient becomes zero. The last remainder we obtained will be the most significant digit, which means it will be placed on the left side.

From the given decimal number we obtained 11001 binary numbers.

(25)10 =(11001) 2

Example 2: (66)_{10} = ? _{2}

Divisor | Dividend | Remainder |

2 | 66 | 0 |

2 | 33 | 1 |

2 | 16 | 0 |

2 | 8 | 0 |

2 | 4 | 0 |

2 | 2 | 0 |

2 | 1 | 1 |

0 |

(66)_{10} = (1000010)_{2}

### Decimal to Octal

Example 1: (952)10 =? 8

Divisor | Dividend | Remainder |

8 | 952 | 0 |

8 | 119 | 7 |

8 | 14 | 6 |

8 | 1 | 1 |

0 |

we are converting the given decimal number to a octal number. Therefore, 952 is the given decimal number, and the new base is 8. In the above table, we divided 952 by 8, and we got a remainder of 0 and a quotient of 119. We should keep dividing the quotient until the quotient becomes zero. The last remainder we obtained will be the most significant digit, which means it will be placed on the left side.

From the given decimal number we obtained 1670 Octal numbers.

(952)10 =(1670) 8

**Example 2:** (80)_{10} =?_{8}

Divisor | Dividend | Remainder |

8 | 80 | 0 |

8 | 10 | 2 |

8 | 1 | 1 |

0 |

(80)_{10} =(120)_{8}

### Decimal to Hexadecimal

Example 1: (428)10 =? 16

Divisor | Dividend | Remainder |

16 | 428 | 12 |

16 | 26 | 10 |

16 | 1 | 1 |

0 |

In the above example 428 is the given decimal number, and the base is 16. In the above table, we divided 428 by 16, and we got a remainder of 12 and a quotient of 26. We should keep dividing the quotient until the quotient becomes zero. The last remainder we obtained will be the most significant digit, which means it will be placed on the left side. If the remainder is greater than 9 it should be replaced by characters.

From the given decimal number we obtained 1AC Hexadecimal numbers.

(428)10 = (1 A C)16

Don’t forget to follow gullalle.com, an information provider site.