Binary Calculator

Binary is the fundamental language of computers, encoding every piece of data as sequences of 0s and 1s. This calculator handles two essential tasks: base conversion (binary, decimal, hex, octal with ASCII display) and binary arithmetic (addition, subtraction, multiplication, division, plus bitwise AND, OR, XOR, and NOT). It supports unsigned integers and two's complement signed representation in 8, 16, and 32-bit widths, and shows carry-bit details for addition so you can follow each step of the computation.

star 4.8
New
Input
Binary (Base 2)
11111111
Decimal (Base 10)
255
Hex (Base 16)
FF
Octal (Base 8)
377
Bit Visualization

How to Use This Calculator

1

Choose a mode

Select Conversion to translate between number bases, or Arithmetic to perform binary operations.

2

Enter your number

Type a number and select its base (binary, decimal, hex, or octal).

3

View results

See the converted value in all bases, or the arithmetic result with step-by-step binary working.

The Formula

To convert binary to decimal, multiply each bit by 2 raised to its position and sum the results. For example, 1011 = 1x8 + 0x4 + 1x2 + 1x1 = 11.

Value = sum(digit * base^position)

lightbulb Variables Explained

  • digit Each digit in the number (0 or 1 for binary)
  • base The number system base (2 for binary)
  • position Position from right, starting at 0

tips_and_updates Pro Tips

1

Each hex digit maps to exactly 4 binary bits, making hex-to-binary conversion straightforward

2

Two's complement flips all bits and adds 1 to represent negative numbers

3

Binary addition follows the same column rules as decimal: 1+1 = 10 (carry the 1)

4

Use bit widths (8/16/32) to see how numbers are stored in actual computer memory

5

AND, OR, XOR operate bit-by-bit and are fundamental to digital logic design

Binary Calculator - Conversion & Arithmetic with Steps

Convert numbers between binary, decimal, hexadecimal, and octal instantly. Perform binary addition, subtraction, multiplication, division, and bitwise operations with full step-by-step explanations. Supports unsigned and two's complement signed representation in 8, 16, and 32-bit widths.

Binary to Decimal Conversion

Binary (base 2) uses only digits 0 and 1. To convert to decimal, multiply each bit by 2 raised to its position power and sum the results. Example: 10110 = 16+4+2 = 22.

Binary Arithmetic Operations

Binary addition, subtraction, multiplication, and division follow the same principles as decimal arithmetic but with only two digits. This calculator shows carries, borrows, and partial products step by step.

Bitwise Operations & Two's Complement

Bitwise AND, OR, XOR, and NOT operate on individual bits and are fundamental to computing. Two's complement representation allows negative numbers in binary, with the most significant bit indicating the sign.

Frequently Asked Questions

sell

Tags

verified

Data sourced from trusted institutions

All formulas verified against official standards.