Binary Calculator
Convert between binary and decimal, add and subtract binary numbers with our free binary calculator
Available Calculators
What is Binary?
Binary is a base-2 number system that uses only two digits: 0 and 1. It's the fundamental language of computers, where each digit represents a power of 2. Binary numbers are essential in computer science, digital electronics, and programming.
Binary Conversion
Converting between binary and decimal is fundamental in computer science. Binary to decimal conversion involves multiplying each digit by its corresponding power of 2, while decimal to binary uses repeated division by 2.
Binary to Decimal Formula
To convert binary to decimal, multiply each digit by 2 raised to its position power:
Decimal to Binary Formula
To convert decimal to binary, repeatedly divide by 2 and collect remainders from bottom to top.
Examples of Binary Calculations
Here are several everyday situations that show how easy it is to use our binary calculator.
Example 1: Binary to Decimal
Convert the binary number 1010 to decimal.
Example 1: Binary to Decimal
Convert the binary number 1010 to decimal.
You can use our calculator by entering:
What is 1010₂ in decimal?
The calculator returns: 10
The formula used is:
Example 2: Decimal to Binary
Convert the decimal number 10 to binary.
Example 2: Decimal to Binary
Convert the decimal number 10 to binary.
You can use our calculator by entering:
What is 10₁₀ in binary?
The calculator returns: 1010
The formula used is:
Example 3: Binary Addition
Add two binary numbers: 1010 + 1100.
Example 3: Binary Addition
Add two binary numbers: 1010 + 1100.
You can use our calculator by entering:
What is 1010₂ + 1100₂?
The calculator returns: 10110
The formula used is:
Example 4: Binary Subtraction
Subtract binary numbers: 1100 - 1010.
Example 4: Binary Subtraction
Subtract binary numbers: 1100 - 1010.
You can use our calculator by entering:
What is 1100₂ - 1010₂?
The calculator returns: 10
The formula used is:
Example 5: IP Address Conversion
Convert the binary IP address segment 11000000 to decimal.
Example 5: IP Address Conversion
Convert the binary IP address segment 11000000 to decimal.
You can use our calculator by entering:
What is 11000000₂ in decimal?
The calculator returns: 192
The formula used is:
Example 6: Memory Size
A computer uses 8 bits to represent a byte. Convert 11111111₂ to decimal.
Example 6: Memory Size
A computer uses 8 bits to represent a byte. Convert 11111111₂ to decimal.
You can use our calculator by entering:
What is 11111111₂ in decimal?
The calculator returns: 255
The formula used is:
Example 7: Color Values
In RGB color, each component uses 8 bits. Convert 00000000₂ to decimal for black.
Example 7: Color Values
In RGB color, each component uses 8 bits. Convert 00000000₂ to decimal for black.
You can use our calculator by entering:
What is 00000000₂ in decimal?
The calculator returns: 0
The formula used is:
Example 8: File Permissions
Unix file permissions use binary. Convert 111₂ (read, write, execute) to decimal.
Example 8: File Permissions
Unix file permissions use binary. Convert 111₂ (read, write, execute) to decimal.
You can use our calculator by entering:
What is 111₂ in decimal?
The calculator returns: 7
The formula used is:
Example 9: Network Subnet
Convert subnet mask 11111111.11111111.11111111.00000000 to decimal notation.
Example 9: Network Subnet
Convert subnet mask 11111111.11111111.11111111.00000000 to decimal notation.
You can use our calculator by entering:
What is 11111111.11111111.11111111.00000000 in decimal?
The calculator returns: 255.255.255.0
The formula used is:
Example 10: Binary Addition with Carry
Add 1111₂ + 0001₂ to see how binary addition handles overflow.
Example 10: Binary Addition with Carry
Add 1111₂ + 0001₂ to see how binary addition handles overflow.
You can use our calculator by entering:
What is 1111₂ + 0001₂?
The calculator returns: 10000
The formula used is:
Summary
These examples show how our binary calculator can handle:
- •Binary to decimal conversion (1010₂ = 10₁₀)
- •Decimal to binary conversion (10₁₀ = 1010₂)
- •Binary addition (1010₂ + 1100₂ = 10110₂)
- •Binary subtraction and computer science applications
You can adapt any real-life situation involving binary numbers to one of these patterns and let the calculator do the work for you.
How to Use
- Select the type of binary calculation you need (binary to decimal, decimal to binary, binary addition, or binary subtraction).
- Enter the required values in the input fields. The calculator will automatically update results in real-time.
- View the result and step-by-step calculation breakdown with formulas displayed using mathematical notation.
Frequently asked questions
How do I convert binary to decimal?
To convert binary to decimal, multiply each digit by its corresponding power of 2 and sum the results. For example, 1010₂ = 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 0 + 2 + 0 = 10₁₀.
How do I convert decimal to binary?
To convert decimal to binary, repeatedly divide by 2 and collect the remainders. Read the remainders from bottom to top to get the binary representation.
Related tools
- Hex Calculator
Convert between hexadecimal and decimal, add and subtract hex numbers with our free hex calculator
- Binary Converter
Instantly convert between decimal, binary, octal and hexadecimal number systems with two's complement support.
- Scientific Calculator
Advanced scientific calculator with trigonometric, logarithmic, and exponential functions
About this tool
Published by Online Tools CenterLast updated:
Check the units, assumptions and rounding before using a result. Health and financial estimates are educational and do not replace individual professional advice.
Found an error? Send the tool name, inputs, expected result and actual result so we can investigate.
Report a problem