Decimal to Binary Converter

Convert decimal numbers to binary. See step-by-step conversion process.

Decimal: 42

101010

Binary

All Conversions

101010

Binary

52

Octal

0x2A

Hexadecimal

Conversion Steps

Divide by 2 repeatedly, collect remainders from bottom to top:

StepNumber ÷ 2QuotientRemainder
142 ÷ 2210
221 ÷ 2101
310 ÷ 250
45 ÷ 221
52 ÷ 210
61 ÷ 201

Reading remainders from bottom to top: 101010

Common Conversions

10

= 1010

100

= 1100100

255

= 11111111

1000

= 1111101000

What is a Decimal to Binary Converter?

A decimal to binary converter translates numbers from the decimal (base-10) numeral system, which humans use daily, to the binary (base-2) system, which computers use to represent and process all data. Every piece of digital information — text, images, video, software instructions — is ultimately stored and manipulated as sequences of binary digits (bits), each being either 0 or 1. Understanding this conversion is fundamental to computer science, digital electronics, and information theory.

The decimal system uses ten digits (0 through 9) and is positional, meaning each digit's value depends on its position relative to the decimal point. The binary system uses only two digits (0 and 1) but follows the same positional principle. Each binary position represents a power of 2, starting from 2⁰ = 1 on the right and increasing leftward: 2, 4, 8, 16, 32, 64, and so on. The decimal number 42, for example, is expressed in binary as 101010, which represents 32 + 8 + 2 = 42.

This converter not only performs the translation but also displays the step-by-step conversion process, showing each division by 2 and the resulting remainder that forms each binary digit. It also shows the equivalent octal (base-8) and hexadecimal (base-16) representations, which are commonly used as compact representations of binary data in programming and systems engineering.

The Decimal to Binary Conversion Method

The standard method for converting decimal to binary is repeated division by 2, collecting the remainders. The remainders, read from the last division to the first, form the binary number.

Decimal to Binary (Repeated Division by 2)

Binary = remainders read from last to first

Where:

  • Quotient= The result of dividing the current number by 2
  • Remainder= 0 or 1 — this becomes the next binary digit (bit)
  • Original= The number being divided at each step

Understanding Binary Positional Values

Just as decimal digits represent powers of 10, binary digits represent powers of 2. Understanding this relationship is key to understanding binary numbers.

  • Position 0 (rightmost): 2⁰ = 1. The least significant bit (LSB).
  • Position 1: 2¹ = 2
  • Position 2: 2² = 4
  • Position 3: 2³ = 8
  • Position 4: 2⁴ = 16
  • Position 5: 2⁵ = 32
  • Position 6: 2⁶ = 64
  • Position 7: 2⁷ = 128. The most significant bit (MSB) for an 8-bit byte.

Each bit in a binary number contributes either 0 or its positional power of 2 to the total value. The binary number 101010 equals 32 + 0 + 8 + 0 + 2 + 0 = 42 in decimal.

How to Use This Calculator

The converter provides comprehensive number system conversion with step-by-step explanation:

  1. Enter a decimal number: Type any non-negative integer into the "Decimal Number" input field.
  2. Read the binary result: The binary representation appears prominently in the main result display, shown in monospace font for clarity.
  3. View all representations: Below the main result, a grid shows the number in binary, octal, and hexadecimal formats simultaneously.
  4. Study the conversion steps: For positive non-zero inputs, a detailed table shows each division step, displaying the original number, the quotient after dividing by 2, and the remainder (0 or 1) at each stage.
  5. Read the result interpretation: Below the steps table, the final binary number is displayed with an explanation that reading the remainders from bottom to top gives the binary result.
  6. Check common conversions: A reference table shows binary equivalents for 10, 100, 255, and 1000 for quick comparison.

Real-World Applications

Computer architecture and digital electronics operate entirely in binary. Every instruction executed by a processor, every pixel displayed on a screen, and every character transmitted over a network is represented as binary data. Understanding decimal-to-binary conversion helps programmers comprehend how numbers are stored in memory, how bitwise operations work, and why certain decimal values produce specific patterns in binary representation. For example, powers of 2 (1, 2, 4, 8, 16, 32...) have binary representations with exactly one bit set to 1, which is fundamental to understanding bitmasks and flags in programming.

Network engineering requires binary conversion for IP addressing and subnet calculations. An IPv4 address like 192.168.1.100 is actually four 8-bit binary numbers (octets). Converting each decimal octet to binary reveals the actual network and host portions of the address when combined with a subnet mask. Understanding binary helps network engineers quickly identify address ranges, calculate subnet boundaries, and troubleshoot routing issues.

