1. Home
  2. Math
  3. Binary Calculator

Quick guide

What This Calculator Does

The Binary Calculator covers two distinct search intents:

  • Base conversion: enter one non-negative integer and its base, then rewrite it as binary (BIN), octal (OCT), decimal (DEC), and hexadecimal (HEX). For example, decimal 42 becomes binary 101010, octal 52, and hexadecimal 2A.
  • Binary operations: enter two binary integers, choose +, −, ×, ÷, AND, OR, or XOR, and read the result in binary and decimal.

It is useful for learning number bases, checking bitmasks, and doing quick integer verification. It is not a signed-format, floating-point, arbitrary-precision, or full programmer-calculator replacement.

When to Use It

  • You want to confirm that 42, 101010, 52, and 2A represent the same integer.
  • You are learning binary addition, subtraction, multiplication, integer division, or bitwise logic.
  • You need to check an AND, OR, or XOR mask.
  • You want both the bit pattern and the decimal magnitude in one result.

Inputs Explained

Convert Mode

Choose the input base and enter one non-negative integer. Binary accepts 0–1, octal accepts 0–7, decimal accepts 0–9, and hexadecimal accepts 0–9 plus A–F. Hexadecimal letters are case-insensitive and are displayed in uppercase.

The input field does not parse 0b, 0o, or 0x prefixes, signs, decimal points, spaces, commas, or scientific notation. It expects a digit string for one integer, not a complete JavaScript or Python numeric literal.

Read the full guide

Frequently Asked Questions

What does this page support?

It supports single-value conversion among binary, octal, decimal, and hexadecimal, plus addition, subtraction, multiplication, division, AND, OR, and XOR for two binary integers.

Can I enter a 0b, 0x, or negative-number prefix?

No. Convert mode accepts the non-negative integer characters for the selected base, and calculate mode accepts binary strings made only of 0 and 1.

Why does binary division have no decimal part?

The current implementation uses a floored integer quotient for non-negative integers; it does not display a fractional part or a remainder card.

Do AND, OR, and XOR support any length?

Not safely. They follow JavaScript's 32-bit signed bitwise semantics, so inputs longer than 32 bits may be truncated; keep bitwise operands within 32 bits.

Are very large base values exact?

The page parses integers through JavaScript Number, so very long values beyond the safe-integer range can lose precision and are not suitable for arbitrary-precision work.

计算器工具网
OneCalculators

Provides various useful online calculation tools to help you quickly solve calculation problems in daily life and work.

Links

  • About Us
  • Terms of Use
  • Privacy Policy
  • Disclaimer
  • Contact Us
  • Sitemap
  • Release Notes

Calculator Categories

  • Mathematics
  • Financial Calculators
  • Health Calculators
  • Legal Calculators
  • Unit Converters
  • Date & Time

Contact Us

Contact UsGitHubTwitter

© 2026 Calculator Tools. All rights reserved.

Monitor your Domain Rating with FrogDRLaunched on FazierGood AI Tools

Binary Calculator: Base Conversion & Bitwise Operations

Convert non-negative integers between binary, octal, decimal, and hexadecimal, or apply arithmetic, AND, OR, and XOR to two binary integers.

Inputs & Mode

Use a whole number with 0–9; no decimal or sign

Results

💻

Enter a value to see the result