Want a Custom tool for Yourself?

Need a Custom Tool? We build custom tools that can save hours per employee per day.

Decimal to Binary Converter

Convert decimal to binary fast. Enter your value, see the result instantly, and copy the output for programming, study, and quick checks.

Enter your Decimal Digits






Last updated: March 24, 2026

Created by: Eon Tools Dev Team

Reviewed by: Ankit Khatiwada



What the decimal to binary converter does

You have a number written the normal way, in the ten digits everyone uses, and you need it as a row of 0s and 1s. That is the whole job here. You type in a decimal (base 10) whole number, press the button, and it hands back the same value in binary (base 2), ready to copy.

It is the kind of thing you reach for when you are writing code, working through a computer science assignment, setting bits in a register, or just checking a conversion you did on paper. The result is exact, and you can click it to copy it straight out.

How to use it

  1. Enter your decimal number. Type the everyday number you want converted, for example 156.
  2. Press Convert. The binary version appears in the output box.
  3. Click the result to copy it. Tap the output and it is copied to your clipboard, so you can paste it wherever you need it.

Press Reset to clear both boxes and start fresh.

Binary in one minute, and why computers count this way

We count in tens out of habit, probably because we grew up with ten fingers. Binary counts in twos. That is the only real difference. Where our decimal system has ten digits, 0 through 9, binary has just two, 0 and 1, and each of those digits is called a bit, short for binary digit.

A computer counts in twos for a very physical reason. Deep down it is built from tiny switches, and a switch has two honest states: on or off. Call them 1 and 0 and you have binary. There is no reliable "halfway on" switch, so two states it is, and the beauty of that is noise immunity. A signal that only ever means on or off is hard to misread, even when the electronics are noisy.

The other thing to hold onto is place value, because it is the key to the whole conversion. In decimal, each position is worth ten times the one to its right: ones, tens, hundreds, thousands. In binary, each position is worth twice the one to its right: ones, twos, fours, eights, sixteens, and so on. Those are the powers of two, and reading a binary number is just adding up the place values where a 1 sits.

How the conversion works, done by hand

The standard method is repeated division by 2, and it is worth understanding even if you let the tool do it, because once you have seen it, binary stops feeling like magic.

You divide your number by 2 and write down the remainder, which is always a 0 or a 1. Then you divide the quotient by 2 and write down that remainder. You keep going until the quotient reaches 0. Finally you read the remainders from the bottom up, and that string of 0s and 1s is your binary number.

Why does this work? Each time you divide by 2, the remainder tells you whether the number was odd or even, which is exactly the value of the lowest binary digit. Peel that off, and dividing by 2 shifts everything down one place so you can ask the same question again of the next bit up. The remainders come out lowest bit first, which is why you reverse them at the end.

A worked example with real numbers

Let us convert 156. Here is the division ladder, all the way down to a quotient of 0.

  • 156 ÷ 2 = 78, remainder 0
  • 78 ÷ 2 = 39, remainder 0
  • 39 ÷ 2 = 19, remainder 1
  • 19 ÷ 2 = 9, remainder 1
  • 9 ÷ 2 = 4, remainder 1
  • 4 ÷ 2 = 2, remainder 0
  • 2 ÷ 2 = 1, remainder 0
  • 1 ÷ 2 = 0, remainder 1

Now read the remainders from the bottom up: 1, 0, 0, 1, 1, 1, 0, 0. So 156 in decimal is 10011100 in binary.

Want to be sure? Add up the place values where a 1 sits. From the left those positions are worth 128, then 16, 8, and 4. And 128 + 16 + 8 + 4 = 156. It checks out.

The other way: subtracting powers of two

Some people find division fiddly and prefer to work from the top down. Find the largest power of two that fits inside your number, subtract it, put a 1 in that place, then repeat with what is left.

Take 156 again. The largest power of two that fits is 128, so subtract it and you have 28 left. The largest that fits in 28 is 16, leaving 12. Then 8 fits, leaving 4. Then 4 fits exactly, leaving 0. The powers you used were 128, 16, 8, and 4, and putting a 1 in each of those positions and a 0 everywhere else gives 10011100, the same answer. Use whichever method your brain likes better. They cannot disagree.

