Binary Calculator
Convert between decimal and binary
Enter a decimal integer
Divide by 2 repeatedly and read remainders bottom-to-topWhat is a Binary Calculator?
A Binary Calculator is a tool for working with binary numbers, which are numbers written using only two digits: 0 and 1. Binary is the fundamental number system used by computers because digital circuits naturally represent two states (off/on, low/high, 0/1).
Binary numbers follow the same place-value concept as decimal numbers, but instead of powers of 10, binary uses powers of 2. For example, the binary number 1011₂ means: 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal.
This Calculator Supports Multiple Conversions
- Decimal → Binary -- convert base-10 numbers to base-2
- Decimal → Octal -- convert base-10 numbers to base-8
- Decimal → Hexadecimal -- convert base-10 numbers to base-16
Binary calculators are useful for converting between number bases, understanding computer science topics like bits, bytes, and data representation, and working with hexadecimal (base 16), which is commonly used to represent binary compactly.
How to Use This Binary Calculator
- Enter a decimal number -- type any integer into the input field (e.g., 255)
- Click "Calculate" -- to convert the number
- Review all three outputs -- the result shows the binary (base 2), octal (base 8), and hexadecimal (base 16) representations simultaneously
- Try other values -- explore powers of 2, common byte values (128, 255, 256), or any number you need to convert
Tips:
- A valid binary number contains only 0 and 1 (no digits 2 through 9)
- Leading zeros (like 00101) don’t change the value, but they can be useful for showing fixed bit-length formats
- Hexadecimal uses digits 0–9 and letters A–F (where A=10, B=11, …, F=15)
Binary Formulas
Binary Place Value
A binary number has digits (bits) with place values based on powers of 2:
2⁰, 2¹, 2², 2³, 2⁴, …
For binary number bₖbₖ₋₁…b₁b₀, the decimal value is:
value = Σ bᵢ × 2ⁱ (i = 0 to k)
where each bᵢ is either 0 or 1
Converting Decimal to Binary
Repeatedly divide by 2 and record remainders:
- Divide the number by 2
- Record the remainder (0 or 1)
- Divide the quotient by 2 and repeat until the quotient is 0
- Read the remainders from bottom to top
Binary Addition Rules
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10
0 carry 1
Example Calculations
Example 1: Convert Binary to Decimal
Convert: 1011₂ to decimal
Calculation: 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1
Result: 1011₂ = 11₁₀
Example 2: Convert Decimal to Binary
Convert: 13₁₀ to binary
Steps:
- 13 ÷ 2 = 6 remainder 1
- 6 ÷ 2 = 3 remainder 0
- 3 ÷ 2 = 1 remainder 1
- 1 ÷ 2 = 0 remainder 1
Read upward: 1101
Result: 13₁₀ = 1101₂
Example 3: Binary Addition
Add: 1011₂ + 0101₂
Calculation: 1011 + 0101 = 10000
Verify: 11 + 5 = 16 in decimal
Result: 1011₂ + 0101₂ = 10000₂
Example 4: Binary Multiplication
Multiply: 101₂ × 11₂
In decimal: 5 × 3 = 15
15 in binary: 1111₂
Result: 101₂ × 11₂ = 1111₂
Frequently Asked Questions
Why do computers use binary instead of decimal?
Computers are built from electronic components that naturally represent two states (on/off). Binary matches this perfectly, making it reliable and efficient for hardware design.
What is a bit and a byte?
A bit is a single binary digit (0 or 1). A byte is typically 8 bits, which can represent 256 different values (0–255).
What’s the difference between binary and hexadecimal?
Hexadecimal (base 16) is a compact way to write binary. Every 4 binary bits corresponds to one hex digit (0–9 and A–F). For example, 1111₂ = F₁₆.
Can binary numbers represent negative values?
Yes. Computers often use formats like two’s complement to represent negative numbers in binary. Some binary calculators support this, but many basic tools focus on non-negative integers.
Why do binary results sometimes look "long"?
Because binary uses only 0 and 1, it needs more digits to represent large numbers. For example, 255₁₀ is 11111111₂, which is 8 bits long.
Want to add this binary calculator to your website? Get a custom embed code that matches your site's design and keeps visitors engaged.