Numverto logo NUMVERTO
Published: 4 min read By
binary decimal number systems tutorial

How to Convert Decimal to Binary Step by Step

Learn the division-by-2 method to convert any decimal number to binary with clear examples, practice tips, and a free online converter.

Advertisement — Responsive Ad

Introduction

Converting decimal numbers to binary is a core skill in computer science. Every integer you store in a variable, every pixel colour channel, and every network address ultimately maps to binary digits. The standard manual method — repeated division by 2 — works for any positive integer and is commonly tested in BCA, BTech, and GATE exams.

This guide walks through the algorithm, multiple worked examples, and common pitfalls. Verify your answers instantly with our Number System Converter.

The Division-by-2 Method

To convert a decimal number N to binary:

  1. Divide N by 2 and record the quotient and remainder.
  2. Replace N with the quotient.
  3. Repeat until the quotient is 0.
  4. Read remainders from bottom to top — that is your binary number.

The remainder at each step is the next binary digit (LSB first in the division order, but MSB first when read bottom-to-top).

Example 1: Convert 11 to Binary

StepDivisionRemainder
111 ÷ 2 = 51
25 ÷ 2 = 21
32 ÷ 2 = 10
41 ÷ 2 = 01

Reading remainders bottom to top: 1011. Check: (1×8)+(0×4)+(1×2)+(1×1) = 11 ✓

Example 2: Convert 255 to Binary

255 ÷ 2 = 127 R1, continuing until quotient 0 yields eight 1-bits: 11111111. This is the maximum unsigned byte value — also FF in hexadecimal.

Example 3: Convert 42 to Binary

42 → 21 R0 → 10 R1 → 5 R0 → 2 R1 → 1 R0 → 0 R1. Result: 101010.

Why This Method Works

Decimal place values are powers of 10; binary uses powers of 2. Each division by 2 extracts the parity (even/odd) of the current value — that parity is the bit for the current power of 2. Accumulating remainders reconstructs the unique binary representation.

Binary to Hex Shortcut

Once you have binary, group bits in fours from the right and convert each nibble to hex. 101010 → 0010 1010 → 2A hex. See our Binary to Hexadecimal Guide for details.

Real-Life Applications

  • Programming: Setting bit flags and masks in C, Java, and Python
  • Networking: Subnet masks expressed in binary (255.255.255.0 = 11111111…)
  • Digital electronics: Loading register values in microcontrollers
  • Exam preparation: University and competitive exam number system questions

Common Mistakes

  • Reading remainders top-to-bottom instead of bottom-to-top
  • Stopping division one step too early
  • Dropping leading zeros that matter for fixed-width (8-bit) answers
  • Confusing decimal digits with binary digits in the quotient column

Practice with Numverto

Use the Number System Converter — enter a decimal value, select base 10, and view binary output with full step-by-step working. Cross-check homework before submission.

Browse the Binary Table (0–255) for quick reference values.

Frequently Asked Questions

Can I convert decimal fractions to binary?

Yes, but the method differs: multiply the fractional part by 2 and record integer parts. Some fractions (like 0.1) have infinite binary expansions — a topic covered in our IEEE 754 guide.

How do I convert negative decimals to binary?

Computers use two’s complement for signed integers. Convert the absolute value to binary, then apply the 1’s and 2’s Complement Calculator.

What is the binary of 0?

Zero in any base is still zero: 0 in binary.

How many bits do I need for a given decimal range?

For unsigned values 0 to N, you need ⌈log₂(N+1)⌉ bits. Values 0–255 need 8 bits; 0–65535 need 16 bits.

Is there a faster method for exam shortcuts?

Memorise powers of 2 up to 2¹⁰ (1024) and subtract the largest fitting power from your number — useful for mental math but division-by-2 is more systematic for large numbers.

Advertisement — Responsive Ad

Share this article

Learn Faster with Numverto

Explore free number system converters, binary tools, EMI calculators, GST calculators, and educational guides.

About Numverto

Numverto logo

Numverto Editorial Team

Numverto publishes educational content about number systems, computer science concepts, binary arithmetic, financial calculations, EMI formulas, GST calculations, and practical learning resources for students and professionals.

About | Contact | Editorial Policy

Article Metadata

Tags: binary, decimal, number systems, tutorial

Last Updated: February 2026

Related Calculators

Advertisement — Responsive Ad

Related Articles

Popular Tools

View all 13 free tools → · Read tutorials · Number system guide