Decimal calculator is used to convert between Binary, Octal, Decimal and Hexadecimal numbers.

### Decimal, Binary, Octal and Hexadecimal Numbering system

The most common numbering system which exists around us is the decimal numbering system. This system starts from ‘0’ till ‘9’ and again repeats it after 9. The binary system contains two digits ‘0’ and ‘1’. Whereas the octal numbering system comprises of numbers 0-7. The hexadecimal numbering system starts from 0 till 9 and then goes from A to F for 10-15 of the decimal. The table below clearly illustrates the numbering system.

Decimal | Binary | Octal | Hexadecimal |
---|---|---|---|

00 | 0000 | 00 | 0 |

01 | 0001 | 01 | 1 |

02 | 0010 | 02 | 2 |

03 | 0011 | 03 | 3 |

04 | 0100 | 04 | 4 |

05 | 0101 | 05 | 5 |

06 | 0110 | 06 | 6 |

07 | 0111 | 07 | 7 |

08 | 1000 | 10 | 8 |

09 | 1001 | 11 | 9 |

10 | 1010 | 12 | A |

11 | 1011 | 13 | B |

12 | 1100 | 14 | C |

13 | 1101 | 15 | D |

14 | 1110 | 16 | E |

15 | 1111 | 17 | F |

### How to convert the Decimal to other systems

Let’s consider the decimal number 62.

Decimal to binary: For this conversion repeatedly divide 62 by 2 and collect the coefficients from remainders.

Quotient | Remainder | Coefficient | |
---|---|---|---|

62/2 | =31 | + 0 | a_{0} = 0 |

31/2 | =15 | + 1/2 | a_{1} = 1 |

15/2 | =7 | + 1/2 | a_{2} = 1 |

7/2 | =3 | + 1/2 | a_{3} = 1 |

3/2 | =1 | + 1/2 | a_{4} = 1 |

1/2 | =0 | + 1/2 | a_{5} = 1 |

Finally the answer is (62)_{10}=(a_{5}a_{4}a_{3}a_{2}a_{1}a_{0})_{2} = (111110)_{2}

Decimal to Octal: The base number of octal is 8. Now we’ve to repeat the same steps as we did previously but this time we’ve to divide the decimal by 8.

Quotient | Remainder | Coefficient | |
---|---|---|---|

62/8 | =7 | + 6 | a_{0} = 6 |

7/8 | =0 | + 7 | a_{1} = 7 |

So, we can express the decimal 62 as octal 76. (62)_{10}=(a_{1}a_{0})_{8} = (76)_{8}

Decimal to Hexadecimal: The hexadecimal has a basenumber 16. Let’s apply the same method with 16.

Quotient | Remainder | Coefficient | |
---|---|---|---|

62/16 | =14 | + 6 | a_{0} = 6 |

7/8 | =0 | + 7 | a_{1} = 7 |

### How to convert Octal to Other Systems

Let’s consider the octal number 72. Since octal numbers are of base 8.

The easiest way to convert an octal number to other systems is to convert in binary and then in other systems.

Octal to Binary: Each octal number is equal to a three digit binary equivalent number. Here 2 equals the binary equivalent 010 and 7 equals the binary equivalent 111. So 72 will be:

Finally, the answer is (72)_{8}=(111 010)_{2}

Octal to Hexadecimal: To achieve this conversion write the octal number in terms of binary. Each octal number is equal to three digit binary equivalent, whereas each hexadecimal equals a four-digit binary. Now,

(72)_{8}=(111 010)_{2 }as =(0011 1010)_{2 }d

The binary 1010 in Hexadecimal is A and binary 0011 is hexadecimal of 3. So (0011 1010)_{2 }= (3A)_{16}d

Octal to Decimal: Convert the octal to binary and then binary to decimal.

(72)_{8 }= (111 010)_{2 }= ( ( 1*2^{5}) + ( 1*2^{4}) + ( 1*2^{3}) + ( 0*2^{2}) + ( 1*2^{1}) + ( 0*2^{0}))_{10}a = ( 58)_{10}

### How to Convert Hexadecimal to other number systems

Each Hexadecimal number is a four-digit binary decimal. The conversion from HEX to other systems is similar to the octal. Convert the HEX number to binary and then you can acheive:

Hexadecimal to decimal

Hexadecimal to octal conversions