Convert Decimal to Binary

Convert decimal numbers to binary instantly — free online decimal to binary converter.

About

About the Decimal to Binary Converter

Type an ordinary number and see exactly how a computer would store it as 0s and 1s — converting decimal to binary is the first step in most computer science courses, and comes up again later in networking, when working out subnet masks and IP addresses.

The classic method is repeated division: divide by 2, write down the remainder, and keep going until you reach 0 — then read the remainders from the bottom up. 13 gives remainders 1, 0, 1, 1, so 13 is 1101. The converter skips the long division and shows the binary form the moment you type, along with octal and hex.

Choose what to view about this tool

Guide

Using the Decimal to Binary Converter

  1. 1

    Step 1

    Decimal is already selected below as the input base.

  2. 2

    Step 2

    Type your ordinary base-10 number into the value box.

  3. 3

    Step 3

    The result table fills in instantly — the binary value sits alongside octal, decimal and hex all at once.

  4. 4

    Step 4

    For a quick manual check, divide the number by 2 repeatedly, writing down each remainder, then read the remainders back from bottom to top.

  • Converts decimal to binary as you type, with no padding or spaces added to the result
  • Handles negative numbers by putting a minus sign in front, so -5 becomes -101
  • Accepts whole numbers only — a value like 2.5 is flagged instead of being rounded silently
  • Shows the value in binary, octal, decimal, hexadecimal and base 36 at once, plus any custom base from 2 to 36
  • Exact for whole numbers up to 9,007,199,254,740,991, and tells you when a number is too large
  • Runs entirely in your browser — free, with no sign-up and no limit

Computer science students

Students check repeated-division homework and see where each bit comes from.

Network engineers

Network engineers write a mask octet like 255 or 224 as bits while working out a subnet.

Programmers

Programmers turn a decimal flag value into its bit pattern before building a bit mask.

Teachers

Teachers produce answer keys for number-system worksheets in seconds.

Popular base conversions

Examples

Decimal to Binary examples

3 worked examples

01

Classroom example

13 in decimal equals 1101 in binary, via repeated division by 2.

02

A round number

100 in decimal equals 1100100 in binary.

03

Just past one byte

256 converts to 100000000 — nine bits, one more than a single byte can hold.

FAQ

Frequently asked questions

Quick answers to common questions about the Decimal to Binary Converter.

How do I convert decimal to binary?

Type your decimal number above, with decimal selected as the input base. The binary value appears instantly in the results table — nothing is uploaded anywhere.

How do you convert decimal to binary by hand?

Divide the number by 2 repeatedly and keep each remainder: 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Reading the remainders bottom to top gives 1101.

What is 13 in binary?

13 in decimal is 1101 in binary — a common worked example when first learning the repeated-division method by hand.

Is this decimal to binary converter free?

Yes. It's free, with no sign-up and no limit on how many numbers you convert.

Can I convert binary back to decimal?

Yes — the same converter works in both directions. Select binary as the input base instead, or use the dedicated binary to decimal converter page.

How large a decimal number can I convert?

Up to 9,007,199,254,740,991 — beyond that the conversion won't be exact, and the tool will tell you so.

How are negative numbers shown in binary?

With a minus sign in front, so -10 becomes -1010. That isn't the two's-complement form computers store — in 8 bits, -10 is 11110110 — so work that out separately if you need the stored bit pattern.

Can I convert a decimal with a fraction, like 2.5?

No, only whole numbers are accepted. For 2.5, convert the 2 here (10 in binary) and note that .5 is .1 in binary, giving 10.1.

How many bits does a number need?

Count the digits of the binary result: 255 needs 8 bits (11111111), 256 needs 9, and 65,535 is the largest value that fits in 16. Every extra bit doubles the largest number you can store.

Still have a question? Contact us

Report a problem

Decimal to Binary Converter

What went wrong?
    or paste a screenshot