All calculators

Education

Binary Calculator

Last updated: May 31, 2026

Written by Blake Boege

A binary calculator is a computational tool for base-2 numerical systems. It converts integers between binary, octal, decimal, and hexadecimal representations, and performs arithmetic and bitwise logical operations (AND, OR, XOR) on binary digit sequences with detailed bit-by-bit carrying and borrow outputs.

Perform binary arithmetic operations (addition, subtraction, multiplication, division, AND, OR, XOR) and convert numbers between binary, octal, decimal, and hexadecimal bases simultaneously.

Quick Answer

Convert values across binary, octal, decimal, and hexadecimal bases simultaneously, or perform binary arithmetic (addition, subtraction, multiplication, division, AND, OR, XOR) with carries.

Calculator Mode

e.g. 1011

Conversion Results

Decimal (Base 10)

11

Binary prefix: 0b1011

Binary (Base 2)1011
Octal (Base 8)13
Decimal (Base 10)11
Hexadecimal (Base 16)B

Step-by-Step Base Conversion

[1]Input Value: 1011 in Base 2
[2]Convert input to base 10 decimal representation:
[3] Formula: Sum of d_i × 2^i
[4] Calculation: (1 × 2^3) + (1 × 2^1) + (1 × 2^0) = 11
[5]Convert decimal 11 to other bases:
[6] To Binary (Base 2): Repeated division by 2 or powers of 2 mapping → 1011
[7] To Octal (Base 8): Grouping binary in 3s or division by 8 → 13
[8] To Hexadecimal (Base 16): Grouping binary in 4s or division by 16 → B
Was this helpful?

Examples

Binary Addition: 1011 + 1101

Result = 11000 (Decimal: 11 + 13 = 24)

Convert Decimal 255 to other bases

Binary: 11111111 · Octal: 377 · Hexadecimal: FF

Bitwise XOR: 1101 XOR 1011

Result = 0110 (Decimal: 13 ^ 11 = 6)

How it works

This calculator operates in two modes to support your computer science and mathematical work:

Binary Addition Rules

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 0 (carry 1 to the next column)
  • 1 + 1 + 1 = 1 (carry 1 to the next column)

Understanding Bases in Computing

Different bases are suited for different computational tasks:

  • Binary (Base 2): The native language of digital computing circuits.
  • Octal (Base 8): Sometimes used in Unix file permission configurations (e.g. chmod 755).
  • Decimal (Base 10): The standard human counting system based on ten digits.
  • Hexadecimal (Base 16): A highly compact way to read binary sequences, where 4 bits are mapped to a single hex character (0-9, A-F). Commonly used for memory addresses and HTML color codes.

Related numeric calculators

For other mathematical operations and number transformations, visit:

Related Calculators

More tools from Education

Frequently asked questions

Binary is a base-2 number system, meaning it uses only two digits: 0 and 1. Each digit position represents a power of 2, starting with 2⁰ on the far right, then 2¹, 2², 2³, and so on, similar to how the decimal system uses powers of 10.

To convert a decimal integer to binary, repeatedly divide the number by 2 and write down the remainders from bottom to top. For example, 13 ÷ 2 = 6 R 1; 6 ÷ 2 = 3 R 0; 3 ÷ 2 = 1 R 1; 1 ÷ 2 = 0 R 1. Reading remainders upwards yields 1101.

Bitwise XOR (exclusive OR) compares corresponding bits of two binary numbers. The resulting bit is 1 if the input bits are different, and 0 if they are the same (e.g., 1 XOR 0 = 1, but 1 XOR 1 = 0).

Computers use binary because digital hardware utilizes transistors as electronic switches. These switches can easily represent two states: ON (high voltage, representing 1) and OFF (low voltage, representing 0). This binary nature simplifies processor architecture and increases physical reliability.