Skip to main content
Calkulon
Back to Guides
6 min read5 Steps

How to Convert Between Binary, Decimal, Hexadecimal, and Octal: Step-by-Step Guide

Learn to manually convert between binary, decimal, hexadecimal, and octal number systems with formulas, worked examples, and common pitfalls.

Skip the math — use the calculator

Step-by-Step Instructions

1

Identify Your Starting and Target Number Systems

First things first, clearly define which number base you're converting *from* (e.g., binary, decimal, hex, octal) and which base you want to convert *to*. This determines the method and base value you'll use in your calculations.

2

Convert to Decimal (If Not Already Decimal)

If your starting number is binary, octal, or hexadecimal, convert it to decimal (Base-10) using the **weighted sum method**. Multiply each digit by its base raised to the power of its position (starting from 0 on the right) and sum the results. For hexadecimal, remember A-F represent 10-15.

3

Convert from Decimal to Your Target Base

If your target base is not decimal, and you've completed Step 2 (or started with a decimal number), use the **repeated division with remainder method**. Divide your decimal number by the target base, note the remainder, then divide the quotient by the base again, repeating until the quotient is 0. Read the remainders from bottom to top to form your new number.

4

Utilize Grouping for Binary, Octal, and Hex (Directly)

For quick conversions between binary, octal, and hexadecimal, use the **grouping method**. To go from binary to octal, group binary digits in threes (from right to left). For binary to hexadecimal, group in fours. Convert each group to its respective octal/hex equivalent. To go the other way, expand each octal/hex digit into its 3-bit/4-bit binary equivalent.

5

Verify Your Conversion

Always double-check your work! Reread your calculations, especially your powers of the base and hexadecimal letter values. A good way to verify is to convert your final answer back to the original number system to see if it matches. For complex conversions, an online tool can offer a quick verification.

Hello there, number enthusiast! Ever wondered how computers understand 0s and 1s, or how those tricky hexadecimal codes work? You're in the right place! Understanding how to convert between different number systems like binary, decimal, hexadecimal, and octal is a fundamental skill in computing and engineering. While online converters are super handy, knowing the manual process helps you truly grasp the underlying logic. Let's dive in and master these conversions together!

Prerequisites

Before we begin, it's helpful to have a basic understanding of:

  • Place Value: The concept that the position of a digit in a number determines its value (e.g., in 123, the '1' means 100, not just 1).
  • Exponents: How powers work (e.g., 2^0 = 1, 2^1 = 2, 2^2 = 4).

Understanding Number Systems: The Base

Each number system has a 'base' which defines how many unique digits it uses before rolling over to the next place value. Our everyday number system is Decimal (Base-10), using digits 0-9. Here are the others we'll explore:

  • Binary (Base-2): Uses only two digits: 0 and 1.
  • Octal (Base-8): Uses eight digits: 0-7.
  • Hexadecimal (Base-16): Uses sixteen 'digits': 0-9 and then A, B, C, D, E, F (where A=10, B=11, C=12, D=13, E=14, F=15).

The key to all conversions is understanding place value based on the system's base. For any number, each digit's value is multiplied by the base raised to the power of its position, starting from 0 for the rightmost digit.

Converting from Any Base to Decimal (Base-10)

This is often the easiest starting point for any non-decimal number. You'll use the weighted sum method.

Formula:

Decimal Value = (d_n * Base^n) + ... + (d_2 * Base^2) + (d_1 * Base^1) + (d_0 * Base^0)

Where d is the digit and n is its position (starting from 0 on the right).

Worked Example: Binary to Decimal

Let's convert the binary number 1101_2 to decimal.

  1. Identify the digits and their positions (from right to left, starting at 0):

    • 1 at position 3 (2^3)
    • 1 at position 2 (2^2)
    • 0 at position 1 (2^1)
    • 1 at position 0 (2^0)
  2. Apply the formula: (1 * 2^3) + (1 * 2^2) + (0 * 2^1) + (1 * 2^0) (1 * 8) + (1 * 4) + (0 * 2) + (1 * 1) 8 + 4 + 0 + 1 = 13

