Binary Calculator
0 in binary
| Step | Detail |
|---|
How Binary Arithmetic Works
Binary is base 2: every digit (bit) represents a power of 2, and each position can only be 0 or 1. To convert a binary number to decimal, multiply each bit by 2 raised to its position (counting from 0 on the right) and sum the results — for example, 1101 in binary is (1×23) + (1×22) + (0×21) + (1×20) = 8 + 4 + 0 + 1 = 13 in decimal. This calculator converts both of your binary inputs to decimal, performs the requested operation (addition, subtraction, multiplication, or division) using standard arithmetic, and converts the result back to binary using repeated division by 2.
Why Subtraction Can Produce a Negative Result
Unlike computer hardware, which represents negative binary numbers using two's complement and a fixed bit width, this calculator works with plain unsigned binary values and reports negative results with a leading minus sign for clarity. Division also rounds down to a whole number (integer division) with any leftover shown as a remainder, since binary division of unsigned integers doesn't produce fractional bits the way decimal division produces decimals.
Related Tools
If you need to convert between number systems more generally — including hexadecimal and octal — try the hex calculator. For working with the underlying exponents and powers of 2 used in binary place values, the exponent calculator can help.
Frequently Asked Questions
How do I convert a binary number to decimal?
Multiply each bit by 2 raised to its position, counting positions from 0 starting at the rightmost digit, then add the results. For example, binary 1011 equals (1x2^3)+(0x2^2)+(1x2^1)+(1x2^0) = 8+0+2+1 = 11 in decimal.
What happens if I divide binary numbers that don't divide evenly?
The calculator performs integer division, truncating toward zero, and reports the leftover amount as a remainder in both decimal and binary - the same way long division works with whole numbers in base 10.