Home/Math/Decimal Calculators/Decimal to Binary Calculator

Decimal to Binary Calculator

Convert decimal (base 10) numbers into binary (base 2), including fractions and negatives, with every step shown.

Quick Answer: How Do You Convert Decimal to Binary?

To convert a whole decimal number to binary, divide it by 2 over and over, writing down each remainder, then read the remainders from bottom to top. For example, 10 ÷ 2 gives remainders that read as 1010, so 10 in decimal is 1010 in binary. For a decimal fraction, multiply the part after the point by 2 repeatedly and read the whole-number digits from top to bottom. This calculator shows all the steps.

Enter a Decimal Number
Copied!
Binary Result
Binary (base 2)
1010
10 in binary
Binary uses only two digits: 0 and 1. Each place is a power of two — 1, 2, 4, 8, 16 and so on — instead of the 1, 10, 100 of decimal. That is why computers, which store everything as on/off switches, use binary.

How to Use the Decimal to Binary Calculator

Type any decimal number — a whole number like 25, a fraction like 10.5, or a negative like -42 — and press Convert. The result shows the binary value, a grouped version in nibbles of four bits, and the full working. Fractions that do not end in binary are shown with a bar over the repeating part. Use Copy result to reuse the binary elsewhere. Negative answers use a minus sign for readability; they do not represent a fixed-width two's-complement computer value.

The Conversion Method

Whole part: divide by 2, keep remainders, read bottom → top
Fraction part: multiply by 2, keep whole digits, read top → bottom

A decimal number is split into its whole part and its fractional part. The whole part is divided by 2 repeatedly; each remainder is a binary digit, read from the last remainder up to the first. The fractional part is multiplied by 2 repeatedly; each time the result is 1 or more, the binary digit is 1 (and you drop the 1), otherwise it is 0.

Binary Conversion Rules

Quick rules

Only digits allowed: 0 and 1
Whole number: ÷ 2, record remainder, repeat
Fraction: × 2, record whole digit, repeat
Read whole remainders bottom → top
Read fraction digits top → bottom
Negative: convert the size, then add a minus sign

Binary Place Value Table

Each binary digit stands for a power of two:

Power2⁹2⁸2⁷2⁶2⁵2⁴2⁰
Value5122561286432168421

To read binary back to decimal, add the place values wherever there is a 1. For example, 1010 has 1s in the 8 and 2 places, so 8 + 2 = 10.

Worked Examples

1. 10 to binary

10 ÷ 2 = 5 r 0 · 5 ÷ 2 = 2 r 1 · 2 ÷ 2 = 1 r 0 · 1 ÷ 2 = 0 r 1
Read remainders bottom to top: 1010

2. 25 to binary

25→12 r1 · 12→6 r0 · 6→3 r0 · 3→1 r1 · 1→0 r1
Bottom to top: 11001

3. 255 to binary

255 is one less than 256 (2⁸), so all eight bits are 1
11111111

4. 10.5 to binary (a fraction)

Whole part 10 = 1010
0.5 × 2 = 1.0 → 1, and the fraction is now 0, so stop
10.5 = 1010.1

5. 0.625 to binary

0.625×2=1.25→1 · 0.25×2=0.5→0 · 0.5×2=1.0→1
0.625 = 0.101

6. 0.1 to binary (repeats)

Multiplying by 2 never reaches a whole number, so the pattern repeats
0.1 = 0.0001100110011… = 0.0(0011)

Decimal to Binary Conversion Table

DecimalBinary
00
11
210
311
4100
5101
81000
101010
151111
1610000
3111111
32100000
63111111
641000000
1001100100
1271111111
12810000000
25511111111
256100000000
5121000000000
102410000000000

Binary vs Decimal

FeatureDecimal (base 10)Binary (base 2)
Digits used0–90 and 1
Place values1, 10, 100, 1000…1, 2, 4, 8, 16…
Used byPeopleComputers and electronics
Example (ten)101010

Fractional Binary Examples

DecimalBinaryType
0.50.1Terminating
0.250.01Terminating
0.750.11Terminating
0.6250.101Terminating
0.10.0(0011)Repeating
0.20.(0011)Repeating

Real-Life Uses

Binary is the language of digital systems, so this conversion shows up in computer programming, networking (IP addresses and subnet masks), electronics and digital logic, embedded systems and microcontrollers, computer architecture, and in classrooms and coding interviews. Understanding how a decimal number maps to its binary bits is a core computer-science skill.

Common Mistakes

