Decimal To Binary

Convert decimal numbers to binary, turning base 10 into base 2. No signup. Ideal for students, programmers and anyone learning or working with binary.

Remove Ads
Words Limit/Search : 3000
Upto 30k Words Go Pro

Upload File
Remove Ads
Remove Ads

Share on Social Media:

A decimal to binary converter turns an ordinary base ten number into binary — the zeros and ones computers use. Enter one whole number, click Convert to Binary, and you get its binary form: 10 becomes 1010. It is free, needs no signup, and works for students, programmers, and anyone learning how computers count.

On this page

  1. How to Convert Decimal to Binary Step by Step
  2. What Decimal and Binary Are
  3. Decimal Versus Binary Number Systems
  4. Who Converts Decimal to Binary
  5. Pro Tips for Understanding Binary
  6. Common Decimal to Binary Mistakes to Avoid
  7. Related Tools You May Need Next
  8. Frequently Asked Questions

How to Convert Decimal to Binary Step by Step

  1. Enter the decimal number. Type one whole number into the box above — for example, 10. You can also upload a .txt file containing the number instead.
  2. Click “Convert to Binary”. The tool converts your number on the server and returns the binary result. There are no settings to choose.
  3. Read the binary result. Under the “Result” heading you get the binary form as plain zeros and ones, with no prefix — for example, 10 gives 1010.
  4. Copy it or save it. Click “Copy to Clipboard” to copy the binary, or “Save as TXT” to download it as a decimal-to-binary.txt file. The result is not saved on the site, so copy it before you leave the page.

Decimal to binary converter turning a number into zeros and ones

What Decimal and Binary Are

Decimal is the base ten number system we use every day, with ten digits from zero to nine. Binary is the base two system, using only two digits, zero and one. Converting a decimal number to binary expresses the same value using only zeros and ones, which is the form computers use at their lowest level.

The conversion works by expressing the decimal value in terms of powers of two rather than powers of ten. Where decimal positions are worth ones, tens, and hundreds, binary positions are worth ones, twos, fours, eights, and so on. The converter works out which powers of two add up to the decimal value, placing a one in each corresponding position and a zero elsewhere.

Binary placeValue
2^01
2^12
2^24
2^38
2^416
2^532
2^664
2^7128

Worked example — converting 10 to binary by dividing by 2 and keeping the remainders:

StepDivisionQuotientRemainder
110 ÷ 250
25 ÷ 221
32 ÷ 210
41 ÷ 201

Read the remainders from the bottom up: 1010. Check it with the powers of two: 10 = 8 + 2, so the 8s place and the 2s place get a one and the rest get a zero — 1010.

More verified examples: 255 is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1, so it becomes eight ones, 11111111. 42 is 32 + 8 + 2, so it becomes 101010. 1024 is 2^10, so it becomes a one followed by ten zeros, 10000000000. Zero stays 0 and one stays 1.

Binary results are longer than the decimal you started with, because each binary digit carries less information than a decimal digit. That is normal, and it is why hexadecimal is used as a compact shorthand for binary.

Laptop showing decimal numbers converting to binary

A note on negative numbers: this tool shows a negative number in 64-bit two’s complement form, the way computers store signed integers. So −5 becomes a 64-digit string ending in 1011. If you only need the size of the number, convert the positive version instead — 5 is simply 101.

Decimal Versus Binary Number Systems

Decimal and binary can both represent any whole number, but they do it with different bases, different digits, and different place values. Decimal is the everyday human system; binary is what computers use at their lowest level.

AspectDecimalBinary
BaseBase tenBase two
Digits0 to 90 and 1 only
Place valuesPowers of ten: 1, 10, 100…Powers of two: 1, 2, 4, 8…
Length for the same valueShorterLonger
Used byPeople, everyday countingComputers and digital hardware

Do not confuse converting a number with encoding text. The digits 123 as a number convert to binary as 1111011 — just 7 bits. The same three characters as text, on the Text to Binary tool, are encoded character by character and give 00110001 00110010 00110011 — 24 bits. Same digits, completely different output, because one is a number and the other is text.

 Decimal to binaryText to binaryDecimal to hex
Input isA single whole numberText, character by characterA single whole number
123 gives111101100110001 00110010 001100117b
Output stylePlain zeros and ones8-bit groups, space-separatedCompact hex digits
Use it toSee a value in base twoSee how text is storedSee the same value compactly

Who Converts Decimal to Binary

Students learning number systems. Converting a decimal number to binary shows how an everyday number is represented in the base two system computers use, which makes the idea concrete for classes and exams.

Programmers. Checking the binary form of a value while working with bit flags, masks, file permissions, or low-level code.

Computer science learners. Practising the divide-by-2 method by hand and checking the answer against the tool.

People working with digital electronics. Translating decimal values into binary to work with them in the form the hardware uses.

Anyone converting to binary. A person who has a decimal number and wants its binary form can convert it here, free, with no signup.

Converter machine turning decimal bars into binary cubes

Pro Tips for Understanding Binary

