Curious about how to convert numbers from hexadecimal to binary as quick as possible? I’ve got good news for you, the following post contains methods to help you accomplish exactly that!

## 1.0 Conversion of Akin Bases

Assume we have to convert from one base to another ().

### 1.1 Higher Base to Lower Base

If we have to convert two bases in the form of , then simply convert each digit from base to base . Add leading zeroes to each converted digit until the length of has been reached. The last step is to combine them.

Example:

Each digit gets converted to binary and the last two resulting binary numbers also get leading zeroes (as ).

### 1.2 Higher Base to Lower Base

Furthermore, if we have to convert two bases in the form of , then simply split the number in base in intervals of digits. Proceed to convert the resulting numbers from base to base .

Example:

The former number gets split in two-digit intervals (as ). The resulting numbers finally get converted from base to base .

## 2.0 Conversion of Different Bases

If both bases do not have any correlation as seen above, proceed to use the following algorithm:

- Divide the given number with the target base ( has to be converted to base first).
- Remember the remainder
- Repeat step 1 with the result of the previous division (not the remainder!) until it becomes 0

Combine the remainders from **bottom to top** to get the desired result.

## 2.1 Power Of Two

There’s another trick that we can apply to the algorithm from **2.0** when the base of is a power of two:

Example: Convert the given number to octal ().

Given number: , base:

The last digits are the remainder, the first ones are essentially the division results (the sections are divided by |).

Remainder:

Remainder:

Remainder:

Read from **top to bottom** instead of bottom to top!

## Leave a Reply