Base conversion changes how a number is written, never what it's worth. 13₁₀, 1101₂, 15₈ and D₁₆ are the same amount.
There are three kinds of conversion, each with a standard method:
- To decimal, from any base: multiply each digit by its weight and add. See binary to decimal conversion and hex decimal conversion.
- From decimal to base b: divide by b over and over and read the remainders from last to first (repeated division). For binary you can also subtract powers of 2 (decimal to binary conversion).
- Between binary, octal and hex: no arithmetic at all. One hex digit is 4 bits and one octal digit is 3 bits, so you just regroup (binary hex conversion, binary octal conversion). Hex ↔ octal goes through binary (hex octal conversion).
A habit worth keeping for every conversion: convert back to check. It catches the most common slips, like reading remainders in the wrong order or grouping bits from the wrong end.