Convert decimal (base 10) numbers into binary (base 2), including fractions and negatives, with every step shown.
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.
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.
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.
0 and 1÷ 2, record remainder, repeat× 2, record whole digit, repeatbottom → toptop → bottomEach binary digit stands for a power of two:
| Power | 2⁹ | 2⁸ | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|---|---|---|---|---|---|
| Value | 512 | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
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.
| Decimal | Binary |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 10 |
| 3 | 11 |
| 4 | 100 |
| 5 | 101 |
| 8 | 1000 |
| 10 | 1010 |
| 15 | 1111 |
| 16 | 10000 |
| 31 | 11111 |
| 32 | 100000 |
| 63 | 111111 |
| 64 | 1000000 |
| 100 | 1100100 |
| 127 | 1111111 |
| 128 | 10000000 |
| 255 | 11111111 |
| 256 | 100000000 |
| 512 | 1000000000 |
| 1024 | 10000000000 |
| Feature | Decimal (base 10) | Binary (base 2) |
|---|---|---|
| Digits used | 0–9 | 0 and 1 |
| Place values | 1, 10, 100, 1000… | 1, 2, 4, 8, 16… |
| Used by | People | Computers and electronics |
| Example (ten) | 10 | 1010 |
| Decimal | Binary | Type |
|---|---|---|
| 0.5 | 0.1 | Terminating |
| 0.25 | 0.01 | Terminating |
| 0.75 | 0.11 | Terminating |
| 0.625 | 0.101 | Terminating |
| 0.1 | 0.0(0011) | Repeating |
| 0.2 | 0.(0011) | Repeating |
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.
1) 100 2) 111 3) 1100 4) 10100 5) 100000
1) 1100100 2) 11001000 3) 1010.1 4) 0.11 5) -10010
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.