So, 1101_2 is 13_10.

Worked Example: Hexadecimal to Decimal

Let's convert 2A_16 to decimal.

  1. Identify digits and positions:

    • 2 at position 1 (16^1)
    • A (which is 10) at position 0 (16^0)
  2. Apply the formula: (2 * 16^1) + (10 * 16^0) (2 * 16) + (10 * 1) 32 + 10 = 42

So, 2A_16 is 42_10.

Converting from Decimal (Base-10) to Any Other Base

For this, we use the repeated division and remainder method.

Method: Divide the decimal number by the target base. Note the remainder. Then, divide the quotient by the target base again, and note its remainder. Repeat until the quotient is 0. The new number is formed by reading the remainders from bottom to top.

Worked Example: Decimal to Binary

Let's convert 13_10 to binary.

  1. 13 / 2 = 6 remainder 1
  2. 6 / 2 = 3 remainder 0
  3. 3 / 2 = 1 remainder 1
  4. 1 / 2 = 0 remainder 1

Read the remainders from bottom to top: 1101. So, 13_10 is 1101_2.

Worked Example: Decimal to Hexadecimal

Let's convert 42_10 to hexadecimal.

  1. 42 / 16 = 2 remainder 10 (which is A in hex)
  2. 2 / 16 = 0 remainder 2

Read remainders bottom to top: 2A. So, 42_10 is 2A_16.

Direct Conversion Between Binary, Octal, and Hexadecimal

These conversions are special because their bases are powers of 2 (2^1, 2^3, 2^4). This allows for a quicker grouping method.

Binary to Octal

Group binary digits into sets of three (from right to left), then convert each group to its octal equivalent.

Example: Convert 110101_2 to octal.

  1. Group into threes: 110 101
  2. Convert each group to decimal (which is its octal equivalent):
    • 110_2 = (1*4) + (1*2) + (0*1) = 6_8
    • 101_2 = (1*4) + (0*2) + (1*1) = 5_8

So, 110101_2 is 65_8.

Binary to Hexadecimal

Group binary digits into sets of four (from right to left), then convert each group to its hexadecimal equivalent.

Example: Convert 110101_2 to hexadecimal.

  1. Group into fours (add leading zeros if needed): 0011 0101
  2. Convert each group to decimal (which is its hex equivalent):
    • 0011_2 = (0*8) + (0*4) + (1*2) + (1*1) = 3_16
    • 0101_2 = (0*8) + (1*4) + (0*2) + (1*1) = 5_16

So, 110101_2 is 35_16.

Conversions from Octal/Hexadecimal to Binary are the reverse: convert each octal/hex digit into its 3-bit/4-bit binary equivalent.

Common Pitfalls to Avoid

  • Forgetting the Base: Always remember which base you're working with for place values and division.
  • Hexadecimal Letters: Don't forget that A-F represent 10-15. A common mistake is using '10' instead of 'A' during conversion.
  • Reading Order: For the division method, always read the remainders from bottom to top.
  • Grouping Direction: When grouping binary digits for octal/hex, always start grouping from the rightmost digit.
  • Miscalculating Powers: Double-check your exponents (e.g., 2^0 is 1, not 0).

When to Use an Online Calculator

While mastering manual conversion is super valuable for understanding, there are times when an online calculator is your best friend:

  • Speed and Efficiency: For quick checks or when dealing with very long numbers.
  • Accuracy for Complex Numbers: To ensure accuracy with large numbers or when you're short on time.
  • Verification: After performing a manual conversion, use a calculator to quickly verify your answer.

Keep practicing, and you'll become a conversion pro in no time! It's a skill that truly unlocks a deeper understanding of how digital systems work.

Ready to Calculate?

Skip the manual work and get instant results.

Open Calculator

Settings

PrivacyTermsAbout© 2026 Calkulon