ES
navigate Enter open Esc close
Arithmetic & Bitwise Operations

Binary & Hexadecimal Calculator

Perform arithmetic (+, -, ×, ÷, %) and bitwise (AND, OR, XOR, NOT, shifts) calculations between mixed numerical bases with arbitrary-precision BigInt.

Your calculations and bitwise operations are processed 100% locally in your browser using high-precision BigInt. No data is sent to our servers.

Arithmetic & Bitwise Calculator

Calculate operations between two operands in base 2, 8, 10, or 16 with simultaneous multi-base outputs.

Operation Result
Binary (Base 2)
Octal (Base 8)
Decimal (Base 10)
Hexadecimal (Base 16)

Only need to convert between number bases?

Convert instantly between binary, octal, decimal and hexadecimal without performing operations.

Binary Arithmetic and Bitwise Operations Guide

Arithmetic and bitwise operations form the foundational mathematical backbone of microprocessor execution units (ALUs), system compilers, cryptographic engines, and network packet processors. Unlike standard decimal calculators, performing operations directly across Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16) allows software engineers to inspect register states, manipulate bitflags, and design hardware circuits.

1. Mixed-Base Arithmetic

In low-level software engineering, operands frequently originate from different bases (e.g. adding a decimal offset 16 to a hexadecimal memory address 0x00FF). This calculator converts each operand to native arbitrary-precision BigInt representations, executes the mathematical operation, and simultaneously renders the output across all 4 numbering bases.

2. Bitwise Logic Operators

3. Word Sizes & Bit Width Clamping

In CPU architectures, registers are bounded by fixed word lengths: 8-bit (Byte, max 255), 16-bit (Word, max 65,535), 32-bit (DWord, max 4,294,967,295), and 64-bit (QWord). Choosing the correct bit width is crucial when evaluating unary NOT or overflow-sensitive bit masks.

Frequently Asked Questions about Binary & Hex Calculation

Can I perform operations between numbers in different bases?

Yes. You can select different input bases for Operand A and Operand B (such as Binary for A and Hexadecimal for B). The calculator computes the exact result and outputs it simultaneously in Binary, Octal, Decimal, and Hexadecimal.

How does the unary NOT (~) operator work with word size?

The NOT operator inverts all bits within the configured word size (8, 16, 32, or 64 bits). For example, with an 8-bit word width, NOT 0x0F (00001111) becomes 0xF0 (11110000 / 240 decimal).

Does this calculator suffer from 64-bit overflow or precision loss?

No. The mathematical engine uses JavaScript's native BigInt integer architecture, ensuring arbitrary precision and exact mathematical calculations without standard float rounding errors.

What is the difference between AND, OR, and XOR?

AND requires both bits to be 1 to yield 1. OR yields 1 if either bit is 1. XOR yields 1 only when the two bits are different (one is 1 and the other is 0).

Share this tool

Help others by sharing this free tool.