As it happens, this top-down route is the one the converter itself takes. It finds the largest power of two that fits, then steps down through the places one at a time, writing each binary digit as it goes, so the answer comes out left to right in a single pass.

Whole numbers convert exactly, fractions are where it gets interesting

Every whole number has one exact, finite binary form. There is no rounding and no approximation, which is why this converter is built around whole numbers and why you can trust the output completely.

Fractions are a different and stranger story, and it is worth knowing about even if you never type one in. To convert the part after a decimal point you multiply by 2 instead of dividing, and the catch is that the process does not always end. Take 0.1. Multiply by 2 over and over and the digits fall into a pattern that repeats forever: 0.1 in decimal is 0.0001100110011... in binary, going on without stopping, the same way one third is 0.333... in decimal and never closes.

This is not a quirk of any one calculator. It is the reason a computer, which only has room for so many bits, cannot store 0.1 exactly, and it is the famous reason that 0.1 plus 0.2 does not come out as exactly 0.3 in most programming languages. The tiny leftover is a rounding error baked into how fractions live in binary. If you want the full and proper treatment of that, David Goldberg's classic paper is the place to go, linked below. For whole numbers, though, none of this applies. They are exact, full stop. That is the side of the line this tool deliberately stays on. If you enter a value with a decimal part, it converts the whole-number part and leaves the fraction aside, so the answer it gives you is always one of the exact ones.

Powers of two worth memorizing

A handful of these stick in your memory quickly and make binary much easier to read at a glance.

Power of two Decimal value In binary
2011
21210
224100
2381000
241610000
28256100000000
210102410000000000

Two more worth knowing: 255 is 11111111, eight 1s in a row, which is the largest number you can hold in a single byte. Add one and you roll over to 256, which is 100000000. That jump from eight 1s to a 1 with eight 0s is binary doing exactly what decimal does when 99 ticks over to 100.

Questions people ask

How do I convert decimal to binary by hand?

Divide the number by 2, write the remainder, then divide the quotient by 2 and write that remainder, and keep going until the quotient is 0. Read the remainders from the bottom up and that is your binary number.

Why do you divide by 2?

Because binary is base 2. Dividing by the base and taking the remainder peels off one digit at a time, lowest first. It is the same trick that works in any base. Divide by 10 and the remainders give you the ordinary decimal digits.

What is a bit, and what is a byte?

A bit is a single binary digit, one 0 or one 1. A byte is a group of eight bits, which can represent any whole number from 0 to 255. Four bits, half a byte, is sometimes called a nibble.

Can it handle negative numbers?

This tool is built for non-negative whole numbers. Representing negative values in binary needs a convention called two's complement, which fixes how many bits you are working with, and there is a separate two's complement calculator for that.

Do leading zeros matter?

Not to the value. 00101 and 101 are the same number, just as 007 and 7 are in decimal. Leading zeros are sometimes added only to pad a number out to a tidy width, like a full 8-bit byte.

What is the biggest number I can store in a set number of bits?

With n bits you can count from 0 up to 2 to the power of n, minus one. So 8 bits reach 255, and 16 bits reach 65,535. Every bit you add roughly doubles the range.

References

  1. Weisstein, Eric W. "Base." From MathWorld, A Wolfram Resource, on positional number systems, base, and radix. https://mathworld.wolfram.com/Base.html
  2. Goldberg, D. (1991). What Every Computer Scientist Should Know About Floating-Point Arithmetic. ACM Computing Surveys, 23(1). https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html


Ankit Khatiwada

Ankit Khatiwada is a researcher and graduate student in Computer Science at Saarland University, with strengths in statistics, data analysis, data engineering, and full stack development. His work sits at the intersection of quantitative reasoning and applied technology, making him a strong fit for tools that depend on clear numerical logic. At Eon Tools, he reviews number and statistical tools.