Decimal to Binary Converter
Translate a base-10 whole number into base-2 binary.
Interactive visual
Build a binary number from powers of two
45 → 101101
Live input
45
Live output
Updates as you type
Convert decimal into binary
Example: 45 → 101101
Binary result
Provide input
Validate format
Return binary result
How Decimal-to-Binary Conversion Works
The Division-Remainder Method
Converting a decimal (base-10) number to binary (base-2) involves repeatedly dividing the number by 2 and recording the remainders. The binary result is read from the last remainder to the first. This method is called the division-remainder or successive division method and is the most common manual approach.
Step-by-Step Example
To convert decimal 45 to binary: 45 divided by 2 equals 22 remainder 1; 22 divided by 2 equals 11 remainder 0; 11 divided by 2 equals 5 remainder 1; 5 divided by 2 equals 2 remainder 1; 2 divided by 2 equals 1 remainder 0; 1 divided by 2 equals 0 remainder 1. Reading the remainders from bottom to top gives 101101, which is 45 in binary.
Alternative Methods
Another approach is the subtraction of powers method. List the powers of two (1, 2, 4, 8, 16, 32, 64, and so on) and find the largest power that fits into your number. Subtract it and mark a 1 in that position. Continue with the remainder until you reach zero, marking 0 for any power you skip. Both methods produce identical results.
Why You Need This Conversion
This conversion is fundamental in computer science education and programming. When you need to set individual bits in hardware registers, create binary network masks, understand how data is stored in memory, or debug low-level software, converting between decimal and binary is an essential skill. This tool provides instant, error-free conversion for any valid decimal input.