Decimal to Binary Converter

Convert decimal integers, fractional numbers, and signed Two's Complement values into exact base-2 binary with step-by-step divide-by-2 and multiply-by-2 math.

Presets:
6 bits
BigInt exact · Division by 2 live
Binary Output (Nibble Grouped)
0010 1010
Compact Binary: 101010
Hex: 0x2A
Octal: 0o52
Bit Length: 6 bits
IEEE 754 float32 (S | Exp | Mantissa): 0 10000100 01010000000000000000000
Integer Part: Repeated Division by 2 (Read Remainders Bottom-to-Top)Integer bits = 101010₂
Integer repeated division by 2 quotient and remainder bit table
StepDivision OperationQuotientRemainder (Bit)
#142 ÷ 2210
#221 ÷ 2101
#310 ÷ 250
#45 ÷ 221
#52 ÷ 210
#61 ÷ 201

Decimal to Binary Chart (Integers & Fractions)

Base 10 → Base 2
Decimal to Binary Chart covering integers and binary fractions
DecimalBinary (Base 2)Hex / Float32Reference Note
1010100xA4-bit integer (8 + 2)
421010100x2A6-bit alternating pattern
128100000000x802^7 byte MSB weight
255111111110xFFMax unsigned 8-bit byte
1,024100000000000x4002^10 (1 KiB boundary)
0.50.10x3F000000Exact fraction (2^-1)
0.250.010x3E800000Exact fraction (2^-2)
0.6250.1010x3F200000Exact sum (0.5 + 0.125)
13.6251101.1010x415A0000Mixed integer + fraction
0.10.000110011001…0x3DCCCCCDRepeating binary fraction

Click any integer or fraction row to load it into the decimal to binary converter and inspect its complete divide-by-2 or multiply-by-2 derivation.

Signal & Number Converters

9 tools

Divide-by-2 Integers & Fractional Multiplication Algorithm

Converting base-10 numbers to radix-2 relies on two complementary algorithms. For whole numbers, divide the decimal integer by 2 repeatedly and collect each remainder (0 or 1) from bottom to top. For decimal fractions such as 0.625, apply repeated multiplication by 2 to the fractional part and record each integer carry bit from top to bottom. This decimal to binary converter prints both derivation tables live with zero floating-point rounding drift.

When inspecting hardware registers or negative values, switch the width selector in this decimal to binary converter to signed int8, int16, int32, or int64 Two’s Complement. Fractional inputs also render their exact IEEE 754 single-precision float32 sign, exponent, and mantissa fields alongside nibble-grouped binary output.

Only dyadic fractions whose reduced denominator is a power of two—such as 1/2 (0.5), 1/4 (0.25), and 5/8 (0.625)—terminate cleanly in base 2. Any denominator containing another prime factor like 5 (such as 0.1 or 0.3) becomes an infinite periodic binary fraction, which hardware rounds to 23 mantissa bits under IEEE 754 single-precision encoding.

Integer & Fractional Binary Worked Examples

Review the interactive decimal to binary chart above or study these benchmark conversions covering unsigned integers, terminating binary fractions, and signed byte registers:

Worked Integer and Fractional Binary Conversion Examples
Decimal (Base 10)Divide / Multiply by 2 TraceBinary (Base 2)Notes
1313÷2=6 r1; 6÷2=3 r0; 3÷2=1 r1; 1÷2=0 r111014-bit integer read bottom-to-top
42Remainders 0, 1, 0, 1, 0, 1 read upward1010106-bit integer (32 + 8 + 2)
255Eight consecutive odd divisions → eight 1 bits11111111Full single unsigned byte (0xFF)
0.6250.625×2=1.25 (1); 0.25×2=0.5 (0); 0.5×2=1.0 (1)0.101Terminating fraction (1/2 + 1/8)
13.625Integer 1101 + fractional .101 combined1101.101Exact mixed radix-2 number
−128 (int8)2⁸ − 128 = 128 → 10000000 signed byte10000000Two’s Complement int8 minimum

Working across multiple number bases? Jump to our Binary to Decimal Converter, Decimal to Hex Converter, or translate UTF-8 text streams in our 8-bit Binary Workbench.

“Binary floating-point formats encode real numbers as a sign bit, a biased radix-2 exponent, and a finite significand precision field.”

Binary & Fractional Conversion Q&A

How do you convert decimal to binary using repeated division by 2?
Divide the integer part by 2 repeatedly and record each remainder (0 for even, 1 for odd) until the quotient hits 0. Reading those bits from bottom to top yields the exact binary result—for example, 25 produces remainders 1, 0, 0, 1, 1, which assemble upward into 11001.
How does this decimal to binary converter handle decimal fractions like 13.625?
It splits the input at the decimal point. The integer part (13) runs through repeated division by 2 to produce 1101, while the fractional part (0.625) uses repeated multiplication by 2—recording each integer carry top-to-bottom (1, 0, 1)—to form 1101.101.
Why does 0.1 become a repeating binary fraction in computers?
Just as 1/3 repeats endlessly in base 10 (0.333...), 1/10 cannot be written as a finite sum of negative powers of 2. Repeated multiplication by 2 enters a 4-bit cycle (0.000110011001...), which our binary converter displays alongside its rounded IEEE 754 single-precision float32 mantissa.
How do negative integers convert in signed Two’s Complement mode?
Select int8, int16, int32, or int64 in this binary converter and enter a negative value such as −128. The engine adds 2^w before dividing by 2 so the leftmost Most Significant Bit correctly encodes the negative sign weight.
Does this binary converter lose precision on 64-bit numbers?
No. All integer divisions use arbitrary-precision BigInt math, and fractional multiplications use exact scaled integer arithmetic rather than imprecise binary floats, eliminating rounding drift in step tables.