Convert DECIMAL to BINARY, Free
Files convert instantly in your browser. 100% private, any file size, no account needed.
How to convert DECIMAL to BINARY
Binary is the base-2 number system that every digital computer uses internally. Converting a decimal integer to binary means repeatedly dividing by 2 and recording the remainders in reverse order, or equivalently finding which powers of 2 sum to the original number. For example, decimal 13 = 8+4+1 = binary 1101.
This converter runs the algorithm in your browser using JavaScript with no server round-trip. Type any decimal integer and the binary representation appears immediately. It handles both positive integers and, depending on the implementation, negative numbers in two's complement.
Enter the decimal number
Type a positive integer into the input field. Large numbers like 255 or 65535 convert just as readily as small ones.
Read the binary output
The binary string appears instantly. Decimal 255 becomes binary 11111111 (eight 1-bits); decimal 256 becomes 100000000.
Use the result
Copy the binary value for use in code, a network mask calculation, or a computer science assignment.
Convert back with binary-to-decimal
Use the reverse converter to check your answer or go the other way when starting from binary.
Frequently asked questions
How do I convert decimal to binary by hand?
Divide the number by 2 repeatedly, writing down the remainder each time. The binary number is the remainders read bottom to top. For 13: 13/2=6 R1, 6/2=3 R0, 3/2=1 R1, 1/2=0 R1. Binary: 1101.
What is decimal 10 in binary?
Binary 1010. 10 = 8+2 = 2^3 + 2^1.
How many binary digits does a decimal number need?
A decimal number N requires approximately log2(N)+1 binary digits. Numbers 0-1 need 1 bit; 0-3 need 2 bits; 0-7 need 3 bits; 0-255 need 8 bits.
What is the maximum number this converter handles?
It depends on the implementation. JavaScript numbers are 64-bit IEEE 754, so integers up to 2^53 - 1 (about 9 quadrillion) are exact. For cryptographic or arbitrary-precision needs, a specialized big-integer tool is more appropriate.
How does this relate to hexadecimal?
Hexadecimal is base 16. Each hex digit represents exactly 4 binary digits. FF hex = 11111111 binary = 255 decimal. Programmers often use hex as a compact way to write binary.