Math
Decimal to Binary Converter
Enter any decimal number, including fractions and negatives, and the converter divides by 2 repeatedly to build the binary whole part, multiplies the fraction by 2 to build the bits after the binary point, and flags fractions that repeat forever.
Negative numbers can be shown with a sign or encoded in two's complement.
Any whole or decimal number. Commas are ignored; a minus sign is allowed.
Two's complement is how computers store negative whole numbers.
Try an example
Result
Converted value
—
- Decimal
- —
- Binary
- —
- Hexadecimal
- —
- Octal
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the decimal to binary converter solves
Computers store numbers in binary, so converting from decimal is the first skill in any computer science or digital electronics course. The whole-number part converts by repeated division by 2; the fractional part converts by repeated multiplication by 2. This converter shows both tables, detects repeating binary fractions such as 0.1 = 0.0001100110011…, and can encode negatives the way hardware does.
The two methods
How to use it
- Type the decimal number. Commas are ignored, so 1,024 works.
- Add a decimal point for fractions, for example 0.625 or 13.625.
- For negatives, choose whether you want a minus sign (−1101) or two's complement at 8, 16, 32, or 64 bits.
- Read the repeated-division table from bottom to top for the whole part, and the multiplication table top to bottom for the fraction.
How to read the answer
The main answer is the binary string. Parentheses mark a repeating block: 0.1 = 0.0(0011) means the bits 0011 repeat forever, which is why 0.1 cannot be stored exactly in floating point. The nibble grouping and the hex and octal equivalents are shown for cross-checking.
Common mistakes and edge cases
- Reading the remainders top to bottom. The first remainder is the rightmost (least significant) bit.
- Stopping the fraction too early. Keep multiplying until the fraction becomes 0 or a value you have already seen.
- Expecting every decimal fraction to terminate in binary. Only fractions whose The bottom number of a fraction; it says how many equal parts make one whole. is a power of 2 (0.5, 0.25, 0.375, 0.625) do.
- Two's complement has a range: 8-bit holds −128 to 127. Larger The length or size of a vector, ignoring which way it points. need a wider register, and the converter says so.
- 0 converts to 0; there is no division to do.
Worked examples
Whole number
45
Converted value
101101
Decimal with a fraction
13.625
Converted value
1101.101
Repeating fraction
0.1
Converted value
0.0(0011)
Negative with a sign
−10
Converted value
-1010
Negative in two's complement
−5 at 8 bits
Converted value
11111011
Zero
0
Converted value
0
Large number
1,000,000
Converted value
11110100001001000000
Out of range for the width
−200 at 8 bits
Converted value
—
Frequently asked questions
How do you convert decimal to binary?+
Divide the number by 2 and write down the remainder (0 or 1). Divide the quotient by 2 again, and keep going until the quotient is 0. The remainders read from last to first are the binary digits.
How do you convert a decimal fraction to binary?+
Multiply the fraction by 2. The whole part (0 or 1) is the next bit; keep the fractional part and multiply again. 0.625 × 2 = 1.25 → 1, 0.25 × 2 = 0.5 → 0, 0.5 × 2 = 1.0 → 1, so 0.625 = 0.101.
Why does 0.1 have a repeating binary expansion?+
0.1 = 1/10, and 10 has a prime factor 5 that is not a power of 2, so the binary fraction never terminates: 0.0001100110011… The converter shows the repeating block in parentheses.
How are negative numbers written in binary?+
On paper, with a minus sign. Inside computers, with two's complement: write the magnitude at the register width, invert every bit, and add 1. −5 in 8 bits is 11111011.
What is 255 in binary?+
255 = 11111111, the largest value that fits in 8 bits. 256 needs a ninth bit: 100000000.
Does the converter handle very large numbers?+
Yes. It uses exact integer arithmetic, so numbers with dozens of digits convert without the rounding you get from floating-point tools.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
Binary to Decimal Converter
Convert binary to decimal with the positional-weight table (bit × 2^n), fractional bits after the binary point, and an option to read the bits as a signed two's complement number.
Decimal to Hex Converter
Convert decimal to hexadecimal with the repeated-division-by-16 steps, remainders mapped to A-F, fractional parts, nibble grouping, and negatives in two's complement.
Two's Complement Calculator
Convert decimal to two's complement and back at 4, 8, 16, 32, or 64 bits with the invert-and-add-1 steps, the sign bit highlighted, overflow detection, and the unsigned reading of the same bits.
Binary Fraction Converter
Convert decimal fractions (or ratios like 1/3) to binary with repeating-block detection, or binary fractions back to exact decimals, with the multiply-by-2 table and place-value table shown.
Binary Calculator
Add, subtract, multiply, or divide binary numbers with the column method shown: carries, borrows, partial products, and a long-division tableau, plus decimal, hex, and octal equivalents.
Hex to Decimal Converter
Convert hexadecimal to decimal with the place-value table (digit × 16^n), the digit-to-value key for A-F, nibble grouping into binary, and signed two's complement reading.
Last updated: September 4, 2026