How to Convert Decimal Numbers to Binary and Vice Versa – Easy Guide with Examples

What is Binary?

  • Binary numbers use only two digits: 0 and 1.
  • Computers use binary because their circuits can be ON (1) or OFF (0).
  • Each place in a binary number represents a power of 2 (like 1, 2, 4, 8, 16…).

Part 1: How to Convert a Decimal Number to Binary (Step-by-Step)

Let’s start with the decimal number 13 and change it into binary.

Step 1: Divide the number by 2

  • Take the number (13) and divide it by 2.
  • Write down the remainder (what’s left over after division).

Step 2: Write down the remainder

  • If the number divides evenly, the remainder is 0.
  • If not, the remainder will be 1.

Step 3: Divide the result (quotient) by 2 again

  • Ignore the remainder for this step, only divide the quotient.
  • Repeat Steps 1 and 2.

Step 4: Keep dividing until you get zero as the quotient

Step 5: Write all the remainders from bottom to top

This is your binary number!


Example with number 13:

StepDivideQuotientRemainder
113 ÷ 261
26 ÷ 230
33 ÷ 211
41 ÷ 201

Write remainders from bottom to top: 1101


Part 2: How to Convert Binary to Decimal (Step-by-Step)

Now, let’s change binary 1101 back to a decimal number.

Step 1: Write the binary digits in a row

  • Start from the right (last digit).

Step 2: Assign powers of 2 starting from 0

Binary digitPower of 2
12⁰ = 1
02¹ = 2
12² = 4
12³ = 8

Step 3: Multiply each binary digit by its power of 2

  • Multiply the digit (0 or 1) by the power of 2 value.

Step 4: Add all the results together

  • This is your decimal number!

Example with binary 1101:

DigitPower of 2Multiply (Digit × Power)
181 × 8 = 8
141 × 4 = 4
020 × 2 = 0
111 × 1 = 1

Add them all: 8 + 4 + 0 + 1 = 13

Why Should Beginners Learn This?

  • Binary numbers are how computers understand data.
  • Knowing this helps you in programming, digital electronics, and exams.
  • It’s a simple skill that opens up new ways of thinking about numbers!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *