Decimal to Binary Converter
Convert decimal numbers to binary code. This free tool transforms base-10 integers into their binary (base-2) equivalent. Ideal for computer science students and software developers.
How Decimal to Binary Conversion Works
The division-by-2 method repeatedly divides the decimal number by 2 and records the remainders. Reading the remainders from bottom to top gives the binary representation. For negative numbers, Two's Complement is used in most computer systems.
How It Works
This decimal to binary converter transforms base-10 numbers into base-2 binary representation. It uses the division-by-2 method to find each bit position, showing the step-by-step conversion process.
The conversion process:
- Divide by 2: Divide the decimal number by 2, tracking the remainder (0 or 1).
- Record remainder: The remainder is the next bit (starting from the right/LSB).
- Repeat: Use the quotient for the next division. Continue until quotient is 0.
- Read backwards: Read remainders from last to first to get the binary result.
For example: 45 ÷ 2 = 22 r1, 22 ÷ 2 = 11 r0, 11 ÷ 2 = 5 r1, 5 ÷ 2 = 2 r1, 2 ÷ 2 = 1 r0, 1 ÷ 2 = 0 r1. Read backwards: 101101.
When You'd Actually Use This
Learning Binary Conversion
Understand how to convert decimal numbers to binary using the division method.
Computer Science Education
Teach students number base conversion and binary representation fundamentals.
Network Subnetting
Convert decimal IP addresses and subnet masks to binary for network calculations.
Programming Development
Understand binary representation for bit manipulation, flags, and low-level programming.
Digital Electronics
Convert decimal values to binary for circuit design and logic analysis.
CTF and Puzzle Solving
Encode decimal values as binary for cybersecurity challenges and puzzles.
What to Know Before Using
Negative numbers use 2's complement
For signed binary, negative numbers are represented using 2's complement notation, not just a sign bit.
Bit width determines range
8-bit: 0-255 (unsigned) or -128 to 127 (signed). 16-bit: 0-65535. Choose appropriate width for your needs.
Leading zeros don't change value
45 = 101101 = 00101101. Leading zeros may indicate bit width but don't affect the numeric value.
Powers of 2 have single bits
1=0001, 2=0010, 4=0100, 8=1000. These are useful to recognize for quick mental conversion.
Fractional decimals need binary point
This tool handles integers. Decimal fractions (0.5, 0.25) use negative powers of 2 after a binary point.
Common Questions
What's the binary for 255?
11111111 (8 ones). 255 = 2^8 - 1, so all 8 bits are set. It's the maximum value for 8-bit unsigned.
How do I convert binary back to decimal?
Multiply each bit by its positional value (powers of 2) and sum. Or use a binary-to-decimal converter.
What's the fastest way to convert decimal to binary?
For humans: repeated division by 2. For common numbers: memorize powers of 2 and build up. For computers: it's built-in.
How do I represent negative numbers in binary?
Use 2's complement: invert all bits and add 1. -5 in 8-bit: 5=00000101, invert=11111010, add 1=11111011.
What's special about powers of 2?
They have exactly one bit set: 1=0001, 2=0010, 4=0100, 8=1000, 16=10000. Easy to recognize and useful for bit masks.
Can I convert very large decimals?
Yes, but binary gets long fast. 1000 = 10 bits, 1 million = 20 bits, 1 billion = 30 bits. Each 3 decimal digits ≈ 10 binary bits.
Why do computers use binary?
Electronics easily represent two states (on/off, high/low). Binary is reliable, simple to implement, and mathematically elegant.
Other Free Tools
Binary Bit Flipper & Manipulator
Binary Bit Flipper & Manipulator
Binary to Hexadecimal Converter
Binary to Hexadecimal Converter
Binary Gray Code Converter
Binary Gray Code Converter
Binary to Octal Converter
Binary to Octal Converter
Binary to Decimal Converter
Binary to Decimal Converter
ASCII to Hex Converter
ASCII to Hex Converter: Text to Hexadecimal Translator
Free Printable Calendar Maker
Create & Print Your Custom Calendar
HTML Minifier
Free HTML Minifier & Compressor
Unix Timestamp Converter
Unix Timestamp Converter
Password Generator
Free Strong Password Generator