Data encoding and compression algorithms manipulate binary representations directly. File formats like JPEG, PNG, and MP3 store data in specific binary structures. Character encodings like ASCII and Unicode map characters to binary codes. Understanding how decimal values translate to binary helps developers work with binary file formats, implement data compression, and debug encoding issues in software applications.

Worked Examples

Converting 42 to Binary

Problem:

Convert the decimal number 42 to binary using repeated division.

Solution Steps:

  1. 142 ÷ 2 = 21 remainder 0
  2. 221 ÷ 2 = 10 remainder 1
  3. 310 ÷ 2 = 5 remainder 0
  4. 45 ÷ 2 = 2 remainder 1
  5. 52 ÷ 2 = 1 remainder 0
  6. 61 ÷ 2 = 0 remainder 1
  7. 7Read remainders from bottom to top: 101010

Result:

42 in decimal equals 101010 in binary

Converting 255 to Binary

Problem:

Convert 255 to binary and explain why it has all bits set.

Solution Steps:

  1. 1255 ÷ 2 = 127 remainder 1
  2. 2127 ÷ 2 = 63 remainder 1
  3. 363 ÷ 2 = 31 remainder 1
  4. 431 ÷ 2 = 15 remainder 1
  5. 515 ÷ 2 = 7 remainder 1
  6. 67 ÷ 2 = 3 remainder 1
  7. 73 ÷ 2 = 1 remainder 1
  8. 81 ÷ 2 = 0 remainder 1
  9. 9Result: 11111111 (eight 1s)

Result:

255 in decimal equals 11111111 in binary — all 8 bits set to 1

Power of Two Verification

Problem:

Convert 64 to binary and explain why powers of two have a special binary pattern.

Solution Steps:

  1. 164 ÷ 2 = 32 remainder 0
  2. 232 ÷ 2 = 16 remainder 0
  3. 316 ÷ 2 = 8 remainder 0
  4. 48 ÷ 2 = 4 remainder 0
  5. 54 ÷ 2 = 2 remainder 0
  6. 62 ÷ 2 = 1 remainder 0
  7. 71 ÷ 2 = 0 remainder 1
  8. 8Result: 1000000 (a single 1 followed by six 0s)

Result:

64 equals 2⁶, which in binary is 1 followed by 6 zeros

Tips & Best Practices

  • Powers of 2 in binary are always a single 1 followed by zeros: 2=10, 4=100, 8=1000.
  • The decimal number 255 equals 11111111 in binary — all 8 bits set to 1.
  • Each hexadecimal digit maps to exactly 4 binary digits, making hex a compact binary shorthand.
  • To verify a binary conversion, expand each bit position as a power of 2 and sum them.
  • Use the conversion steps table to understand the algorithm, not just the result.
  • Common binary patterns: 1010 = 10 decimal, 1100 = 12 decimal, 1111 = 15 decimal.

Frequently Asked Questions

The binary system is a base-2 numeral system that uses only two digits: 0 and 1. Each position in a binary number represents a power of 2, starting from 2⁰ = 1 on the right. Binary is the fundamental language of digital computers, where all data — numbers, text, images, and programs — is ultimately stored and processed as sequences of binary digits (bits).
Computers use binary because digital electronics naturally operate in two states: on/off, high/low voltage, or magnetized/demagnetized. Transistors, the building blocks of processors, act as switches that can be either on (1) or off (0). This binary nature is simple, reliable, and inexpensive to implement in hardware. Using binary also simplifies error detection and correction, as there are only two possible states to distinguish.
Hexadecimal is a base-16 numeral system using digits 0-9 and letters A-F. It is used as a compact representation of binary data because each hexadecimal digit corresponds to exactly 4 binary digits (a nibble). For example, the binary number 11111111 is easier to read as FF in hexadecimal. Hexadecimal is widely used in programming, memory addresses, color codes in web design, and debugging.
To convert binary to decimal, multiply each binary digit by its positional power of 2 and sum the results. For example, to convert 101010: (1×32) + (0×16) + (1×8) + (0×4) + (1×2) + (0×1) = 32 + 0 + 8 + 0 + 2 + 0 = 42. Alternatively, use the double-doubling method: start from the leftmost bit and repeatedly double the running total, adding the current bit at each step.
A bit (binary digit) is the smallest unit of data in computing, representing either a 0 or a 1. A byte consists of 8 bits and can represent 256 different values (0 to 255 in decimal). Bytes are the standard unit for measuring data storage and transfer — file sizes, memory capacity, and network speeds are all expressed in bytes or multiples thereof (kilobytes, megabytes, gigabytes, etc.).

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Decimal to Binary Converter?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: NIST Guide to SI Units

by National Institute of Standards

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.