Watch out for these:
  • Reading the remainders top to bottom instead of bottom to top.
  • Using digits other than 0 and 1 in the answer.
  • Forgetting to convert the fractional part separately.
  • Assuming every decimal fraction ends neatly in binary — many, like 0.1, repeat forever.
  • Dropping the minus sign on a negative number.
Did you know? Eight bits make one byte, and one byte can hold 256 different values (0 to 255). Four bits are called a nibble. The word "bit" is short for "binary digit", a term coined by statistician John Tukey in the 1940s.
Pro tip. Learn the powers of two — 1, 2, 4, 8, 16, 32, 64, 128 — and you can convert small numbers in your head: 100 is 64 + 32 + 4, which lights up those three bits to give 1100100.
Pro tip. The number of binary digits increases by one whenever the decimal value reaches the next power of two. Numbers from 128 to 255 need 8 bits, while numbers from 256 to 511 need 9 bits.

Practice Questions

Beginner (with answers)

  1. Convert 4 to binary.
  2. Convert 7 to binary.
  3. Convert 12 to binary.
  4. Convert 20 to binary.
  5. Convert 32 to binary.
Show answers

1) 100   2) 111   3) 1100   4) 10100   5) 100000

Advanced (with answers)

  1. Convert 100 to binary.
  2. Convert 200 to binary.
  3. Convert 10.5 to binary.
  4. Convert 0.75 to binary.
  5. Convert -18 to binary.
Show answers

1) 1100100   2) 11001000   3) 1010.1   4) 0.11   5) -10010

🔑 Key Takeaways

  • Binary uses only 0 and 1, with place values that are powers of two
  • Whole numbers: divide by 2 and read the remainders bottom to top
  • Fractions: multiply by 2 and read the whole digits top to bottom
  • Some decimal fractions, like 0.1, repeat forever in binary
  • Eight bits make a byte, holding values from 0 to 255

Frequently Asked Questions

How do you convert decimal to binary?

Divide the whole number by 2 repeatedly, writing down each remainder, then read the remainders from bottom to top. For a fraction, multiply by 2 repeatedly and read the whole-number digits from top to bottom.

What is 10 in binary?

10 in decimal is 1010 in binary, because it is made of 8 + 2.

What is 25 in binary?

25 in decimal is 11001 in binary, made of 16 + 8 + 1.

What is 255 in binary?

255 is 11111111 — eight 1s. It is the largest value that fits in one byte (8 bits).

What is 100 in binary?

100 in decimal is 1100100 in binary, made of 64 + 32 + 4.

How do binary numbers work?

Binary is base 2, so each digit is worth a power of two — 1, 2, 4, 8, 16 and so on. You add the place values wherever there is a 1 to get the decimal value.

Can decimals with fractions be converted to binary?

Yes. Convert the whole part by dividing by 2, and the fractional part by multiplying by 2. Some fractions end neatly, while others, like 0.1, repeat forever.

What is 0.5 in binary?

0.5 in binary is 0.1, because 0.5 is exactly one half, which is the first binary fraction place.

Why do some decimal fractions repeat in binary?

A fraction ends in binary only if its denominator is a power of two after simplifying. Fractions like 1/10 are not, so their binary form repeats forever.

How do you convert a negative decimal to binary?

Convert the size of the number to binary, then add a minus sign in front. Computers often use a method called two's complement instead, but the plain sign-and-value form is easier to read.

What is a bit, a nibble and a byte?

A bit is a single binary digit (0 or 1). Four bits make a nibble, and eight bits make a byte, which can store 256 different values.

What is the largest number in 8 bits?

The largest 8-bit number is 11111111, which is 255 in decimal. Adding one more would need a ninth bit.

How do you read a binary number back to decimal?

Write the place values (1, 2, 4, 8, 16…) under the digits from the right, then add the values wherever there is a 1. So 1010 is 8 + 2 = 10.

Is binary only used in computers?

Binary is most associated with computers and electronics, but the idea of base 2 is a general number system and is also used in areas like digital logic and information theory.

Is this Decimal to Binary Calculator free?

Yes. It is free with no sign-up, works on any device, and runs in your browser so your entries stay private.

References

Last updated: July 2026
Reviewed by the MegaCalcOnline Editorial Team using standard number-system methods and trusted educational references. Whole numbers use exact integer division and fractions use exact integer repeated doubling. Terminating and commonly repeating patterns are identified exactly, while exceptionally long expansions may be limited to the displayed number of binary digits. This page is for educational purposes.