Binary Calculator

Perform binary addition, subtraction, multiplication, and division. Convert between binary, decimal, octal, and hex with step-by-step explanations and bit visualization.

Share

Bit Width

Sign Mode

Operation

Add

Operands

= 10 (unsigned 8-bit)

+

= 6 (unsigned 8-bit)

Result in All Bases

Binary

0001 0000

Decimal

16

Octal

0o20

Hexadecimal

0x10

Bit Visualization

Bit76543210
A00001010
B00000110
+00010000

Step-by-Step Solution

  0000 1010  (10)
+ 0000 0110  (6)
───────────
= 0001 0000  (16)

Quick Reference

AND (&)

Both bits must be 1 for result 1. Used to mask/clear bits.

OR (|)

Either bit being 1 gives 1. Used to set specific bits.

XOR (^)

Different bits give 1, same give 0. Used to toggle bits.

Two's Complement

Signed integers use MSB as sign. Negate by flipping bits + 1.

Left Shift (<<)

Shifts bits left, fills with 0s. Equivalent to multiplying by 2^n.

Right Shift (>>)

Shifts bits right. Logical fills with 0s; arithmetic preserves sign.

How to Use Binary Calculator

  1. 1Enter binary numbers or switch to decimal input.
  2. 2Select the arithmetic operation.
  3. 3View the result in all number bases.
  4. 4Review the step-by-step calculation.

Frequently Asked Questions

How do I add binary numbers?

Binary addition follows the same rules as decimal but with only 0 and 1: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (carry 1). Work from right to left, carrying as needed.

How do I convert binary to decimal?

Multiply each digit by 2 raised to its position (starting from 0 on the right). Example: 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 13.

What is two's complement?

Two's complement represents negative numbers in binary. Flip all bits and add 1. For example, -5 in 8-bit is: 5=00000101, flip=11111010, +1=11111011.

About Binary Calculator

Perform binary addition, subtraction, multiplication, and division. Convert between binary, decimal, octal, and hex with step-by-step explanations and bit visualization.

NexTool's Binary Calculator is completely free to use with no sign-up required. Your data is processed directly in your browser and never sent to our servers, ensuring complete privacy and instant results.

Stay Updated

Get notified about new tools, features, and exclusive deals. No spam, ever.