calc-hub logocalc-hub.net

Binary Calculator

Perform binary arithmetic (add, subtract, multiply, divide) and convert between binary, decimal and hexadecimal.

How to use the Binary Calculator

  1. Enter your inputs into the Binary Calculator above.
  2. Results update instantly as you type — no submit button needed.
  3. Adjust any value to see how the result changes in real time.

The base conversion mechanics

Decimal to binary: repeated division by 2; collect remainders bottom-to-top. Binary to decimal: multiply each bit by 2^position, sum.

Binary is base-2: each digit position represents a power of 2 (1, 2, 4, 8, 16, ...). Hex is base-16, often used as a compact representation of binary (each hex digit = 4 binary bits).

Worked example

Decimal 156 to binary: 156 = 128 + 16 + 8 + 4 = 10011100₂. Same number in hex: 9C. Binary addition: 1011 + 110 = 10001₂ (= 17 decimal).

Frequently asked questions

Why is binary used in computers?

Electronic circuits naturally have two states (on/off). Binary maps cleanly onto these states — every digital computation is ultimately binary arithmetic at the hardware level.

How does binary handle negative numbers?

Most modern systems use two's complement: invert all bits and add 1. So −5 in 8-bit two's complement is 11111011. This makes binary subtraction the same as adding the negative.

How big a number fits in N bits?

Unsigned N bits hold 0 to 2^N − 1. Signed N bits hold −2^(N−1) to 2^(N−1) − 1. 8 bits: 0–255 unsigned, −128 to 127 signed.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.