Skip to content

Binary Calculator

Math & Calculators ·
·

Perform binary arithmetic and bitwise operations with visual bit display

Working with Binary? Skip the Paper.

If you’ve ever tried to AND two 8-bit numbers by hand, you know how tedious it gets. One misplaced bit and the whole thing’s wrong. This calculator handles AND, OR, XOR, NOT, addition, and subtraction on binary numbers, showing results in both binary and decimal with a visual bit layout so you can actually see what happened.

How It Works

Type in binary number A (just 0s and 1s, something like 11010110), pick your operation, enter binary number B if needed, and hit Calculate. The result shows up in binary and decimal side by side, with each bit laid out visually.

Quick example: A = 11001010, B = 10110011, operation = AND. Result: 10000010 (that’s 130 in decimal). Only the positions where both inputs had a 1 survived, which is exactly how subnet masking works in networking.

What Each Operation Does

AND keeps a bit only when both inputs have a 1 at that position. Networking people use this constantly for subnet calculations. OR sets a bit when either input has a 1, it’s how you turn specific flags on without touching the others. XOR flips bits where inputs disagree, which is why it shows up in encryption and checksums. NOT just inverts everything within the input’s bit-width.

Addition and subtraction work like you’d expect, binary arithmetic with carries and borrows, same as you learned in CS class but without the pencil-and-paper errors.

Who Actually Needs This

Students working through computer architecture homework. Network engineers double-checking subnet math before deploying firewall rules. Embedded developers verifying bit manipulation logic before flashing it to a microcontroller. Competitive programmers who need a quick sanity check on a bitwise trick during a contest.

Honestly, most people reach for this when they’re debugging something. You think your bitmask is right, you run the AND here, and it either confirms your logic or saves you twenty minutes of staring at the wrong register value.

For converting between binary, octal, hex, and decimal, the Number System Converter is what you want. The Scientific Calculator handles standard math when you’re done thinking in base 2.

A Few Details

NOT flips every bit within the width of your input. So NOT of 1010 gives 0101, four bits in, four bits out. The tool figures out the bit-width from what you typed.

Input is binary only. If you’ve got decimal numbers, convert them first or use the Number System Converter. The calculator comfortably handles up to 32 or 64 bits, which covers pretty much every practical scenario.

All the math runs locally in your browser. Nothing leaves your machine.

binary calculator bitwise AND OR XOR

Related Tools

More in Math & Calculators

Mortgage Calculator

Estimate your real monthly mortgage payment, principal, interest, taxes, insurance, and PMI all in one number.

Number to Words Converter

Convert any number to its English word representation

Pace Calculator

Solve for running pace, finish time, or distance, switch between km and miles, with one-click presets for 5K, 10K, half, and full marathon.

One Rep Max Calculator

Estimate your 1RM from a heavier set using the Epley and Brzycki formulas, plus a full table of training percentages and rep ranges.

Percentage Increase Calculator

Find the percent increase or decrease between two numbers, or grow and shrink any value by a percentage you choose. Both directions, instant results.

Percentage Calculator

Calculate percentages, percentage of a number, and percentage change

Pregnancy Due Date Calculator

Calculate your pregnancy due date from last period, conception, or IVF transfer, with current week and trimester.

Prime Number Checker

Check if a number is prime, find primes in range, and factorize numbers

Pythagorean Theorem Calculator

Solve a right triangle for any side, hypotenuse from two legs, or one leg from the other and the hypotenuse.

Profit Margin Calculator

Enter revenue and cost to get your gross profit, profit margin percent, and the matching markup. See how much of every sale you actually keep.

Ratio Calculator

Solve proportions and simplify ratios with step-by-step results

Retirement Calculator

Project your retirement nest egg from your age, savings, monthly contributions, and expected return.

View all 73Math & Calculators