Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Binary Equivalent
1001011
base 2
Decimal (base 10) 75
Number of bits 7

What Is the Decimal to Binary Converter?

This tool converts a number written in our everyday base-10 (decimal) system into base-2 (binary), the language computers use internally. Binary uses only two digits, 0 and 1, where each position represents a power of two. The converter is universal — it works the same in every country and for any non-negative whole number.

How to Use It

Enter a non-negative whole decimal number (for example 156) and submit. The calculator returns the equivalent binary string and how many bits (binary digits) it occupies. Negative numbers are treated as 0, and decimals are truncated to a whole number.

The Formula Explained

The classic method is repeated division by 2. Divide the number by 2 and record the remainder (0 or 1). Replace the number with the quotient and repeat until the quotient is 0. Reading the collected remainders from bottom to top (last to first) gives the binary representation.

$$\text{Binary} = \sum_{i=0}^{k-1} b_i \cdot 2^{i}, \quad b_i = \left\lfloor \frac{\text{Decimal}}{2^{i}} \right\rfloor \bmod 2$$

Worked Example

Convert 156: \(156 \div 2 = 78\ r0\), \(78 \div 2 = 39\ r0\), \(39 \div 2 = 19\ r1\), \(19 \div 2 = 9\ r1\), \(9 \div 2 = 4\ r1\), \(4 \div 2 = 2\ r0\), \(2 \div 2 = 1\ r0\), \(1 \div 2 = 0\ r1\). Remainders bottom-to-top: 10011100. So 156 in decimal equals 10011100 in binary (8 bits).

Binary place value chart with powers of two under each bit
Each binary digit represents a power of two, summed to give the decimal value.

FAQ

What is 0 in binary? It is simply 0.

How many bits does a number need? The bit count equals the number of binary digits — for example 156 needs 8 bits.

Can I convert negative numbers? This converter handles non-negative integers; negative inputs are treated as 0. Real systems use two's complement for negatives.

Last updated: