Binary Calculator

Perform low-level bitwise operations and base conversions.

Math & Converters
Tool Area
Bases Setup
Value 1
Base
Operation
Value 2
Base
Calculated Value & Bases Representation
Binary Representation
Decimal Representation
Hexadecimal Representation

About this tool

Low-level bitwise operations are essential when designing communication protocols, system kernels, and memory mapping systems.

Bitwise Operation Algorithms

This calculator performs operations directly on binary bits, implementing base-2 logical translations such as AND, OR, and XOR:

Bitwise AND: A & B = C

Where:

  • Each bit position in C is set to 1 if and only if both corresponding bits in A and B are 1.

This local compiler provides fast, precise bases conversion directly inside your browser.

Frequently asked questions

Everything you need to know about Binary Calculator.

What number bases does the binary calculator support?

The calculator supports Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16). All four representations are shown simultaneously and update in real time as you type, so you can instantly see the same value across all bases.

What bitwise operations are available?

AND (&), OR (|), XOR (^), NOT (~), left shift (<<), and right shift (>>) are all supported. Results are shown in all four bases, with the binary representation highlighting which bits changed — useful for learning and debugging low-level code.

How do I convert a decimal number to binary?

Enter the decimal number in the Decimal input field. The binary equivalent updates instantly in the Binary field. The tool also shows the conversion steps: repeatedly dividing by 2 and reading remainders from bottom to top — the standard conversion algorithm.

What is two's complement and why does it matter?

Two's complement is the standard way computers represent signed integers. A positive number is stored normally; a negative number is represented by inverting all bits (one's complement) and adding 1. This allows hardware addition circuits to handle both addition and subtraction with the same circuit. The calculator shows both signed and unsigned interpretations.

Does the calculator support different integer word sizes (8-bit, 16-bit, 32-bit)?

Yes. You can select 8-bit, 16-bit, 32-bit, or 64-bit word size, which affects how NOT (~) and shift operations behave and how signed vs. unsigned values are interpreted. This is essential for accurate bitwise operation modelling.

Related tools