Decimal to Binary Converter
Convert any decimal number to binary instantly. See the step-by-step division by 2, the bit count, and the hexadecimal and octal equivalents. Free, private, and runs entirely in your browser.
Enter a Decimal Number
Enter a decimal number and click Convert to Binary to see the result with a step-by-step breakdown.
Step-by-step breakdown
Summary
What does this Decimal to Binary Converter do?
This free online decimal to binary converter turns any base-10 number into its base-2 equivalent. Decimal is the number system we use every day, with ten digits (0 through 9). Binary is the number system computers use internally, with only two digits (0 and 1). Every value you type into a computer — text, images, video, programs — is ultimately represented as a sequence of binary digits.
Beyond just showing you the binary result, this converter walks through the standard repeated-division method step by step. You'll see each division by 2, the remainder at each step, and how the final binary number is assembled from the remainders read in reverse order. It also provides the hexadecimal and octal equivalents, since these number systems are closely related to binary and are used heavily in programming and digital electronics.
Everything runs locally in your browser. The number you enter never leaves your device — no server, no logs, no tracking. You can convert as many numbers as you want, with no limits and no signup.
How to convert decimal to binary
- Enter a decimal number: Type any non-negative integer (0, 1, 2, 3, …) up to 4,294,967,295 into the input field. You can also click one of the quick-pick buttons for common values.
- Click Convert: The converter instantly computes the binary equivalent and displays it.
- Review the breakdown: Below the result, you'll see each division by 2 with its quotient and remainder, showing exactly how the binary number was built.
- Check the alternatives: The hexadecimal and octal equivalents are shown alongside the bit count and byte size.
- Copy if needed: Use the "Copy Results" button to grab a formatted summary.
That's it. No signup, no email, no waiting. The entire process takes seconds.
Decimal to binary conversion method
The standard method for converting a decimal integer to binary is repeated division by 2. Here's the complete algorithm.
Step 2: Record the remainder (0 or 1).
Step 3: Divide the quotient by 2 again.
Step 4: Repeat until the quotient is 0.
Step 5: Read the remainders from bottom to top.
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1 ← most significant bit
Read bottom to top: 1101
= 8 + 4 + 0 + 1
= 13
An alternative method is to find the largest power of 2 that fits, subtract it, and mark that bit as 1, then repeat with the remainder. The repeated-division method is more systematic and easier to automate, which is why it's the standard approach taught in computer science courses.
Decimal to binary reference table
Here's a quick reference for the first 32 decimal values, along with their 4-bit and 8-bit binary representations.
| Decimal | Binary (4-bit) | Binary (8-bit) | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 00000000 | 0 |
| 1 | 0001 | 00000001 | 1 |
| 2 | 0010 | 00000010 | 2 |
| 3 | 0011 | 00000011 | 3 |
| 4 | 0100 | 00000100 | 4 |
| 5 | 0101 | 00000101 | 5 |
| 6 | 0110 | 00000110 | 6 |
| 7 | 0111 | 00000111 | 7 |
| 8 | 1000 | 00001000 | 8 |
| 9 | 1001 | 00001001 | 9 |
| 10 | 1010 | 00001010 | A |
| 11 | 1011 | 00001011 | B |
| 12 | 1100 | 00001100 | C |
| 13 | 1101 | 00001101 | D |
| 14 | 1110 | 00001110 | E |
| 15 | 1111 | 00001111 | F |
| 16 | 10000 | 00010000 | 10 |
| 32 | 100000 | 00100000 | 20 |
| 64 | 1000000 | 01000000 | 40 |
| 128 | 10000000 | 10000000 | 80 |
| 255 | 11111111 | 11111111 | FF |
| 256 | 100000000 | — (9 bits) | 100 |
| 1000 | 1111101000 | — (10 bits) | 3E8 |
Notice the pattern: the values 1, 2, 4, 8, 16, 32, 64, 128 are powers of 2, and each one is a single 1 followed by zeros in binary. That's why binary is the natural language of computers — every position represents a power of 2.
Where decimal-to-binary conversion is used
Binary conversion isn't just a classroom exercise — it's a fundamental skill in several fields.
Computer programming
Programmers work with binary all the time, especially when dealing with bitwise operations, flags, masks, and low-level memory manipulation. Understanding how decimal numbers map to binary makes it much easier to read hex dumps, debug bitwise logic, and write efficient code for embedded systems.
Digital electronics
Digital circuits work entirely in binary. When you design a counter, a shift register, or a memory address decoder, you need to know how decimal values map to binary patterns. Seven-segment displays, for example, use 7-bit binary patterns to show the digits 0–9.
Networking and IP addresses
IPv4 addresses are 32-bit binary numbers, usually written as four decimal octets (like 192.168.1.1). Converting between decimal and binary is essential for subnetting, calculating network ranges, and understanding CIDR notation.
Data encoding and compression
Character encodings (ASCII, UTF-8), image formats, audio codecs, and compression algorithms all operate on binary data. When you look at a hex editor to inspect a file, you're seeing the binary content displayed in a more compact form.
Cryptography
Modern encryption algorithms operate on binary data. Block ciphers like AES process data in 128-bit blocks, and hash functions like SHA-256 produce 256-bit binary digests. Understanding binary representation helps when working with cryptographic primitives and protocols.
Education and interviews
Decimal-to-binary conversion is a standard topic in computer science curricula and a common interview question for software engineering roles. Being able to do it fluently — both by hand and programmatically — is a baseline skill for anyone working with computers.
Why use this converter?
Instant results
No server round-trip means your answer appears the moment you click Convert. Zero waiting.
Step-by-step breakdown
See each division by 2, the quotient and remainder at each step, and how the binary number is assembled.
100% private
Everything runs in your browser. The number you enter never leaves your device — no server, no logs, no tracking.
Hex and octal too
Every conversion also shows the hexadecimal and octal equivalents, so you get all the common bases in one shot.
No limits
Convert as many numbers as you want. No daily caps, no watermarks, no "upgrade to pro" nonsense.
Works offline
Once the page loads, you can use the converter without an internet connection. Bookmark it for exam prep.
Common mistakes to avoid
- Reading the remainders in the wrong order. The remainders are collected from the first division (least significant bit) to the last (most significant bit). You must reverse them to get the correct binary number.
- Stopping too early. Keep dividing until the quotient is 0, not until you get a remainder of 0. The quotient hitting 0 is the stopping condition.
- Forgetting that 0 in decimal is 0 in binary. Zero is a valid input and the result is simply "0" — not an empty string.
- Mixing up binary and BCD. Binary is a positional number system, while BCD (Binary-Coded Decimal) encodes each decimal digit separately in 4 bits. For example, 12 in binary is 1100, but in BCD it's 0001 0010.
- Assuming all binary numbers are 8 bits. Binary numbers have no fixed width unless you specify one. 13 is 1101 (4 bits), not 00001101 (8 bits) — although both represent the same value. This calculator shows the minimal representation.