Learn the powers of two. Binary positions are worth 1, 2, 4, 8, 16, 32, 64, and 128. Knowing them lets you read a binary number at a glance: 1010 is 8 + 2 = 10.

Convert one whole number at a time. The tool handles a single whole number per conversion, so enter one number, convert it, then enter the next.

Stay inside the signed 64-bit range. The tool works for whole numbers from −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Ordinary classroom and programming numbers are far inside that range.

Check your work by converting back. Paste the binary result into the Binary to Decimal tool and confirm you get your original number back.

Use hex for a compact form. If the binary is unwieldy, the Decimal to Hex tool gives the same value in compact hexadecimal, and Binary to Hex converts the binary result to hex.

Copy or save before you leave. The result is not stored on the site, so use “Copy to Clipboard” or “Save as TXT” while the result is on screen.

Common Decimal to Binary Mistakes to Avoid

Expecting binary as short as decimal. Binary uses only two digits, so its results are longer than the decimal you started with. A longer string of zeros and ones is normal, not an error.

Entering a fraction. The tool only handles whole numbers. Enter a whole number such as 10, not a value with a decimal point.

Entering more than one number at once. Convert one number per conversion. Enter a single whole number, convert it, then enter the next.

Entering letters or mixed text. The conversion expects a clean whole number. Letters or stray characters give no result, so check the input is digits only (a leading minus sign is fine for a negative number).

Misplacing the powers of two by hand. When converting by hand, the binary place values are powers of two: 1, 2, 4, 8. Misplacing them gives a wrong result, so check your hand calculation against the tool.

Confusing the binary result with other bases. The result is base two, distinct from decimal and from hexadecimal. Remember the output is the binary form of your decimal number, and use the hex tools when you want the compact form.

Related Tools You May Need Next

For the reverse direction, the Binary to Decimal tool converts binary back to decimal. For a compact form, Decimal to Hex and Binary to Hex help, and the Base Converter handles any base. To encode text instead of a number, use Text to Binary or ASCII to Binary; to decode binary back into text, use Binary to Text or Binary to ASCII. For the hex view of text, see Text to Hex, and for the reverse binary direction, Hex to Binary.

Frequently Asked Questions

How do I convert decimal to binary?

Enter one whole number into the box and click “Convert to Binary”. The tool returns the binary form under the “Result” heading — for example, 10 becomes 1010. Then copy it with “Copy to Clipboard” or download it with “Save as TXT”.

What is binary?

Binary is the base two number system, using only the digits zero and one, in contrast to the everyday decimal system, which is base ten and uses the digits zero to nine. Despite using only two digits, binary can represent any whole number. It is the fundamental language of computers, because the two binary digits map naturally onto the two states, off and on, that underlie all digital electronics.

What is the difference between decimal and binary?

Decimal is base ten, using digits zero to nine, where each position represents a power of ten: ones, tens, hundreds, and so on. Binary is base two, using only zero and one, where each position represents a power of two: ones, twos, fours, eights, and so on. Both can represent any whole number, but decimal is the everyday human system, while binary is what computers use at their lowest level. Binary representations are longer than decimal, since binary uses only two digits.

Why is the binary result longer than the decimal?

Because binary uses only two digits, zero and one, each binary digit carries less information than a decimal digit, which has ten possible values. So representing a given value in binary takes more digits than in decimal. A number that is short in decimal can become a considerably longer string of zeros and ones in binary. This is normal, and it is why compact shorthands like hexadecimal are used in computing.

How does the decimal to binary conversion work?

It works by expressing the decimal value in terms of powers of two rather than powers of ten. In binary, each position represents a power of two: ones, twos, fours, eights, and so on. The conversion finds which of these powers of two add up to your decimal value, placing a one in each position whose power is used and a zero elsewhere. You can do it by hand by dividing by 2 and reading the remainders from the bottom up — for 10, that gives 1010.

What is decimal to binary conversion used for?

It is fundamental in computing and a common part of learning how computers work. Because computers operate in binary at their lowest level, converting an everyday decimal number to binary shows how data is stored and processed. It is a basic exercise for students of computing and a routine task for programmers and those working with digital electronics, who sometimes need to work with the binary representation of values.

Can I convert the binary result to hexadecimal?

Yes. If the binary is unwieldy, you can convert it to hexadecimal for a more compact form using the Binary to Hex tool, or convert the original decimal to hex directly with the Decimal to Hex tool. Each hex digit corresponds to a group of four binary digits, so hex is a compact, readable shorthand for long binary numbers.

Is the decimal to binary converter free?

Yes, it is completely free with no account and no signup. You can convert decimal numbers to binary at no cost. There is nothing to download or install, and the binary result appears after you click “Convert to Binary”.

What numbers can I convert?

Whole numbers from −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 — the signed 64-bit range. Enter one whole number at a time. Fractions are not handled, so enter a whole number such as 10 or 255. Negative numbers are shown in 64-bit two’s complement form, the way computers store signed integers.

Can I convert a file of numbers?

You can upload a .txt file containing a number, and the tool converts the number in the file. Upload one number per conversion, and use the “Save as TXT” button to download the binary result as a decimal-to-binary.txt file.